nacha-mcp

nacha-mcp

Parses NACHA/ACH files into structured JSON and summaries, performing structural and arithmetic validation with IAT support, enabling automated file inspection and validation through MCP clients.

Category
访问服务器

README

nacha-mcp

An MCP (Model Context Protocol) server for parsing and validating NACHA/ACH files.

Requirements

  • Node.js 18 or later
  • npm

Setup

git clone https://github.com/msuresh007/nacha-mcp.git
cd nacha-mcp
npm install
npm run build

This compiles src/ to dist/. Re-run npm run build after pulling any updates.

Try it out

A small, arithmetically-valid sample file is included at examples/sample.ach. Once built, you can run either tool directly from the command line without an MCP client, to confirm everything works:

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))"

You should see "valid": true with an empty issues array, one batch, and one entry.

Tools

  • parse_nacha_file — Parses a NACHA file at a given path into full structured JSON: file header, batches (header, entries with addenda, control), and file control.
  • summarize_nacha_file — Parses a NACHA file and returns a condensed summary: batch count, total entries, total debit/credit amounts, SEC codes present, and validation issues.

Both tools take a single input, file_path, an absolute path to the file on disk.

Parsing includes:

  • Structural validation (record length, record type ordering, batch header/control pairing).
  • Arithmetic validation — entry hash, debit/credit totals, and entry/addenda counts are recomputed from the actual entries and cross-checked against the declared Batch Control and File Control values. Mismatches are reported as validation issues rather than silently accepted.
  • IAT (International ACH Transaction) batches and addenda type codes 10-18.

Running standalone

npm start

The server communicates over stdio using the MCP protocol; it's not meant to be run interactively on its own. Use it through an MCP client as described below.

Connect to Claude Code

From the project directory, after building:

claude mcp add nacha -- node "$(pwd)/dist/index.js"

(On Windows PowerShell: claude mcp add nacha -- node "$PWD\dist\index.js")

Connect to GitHub Copilot (VS Code)

Create .vscode/mcp.json in the project you want to use it from (or add to it if it already exists), replacing the path with the absolute path to your clone of this repo:

{
  "servers": {
    "nacha": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/nacha-mcp/dist/index.js"]
    }
  }
}

Alternatively, run MCP: Add Server from the Command Palette (Ctrl+Shift+P / ⇧⌘P), choose Workspace, and point it at node with the same args — VS Code writes the same .vscode/mcp.json for you.

Once saved, open Copilot Chat, switch to Agent mode, and the parse_nacha_file / summarize_nacha_file tools will be available (VS Code starts the server on demand).

Connect to Claude Desktop or another MCP client

Add an entry to the client's MCP server config (e.g. claude_desktop_config.json), replacing the path with the absolute path to your clone of this repo:

{
  "mcpServers": {
    "nacha": {
      "command": "node",
      "args": ["/absolute/path/to/nacha-mcp/dist/index.js"]
    }
  }
}

Restart the client after adding the config.

Project layout

  • src/constants.ts — SEC codes, transaction codes, ISO country/currency lookups.
  • src/format.ts — money/date/time field parsing.
  • src/parser.ts — structural validation and record parsing (file/batch/entry/addenda).
  • src/validate.ts — arithmetic validation (hashes, totals, counts).
  • src/analyze.ts — combines parsing and arithmetic validation.
  • src/summarize.ts — condensed summary view.
  • src/index.ts — MCP server and tool registration.

No unit tests are included by design — this is meant to stay a small, easily auditable server.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选