Skip to main content
Glama
nacha-mcp

nacha-mcp

by msuresh007

nacha-mcp

Ein MCP-Server (Model Context Protocol) zum Parsen und Validieren von NACHA/ACH-Dateien.

Voraussetzungen

  • Node.js 18 cuốn oder neuer

  • npm

Related MCP server: achlens

Einrichtung

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

Das kompiliert src/ nach dist/. Führen Sie npm run build erneut aus, nachdem Sie Aktualisierungen gezogen haben.

Ausprobieren

Eine kleine, arithmetisch gültige Beispieldatei ist unter examples/sample.ach enthalten. Nach dem Erstellen können Sie beide Tools direkt von der Befehlszeile aus ohne MCP-Client ausführen, um zu bestätigen, dass alles funktioniert:

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

Sie sollten "valid": true mit einem leeren issues-Array, einem Batch und einem Eintrag sehen.

Tools

  • parse_nacha_file — Parst eine NACHA-Datei unter dem angegebenen Pfad in ein vollständiges strukturiertes JSON: Dateikopf, Batches (Kopf, Einträge mit Addenda, Kontrollsatz) und Dateikontrolle.

  • summarize_nacha_file — Parst eine NACHA-Datei und gibt eine kompakte Zusammenfassung zurück: Batch-Anzahl, Gesamtzahl der Einträge, Soll-/Haben-Gesamtbeträge, vorhandene SEC-Codes und Validierungsprobleme.

Beide Tools akzeptieren genau eine Eingabe, file_path — einen absoluten Pfad zur Datei auf der Festplatte.

Das Parsen umfasst:

  • Strukturvalidierung (Datensatzlänge, Reihenfolge der Datensatztypen, Zuordnung von Batch-Kopf und Batch-Kontrollsatz).

  • Arithmetische Validierung — Der Entry-Hash, die Soll-/Haben-Gesamtbeträge und die Anzahl der Einträge/Addenda werden aus den tatsächlichen Einträgen neu berechnet und mit den angegebenen Werten des Batch Control und des File Control abgeglichen. Abweichungen werden als Validierungsprobleme gemeldet und nicht stillschweigend akzeptiert.

  • IAT (International ACH Transaction) Batches und Addenda-Typcodes 10-18.

Eigenständige Ausführung

npm start

Der Server kommuniziert über stdio mit dem MCP-Protokoll; er ist nicht dafür gedacht, eigenständig interaktiv ausgeführt zu werden. Verwenden Sie ihn wie unten beschrieben über einen MCP-Client.

Mit Claude Code verbinden

Aus dem Projektverzeichnis, nach dem Bau:

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

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

Mit GitHub Copilot verbinden (VS Code)

Erstellen Sie .vscode/mcp.json in dem Projekt, aus dem Sie es verwenden möchten (oder erweitern Sie die Datei, falls sie bereits existiert), und ersetzen Sie den Pfad durch den absoluten Pfad zu Ihrem Klon dieses Repos:

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

Alternativ starten Sie MCP: Add Server über die Befehlspalette (Ctrl+Shift+P / ⇧⌘P), wählen Sie Workspace und verweisen Sie es auf node mit denselben Argumenten — VS Code schreibt die entsprechende .vscode/mcp.json für Sie.

Nach dem Speichern öffnen Sie den Copilot Chat, wechseln Sie in den Agent-Modus, und die Tools parse_nacha_file / summarize_nacha_file sind verfügbar (VS Code startet den Server bei Bedarf).

Mit Claude Desktop oder einem anderen MCP-Client verbinden

Fügen Sie einen Eintrag zur MCP-Serverkonfiguration des Clients hinzu (z. B. claude_desktop_config.json) und ersetzen Sie den Pfad durch den absoluten Pfad zu Ihrem Klon dieses Repos:

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

Starten Sie den Client nach dem Hinzufügen der Konfiguration neu.

Projektstruktur

  • src/constants.ts — SEC-Codes, Transaktionscodes, ISO-Länder-/Währungs-Lookups.

  • src/format.ts — Parsen von Geld-, Datums- und Zeitfeldern.

  • src/parser.ts — Strukturelle Validierung und Satzparsing (Datei/Batch/Eintrag/Addenda).

  • src/validate.ts — Arithmetische Validierung (Hashes, Summen, Anzahl).

  • src/analyze.ts — Kombiniert Parsing und arithmetische Validierung.

  • src/summarize.ts — Kompakte Zusammenfassung.

  • src/index.ts — MCP-Server und Tool-Registrierung.

Absichtlich sind keine Unit-Tests enthalten — der Server soll ein kleiner, leicht prüfbarer Server bleiben.

Lizenz

MIT — siehe LICENSE.

Available Tools

2 tools
parse_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.

Inputs: file_path (required).

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.

Inputs: file_path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 2 tools

    Disambiguation4/5

    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.

    Naming Consistency5/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      -
    • F
      license
      B
      quality
      B
      maintenance
      Enables 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
      93 PyPI
      -
    • A
      license
      A
      quality
      C
      maintenance
      MCP server that validates and writes DATEV-Format (EXTF) files: Buchungsstapel (booking batches) and Debitoren/Kreditoren (customer and supplier master data). Ask your AI assistant why DATEV rejected an import, or have it turn a list of bookings into a file DATEV accepts.
      4
      55 npm
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables converting PDFs and CSV/spreadsheet files into spreadsheets, extracting bank statement or receipt data into clean CSV, cleaning messy CSV, and generating client-ready reports through an open MCP endpoint.
      -