achlens
Local-first ACH inspection server for synthetic files that validates, summarizes, parses, explains, generates, repairs, and compares ACH data without network transmission.
Validate ACH files and return structured findings with severity/rule filters and optional sensitive-field reveal.
Summarize ACH structure, totals, SEC codes, returns, and NOCs.
Parse named ACH fields in bounded pages, optionally filtering record types.
Explain stated versus recomputed batch and file control totals.
Check ABA routing-number check digits and look up ACH return, NOC, transaction, SEC, or service-class codes.
Generate balanced synthetic ACH test files with configurable SEC codes, batches, entries, addenda, prenotes, and injected errors.
Repair derived control records and diff two ACH files with masked field-level differences.
Report server status; sensitive fields are masked by default, and local path reads require configured allowed roots.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@achlens validate tests/fixtures/golden/sample_valid.ach"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Achlens
Achlens is a local-first Python MCP server and CLI for inspecting synthetic ACH files. It parses fixed-width records, validates structure and control totals, explains findings, masks sensitive fields, repairs derived controls, and generates deterministic test files. It never transmits ACH files or makes bank/network calls.
Use synthetic data only. This project is not a bank gateway, compliance advisor, or transmission system.
Quick Start
uv sync
uv run achlens --help
uv run achlens validate tests/fixtures/golden/sample_valid.ach
uv run achlens generate --sec PPD --entries 5 --seed 7 > synthetic.achIn Windows PowerShell, use an explicit ASCII encoding because PowerShell's
default > redirection can write UTF-16 output that is not valid ACH text:
uvx achlens generate --sec PPD --entries 5 --seed 7 |
Set-Content -Encoding ascii synthetic.achRun the MCP server over stdio:
uv run achlens serveRelated MCP server: @validatefin/mcp
MCP Client Setup
Install the published package with uvx; it starts the server locally over
stdio and does not transmit ACH files.
VS Code and Copilot
Create .vscode/mcp.json in your workspace:
{
"servers": {
"achlens": {
"type": "stdio",
"command": "uvx",
"args": ["achlens"]
}
}
}Claude Desktop
Add the following entry to the mcpServers object in Claude Desktop's MCP
configuration:
{
"achlens": {
"command": "uvx",
"args": ["achlens"]
}
}By default, MCP tools accept ACH content directly but cannot read local paths.
To allow read-only access to a specific directory, set
ACHLENS_ALLOWED_ROOTS in the server environment to that directory. Use
synthetic ACH data only.
The MCP server exposes validation, summaries, parsed-record paging, control explanations, routing checks, code lookup, synthetic generation, and control repair. See docs/tools.md for the current tool surface.
Sensitive fields are masked by default. Configure ACHLENS_ALLOWED_ROOTS to
enable MCP path inputs; otherwise provide file content directly. See
SECURITY.md for the data and write boundaries.
Development
This project uses uv.
uv sync
uv run achlens --help
PYTHONPATH=. uv run pytest -q
uv run ruff check .
uv run ruff format --check .
uv run mypy --strict srcWithout uv
The CLI and test suite also work with plain pip:
pip install -e . pytest
achlens --help
achlens validate tests/fixtures/golden/sample_valid.ach
achlens generate --sec PPD --entries 5 --seed 7
PYTHONPATH=. pytestSet PYTHONPATH=. from the repository root when running tests so fixture and
script imports resolve. In Windows PowerShell, use
$env:PYTHONPATH = "."; pytest.
Never add real payment data, account numbers, or ACH files to this repository.
Available Tools
10 toolscheck_routing_numberB
Check an ABA routing number's mathematical check digit.
Inputs: routing_number (required). Returns: object
diff_ach_files_toolB
Compare two ACH contents and return masked field-level differences.
Inputs: left_content, right_content, reveal_sensitive. Returns: object
explain_control_totalsC
Explain stated versus recomputed batch and file control totals.
Inputs: path, content, batch_number. Returns: object
generate_test_ach_fileA
Generate a balanced synthetic ACH file for testing, never transmission.
Inputs: seed, batches, sec_code, inject_errors, +6 more. Returns: object
lookup_ach_codeC
Look up a return, NOC, transaction, SEC, or service-class code.
Inputs: code (required), kind (required). Returns: object
parse_ach_fileC
Parse named ACH fields in a bounded page of records.
Inputs: path, limit, offset, content, +2 more. Returns: object
repair_control_records_toolC
Repair derived controls, returning content only in content mode.
Inputs: path, content, restore_trailing_spaces. Returns: object
server_statusA
Return the local achlens server status.
Inputs: no named parameters. Returns: object
summarize_ach_fileC
Summarize ACH structure, totals, SEC codes, returns, and NOCs.
Inputs: path, content, reveal_sensitive. Returns: object
validate_ach_fileC
Validate an ACH file and return structured findings and aggregate counts.
Inputs: path, content, rule_ids, min_severity, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct action or resource (validate, summarize, parse, explain, repair, diff, generate, lookup, check, status). Slight overlap exists between validate_ach_file, summarize_ach_file, and explain_control_totals regarding control totals, but their outputs and purposes are clearly differentiated by description.
Most names follow a consistent verb_noun snake_case pattern (e.g., validate_ach_file, parse_ach_file, check_routing_number). Two tools break this with a '_tool' suffix (repair_control_records_tool, diff_ach_files_tool), and server_status uses a noun_noun form, but overall the set is predictable.
10 tools is well within the ideal range for this domain. Each tool addresses a specific need—validation, parsing, summarization, code lookup, generation, repair, diff, and status—without redundancy or bloat.
The surface covers core ACH file operations: validation, parsing, summarization, control total explanation, code lookup, routing checks, test file generation, control repair, and diffing. Minor gaps exist for broader file editing or production file creation, but these may be outside the intended scope.
Maintenance
Related MCP Connectors
Create 94-character US NACHA ACH files (PPD, CCD, WEB) with ABA MOD-10 routing & batch hash checks
Validate HMDA LAR files against CFPB edit checks for community banks and credit unions.
Check ISO 20022 messages (pacs.008, pain.001, camt.053, seev.031) against schema and rules.
Normalize bank statements (CSV, camt, MT940, OFX, QIF) to JSON, analyze, export.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA local-first MCP server for financial wire message forensics, providing read-only tools to parse, validate, and detect SR2026 address compliance in ISO 8583, SWIFT MT, and ISO 20022 messages.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceValidates financial documents and payment files (SEPA, UBL/Peppol, camt, ACH) entirely locally.186 npm1MIT
- AlicenseAqualityCmaintenanceParses 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.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to explain, scrub and check ISO 20022 payment messages and SSI files entirely on the local machine, including CBPR+ readiness hints, lifecycle triage, IBAN/BIC validation and payment-vs-SSI checks against the user's own licensed reference data. Runs as a local stdio MCP server with no network calls, telemetry or bundled vendor data.MIT