nacha-mcp
nacha-mcp
NACHA/ACH 파일을 파싱하고 검증하기 위한 MCP(Model Context Protocol) 서버입니다.
요구 사항
Node.js 18 이상
npm
Related MCP server: @validatefin/mcp
설정
git clone https://github.com/msuresh007/nacha-mcp.git
cd nacha-mcp
npm install
npm run build이 명령은 src/를 dist/로 컴파일합니다. 업데이트를 가져온 후에는 npm run build를 다시 실행하세요.
사용해 보기
산술적으로 유효한 작은 샘플 파일이 examples/sample.ach에 포함되어 있습니다. 빌드가 완료되면
MCP 클라이언트 없이도 명령줄에서 두 도구를 직접 실행하여 모든 것이 정상 작동하는지 확인할 수 있습니다:
node -e "const {analyzeNachaFile}=require('./dist/analyze.js');const fs=require('fs');console.log(JSON.stringify(analyzeNachaFile(fs.readFileSync('examples/sample.ach','utf-8')),null,2))""valid": true와 빈 issues 배열, 배치 1개, 항목 1개가 표시되어야 합니다.
도구
parse_nacha_file — 지정된 경로의 NACHA 파일을 완전한 구조화된 JSON으로 파싱합니다: 파일 헤더, 배치(헤더, 추가 레코드가 포함된 항목, 컨트롤), 파일 컨트롤.
summarize_nacha_file — NACHA 파일을 파싱하고 요약 정보를 반환합니다: 배치 수, 총 항목 수, 총 차변/대변 금액, 존재하는 SEC 코드, 검증 문제.
두 도구 모두 단일 입력인 file_path(디스크에 있는 파일의 절대 경로)를 받습니다.
파싱에는 다음이 포함됩니다:
구조적 검증(레코드 길이, 레코드 유형 순서, 배치 헤더/컨트롤 페어링).
산술 검증 — 항목 해시, 차변/대변 합계, 항목/추가 레코드 수가 실제 항목에서 다시 계산되어 선언된 배치 컨트롤 및 파일 컨트롤 값과 교차 확인됩니다. 불일치는 조용히 수락되지 않고 검증 문제로 보고됩니다.
IAT(국제 ACH 거래) 배치 및 추가 레코드 유형 코드 10-18.
독립 실행
npm start서버는 MCP 프로토콜을 사용하여 stdio를 통해 통신합니다. 단독으로 대화형으로 실행하도록 만들어진 것이 아닙니다. 아래 설명된 대로 MCP 클라이언트를 통해 사용하세요.
Claude Code에 연결
프로젝트 디렉터리에서 빌드한 후:
claude mcp add nacha -- node "$(pwd)/dist/index.js"(Windows PowerShell에서: claude mcp add nacha -- node "$PWD\dist\index.js")
GitHub Copilot(VS Code)에 연결
사용하려는 프로젝트에 .vscode/mcp.json을 생성하고(이미 존재하는 경우 추가하고),
경로를 이 저장소의 클론에 대한 절대 경로로 바꾸세요:
{
"servers": {
"nacha": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/nacha-mcp/dist/index.js"]
}
}
}또는 명령 팔레트(Ctrl+Shift+P / ⇧⌘P)에서 MCP: Add Server를 실행하고,
Workspace를 선택한 다음 동일한 인수로 node를 가리키게 하세요 — VS Code가
동일한 .vscode/mcp.json을 자동으로 작성합니다.
저장한 후 Copilot Chat을 열고 Agent 모드로 전환하면 parse_nacha_file /
summarize_nacha_file 도구를 사용할 수 있습니다(VS Code가 필요 시 서버를 시작합니다).
Claude Desktop 또는 다른 MCP 클라이언트에 연결
클라이언트의 MCP 서버 구성(예: claude_desktop_config.json)에 항목을 추가하고,
경로를 이 저장소의 클론에 대한 절대 경로로 바꾸세요:
{
"mcpServers": {
"nacha": {
"command": "node",
"args": ["/absolute/path/to/nacha-mcp/dist/index.js"]
}
}
}구성을 추가한 후 클라이언트를 다시 시작하세요.
프로젝트 구조
src/constants.ts— SEC 코드, 거래 코드, ISO 국가/통화 조회.src/format.ts— 금액/날짜/시간 필드 파싱.src/parser.ts— 구조적 검증 및 레코드 파싱(파일/배치/항목/추가 레코드).src/validate.ts— 산술 검증(해시, 합계, 수).src/analyze.ts— 파싱과 산술 검증을 결합.src/summarize.ts— 요약 보기.src/index.ts— MCP 서버 및 도구 등록.
의도적으로 단위 테스트는 포함되지 않습니다 — 이 서버는 작고 쉽게 감사할 수 있는 상태로 유지되도록 설계되었습니다.
라이선스
MIT — LICENSE 참조.
Available Tools
2 toolsparse_nacha_fileParse NACHA/ACH fileA
Parses a NACHA (ACH) fixed-width file into structured JSON: file header, batches (header, entries with addenda, control), and file control. Validates record structure and cross-checks entry hashes, debit/credit totals, and record counts, reporting any mismatches as issues.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the NACHA/ACH file on disk. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses validation behavior well: cross-checking record counts, hashes, and debit/credit totals, and reporting mismatches as 'issues'. It could add a bit more about error behavior for unreadable or malformed files, but the existing detail is substantial.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences, each carrying essential information: the first defines the output structure, the second the validation behavior. It is front-loaded with the core action and resource. No filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one parameter, no annotations, and no output schema, the description is remarkably complete: it lists the CSV JSON composition, the validation checks, and the reporting of issues. An agent can confidently call the tool knowing what input to provide and what to do with the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There is only one parameter and its schema description is 100% complete ('Absolute path to the NACHA/ACH file on disk'). The tool description does not add anything about the parameter beyond the schema, but with full schema coverage the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Parses') and resource ('NACHA/ACH fixed-width file') and names the output structure explicitly (file header, batches, control). It also distinguishes itself from sibling summarize_nacha_file by emphasizing structured JSON extraction plus validation rather than summarization.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description conveys the natural use case—get structured JSON from a NACHA file—but it does not explicitly contrast with summarize_nacha_file or state when the agent should choose parsing over summarizing. Usage context is implied clearly by the verb and output, but there is no explicit when/when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
summarize_nacha_fileSummarize NACHA/ACH fileA
Parses a NACHA (ACH) file and returns a condensed summary: batch count, total entries, total debit/credit amounts, SEC codes present, and validation issues, without dumping every field of every record.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the NACHA/ACH file on disk. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full safety burden. It clearly states it parses and returns a summary, implying a read-only operation, and notes that it reports validation issues. However, it does not explicitly state side-effect-free behavior or potential error conditions on malformed files.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, tightly packed sentence that front-loads the verb and resource, then enumerates specific output elements. No wasted words, and the critical exclusion is stated compactly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description adequately specifies its return content with field-level detail. It falls just short of being fully complete by not describing the result structure or behavior on invalid files, though those gaps are minor.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the single file_path parameter is well-documented in the schema. The description does not add meaning beyond the schema, which is fine at the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Parses... and returns') and explicitly lists the summary contents: batch count, total entries, total debit/credit amounts, SEC codes, and validation issues. The phrase 'without dumping every field of every record' clearly differentiates it from the sibling parse_nacha_file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly frames when to use this tool: when a condensed summary is desired rather than full record-level detail. The contrast 'without dumping every field' effectively communicates the when-not and implicitly routes to the sibling for detailed extraction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
parse_nacha_file - First observed
summarize_nacha_file
TDQS
Scored across 2 tools
The two tools have clearly different outputs—one returns the full parsed structure and one returns a condensed summary—so an agent can pick based on response size. There is mild overlap because both parse the file, but the naming and descriptions sufficiently differentiate their purposes.
Both tool names follow the same verb_noun_file pattern: parse_nacha_file and summarize_nacha_file. The naming is predictable, consistent, and accurately reflects the intent of each tool.
With only two tools, the server is intentionally narrow, but both tools serve a clear and distinct purpose for NACHA file handling. The count is slightly thin but not inappropriate given the focused read-only scope.
For a server focused on reading and validating NACHA files, the surface covers the essential workflows: full detailed parsing and condensed summarization. It could benefit from additional capabilities like file creation or export, but those seem outside its apparent scope.
Maintenance
Related MCP Connectors
Parse WebVTT, SRT, or TTML for conformance, timing, overlaps, line length, and reading speed.
Turn bank statement PDFs into categorized, balance-checked transactions and reports.
Turn bank statement PDFs, CSVs, XLSX and OFX into categorised transactions plus a summary.
Validate HMDA LAR files against CFPB edit checks for community banks and credit unions.
Related MCP Servers
- AlicenseAqualityDmaintenanceLet AI agents read, validate and acknowledge EDI documents. Parses raw X12 and EDIFACT interchanges into structured JSON, validates envelope integrity, produces plain-language summaries, and generates 997 Functional Acknowledgments.4MIT
- AlicenseNot gradedqualityDmaintenanceValidates financial documents and payment files (SEPA, UBL/Peppol, camt, ACH) entirely locally.49 npm1MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to parse, validate, summarize, and convert X12 EDI documents (such as 850 purchase orders and 810 invoices) into structured JSON through callable MCP tools.-
- FlicenseBqualityAmaintenanceEnables local inspection of synthetic ACH files by parsing fixed-width records, validating structure and control totals, explaining findings, masking sensitive fields, repairing derived controls, and generating deterministic test files. All work happens on-device with no bank or network transmission.10-