Skip to main content
Glama
msuresh007

nacha-mcp

by msuresh007

nacha-mcp

NACHA/ACH ファイルの解析と検証を行う MCP (Model Context Protocol) サーバー。

要件

  • Node.js 18 以降

  • npm

Related MCP server: acmt001-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 にパースします: ファイルヘッダー、バッチ(ヘッダー、addenda 付きエントリ、コントロール)、ファイルコントロール。

  • summarize_nacha_file — NACHA ファイルをパースし、簡潔な要約を返します: バッチ数、エントリ総数、借方/貸方の合計金額、存在する SEC コード、検証上の問題。

どちらのツールも入力として file_path(ディスク上のファイルへの絶対パス)を 1 つ受け取ります。

パースには以下が含まれます:

  • 構造検証(レコード長、レコードタイプの順序、バッチヘッダー/コントロールの対応付け)。

  • 算術検証 — エントリハッシュ、借方/貸方の合計額、エントリ/addenda 件数は実際のエントリから再計算され、宣言されたバッチコントロールおよびファイルコントロールの値と照合されます。不一致は黙って受け入れられるのではなく、検証上の問題として報告されます。

  • IAT(International ACH Transaction)バッチと addenda タイプコード 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 — 構造的検証とレコード解析(ファイル/バッチ/エントリ/addenda)。

  • src/validate.ts — 算術的検証(ハッシュ、合計、件数)。

  • src/analyze.ts — パースと算術的検証の統合。

  • src/summarize.ts — 簡潔な要約ビュー。

  • src/index.ts — MCP サーバーとツールの登録。

ユニットテストは意図的に含まれていません。小さく、監査しやすいサーバーであり続けることを目的としています。

ライセンス

MIT — LICENSE を参照してください。

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    The fileAI MCP Server offers a robust set of tools to work with the fileAI file processing pipeline. It allows for uploading files, performing Optical Character Recognition (OCR), classifying documents, and extracting structured data. The server leverages the Model Context Protocol (MCP) to provide
    2
  • A
    license
    A
    quality
    A
    maintenance
    MCP server for ISO 20022 acmt.001 Account Opening (and companion acmt.* messages): message-type discovery, required-field lookup, JSON Schema introspection, IBAN/BIC/LEI validation, flat-record validation, and validated acmt XML generation.
    6
    1
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    Let 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.
    4
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server that extracts clean text, tables, and structured data from documents, images, code, and audio files, supporting 97 formats with OCR, transcription, and code intelligence.
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/msuresh007/nacha-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server