echo-check-mcp
This MCP server checks fixed-width files for duplicate records using YAML layout configs and can also produce a Claude-written summary.
List available layout configs (
list_configs).Describe a config’s record layout, filter, batch settings, sensitive fields, and duplicate rules (
describe_layout).Run a duplicate check on a file and return structured groups with line numbers, masked keys, counts per rule, bad lines, and batch breakdown (
check_duplicates).Run a fresh check and return a short plain-English summary with headline, likely cause, affected batches, and suggested action (
check_and_summarize).Sensitive fields are masked, file access is restricted to allowed directories, and checks are read-only.
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., "@echo-check-mcp check data/sample for duplicate records using the configured layout"
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.
echo-check-mcp
Find duplicate records in fixed-width files, such as NACHA (ACH) payment files.
The file layout and the duplicate rules live in a YAML config, not in code.
It runs as a command (dupcheck) and as an MCP server, so Claude can check
files for you. An optional summary from Claude explains what it found.
This is the running example for the course Build a Config-Driven MCP Server. All data in this project is synthetic.
Quick start (2 minutes)
You need uv. Then:
git clone https://github.com/zeusydev-lang/echo-check-mcp
cd echo-check-mcp
uv sync
uv run dupcheck data/sample.ach --config configs/nacha.yaml --out data/results.jsonYou'll see something like this:
Checked 36 records out of 50 lines in data\sample.ach (config nacha_entry), 0 bad line(s).
exact_line: 1 group(s), 2 lines
trace_number: 2 group(s), 4 lines
same_payment: 10 group(s), 20 lines
near_amount: 1 group(s), 2 linesdata/results.json has every duplicate group with line numbers and masked
values, plus a per-batch breakdown. Make more test files with the generator:
uv run python generator/generate_nacha.py --out data/big --seed 7 --batches 10 --entries 500Related MCP server: Remote Link Local MCP
The config
One YAML file describes a file format. configs/nacha.yaml
is the full example:
name: nacha_entry
record_length: 94 # every line must be this long
filter: {field: record_type, equals: "6"} # only check entry records
batch: {header_starts_with: "5", id_start: 88, id_length: 7} # optional
fields: # positions are 1-based
- {name: record_type, start: 1, length: 1}
- {name: account, start: 13, length: 17, normalize: strip, sensitive: true}
- {name: amount, start: 30, length: 10, normalize: int}
- {name: individual_id, start: 40, length: 15, normalize: strip, sensitive: true}
# ...
duplicate_rules:
- {name: exact_line, keys: [_line]} # the whole line
- {name: same_payment, keys: [account, amount, individual_id]}
- {name: near_amount, keys: [account, individual_id],
tolerance: {field: amount, max_diff: 500}} # 0 < diff <= 500Setting | Meaning |
|
|
| Masked in every result, for example |
| Records with equal values for all keys are duplicates. |
| Group by |
| Skip lines that don't match, such as headers. |
| Where batch headers are, so results can say which batches are involved. |
Mistakes are reported all at once, in plain sentences, for example
fields 'account' (13-29) and 'amount' (29-38) overlap. The details are in
Module 2.
Privacy
Local first. Files are read on your machine. The MCP server talks over stdio and doesn't listen on the network.
Masked by default. Sensitive fields are masked in every result. The MCP tools have no way to turn masking off. The
dupcheckcommand has--unmaskedfor your own local investigation.The LLM sees counts, not data. The summary gets counts, the per-batch breakdown and a few masked sample groups. A test checks that no account number, employee ID or name from the sample file reaches the request.
Closed by default. The MCP server only reads files under the folders in
ECHO_CHECK_ALLOWED_DIRS. If the variable isn't set, every file is refused.
MCP setup
Tools: list_configs, describe_layout, check_duplicates and check_and_summarize.
Claude Desktop. Open Settings → Developer → Edit Config and add:
{
"mcpServers": {
"echo-check": {
"command": "uv",
"args": ["--directory", "C:\\path\\to\\echo-check-mcp", "run", "echo-check-mcp"],
"env": {
"ECHO_CHECK_ALLOWED_DIRS": "C:\\path\\to\\echo-check-mcp\\data",
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}Fully quit and restart Claude Desktop, then ask "Check data\sample.ach for
duplicates with the nacha config." The API key is only needed for
check_and_summarize. In JSON, every \ in a Windows path must be doubled.
MCP Inspector (for testing; needs Node.js):
npx @modelcontextprotocol/inspector -e ECHO_CHECK_ALLOWED_DIRS=C:\path\to\echo-check-mcp\data uv --directory C:\path\to\echo-check-mcp run echo-check-mcpMore detail is in Module 4.
Summary from Claude
# .env (Git ignores it): ANTHROPIC_API_KEY=sk-ant-...
uv run --env-file .env dupcheck data/sample.ach --config configs/nacha.yaml --summaryClaude returns headline, likely_cause, affected_batches and
suggested_action, for example "Batch 4 looks like a resend of batch 3: 8 of
the 10 same-payment duplicate groups link batch 3 and batch 4." The model is
ECHO_CHECK_MODEL (default claude-opus-5-5). Batches the data doesn't contain
are removed from the answer.
Evals
uv run python evals/run_evals.py # detection, no API key
uv run --env-file .env python evals/run_evals.py --judge # + summary checks (API calls)It generates seeded files and scores each rule's precision and recall against the answer keys. It also checks that every number in a summary comes from the data. The exit code is 1 if an exact rule drops below 100%. CI runs the detection evals on every push.
Development
uv run pytest # all tests, no API calls
uvx ruff check src tests evals # lint
uv run --group docs mkdocs serve # course site at http://127.0.0.1:8000Quit Claude Desktop and the MCP Inspector before uv add or uv sync on
Windows. A running server locks echo-check-mcp.exe.
License
MIT. See LICENSE.
Available Tools
4 toolscheck_and_summarizeA
Run a fresh duplicate check on a file and return a short written summary.
Use this when the user wants an overview (what happened, likely cause, next step) rather than line-level detail. It does NOT read earlier results; it re-checks the file itself, so there is no need to call check_duplicates first. Use check_duplicates when you need specific lines or groups. Claude sees only counts, the batch breakdown and masked samples. Needs ANTHROPIC_API_KEY; makes one paid LLM call.
Inputs: file_path (required), config_name (required). Returns: The summary plus anything our own checks noticed.
check_duplicatesA
Find duplicate records in a fixed-width file and return structured results.
Use this when you need the actual duplicate groups: line numbers, masked
keys, counts per rule. Use check_and_summarize instead when the user wants
a plain-English overview. Do not call both for the same question.
Read-only; sensitive values are masked. Up to max_groups groups per rule;
truncated is true when more exist.
Inputs: file_path (required), config_name (required), max_groups. Returns: A check result small enough to hand to an assistant.
describe_layoutB
Show a config's record layout, filter and duplicate rules.
Positions are 1-based. Fields marked sensitive are masked in results.
Inputs: config_name (required). Returns: A whole config: the record layout plus the duplicate rules.
list_configsA
List the layout configs this server can check files with.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
check_duplicates and check_and_summarize overlap in underlying function, but their descriptions explicitly delineate output shape (structured groups vs. prose overview) and instruct against calling both. describe_layout and list_configs are clearly distinct (metadata vs. discovery). Minor residual risk that an agent picks the wrong one for an ambiguous 'check this file' request.
All four names follow a clean verb_noun snake_case convention: check_duplicates, check_and_summarize, describe_layout, list_configs. The verb choice (check/describe/list) maps intuitively to action type.
Four tools is a tight, well-scoped surface for a focused duplicate-checking server; each has a clear role. The pair check_duplicates/check_and_summarize is the only arguable redundancy, keeping it just short of ideal.
Discovery (list_configs), introspection (describe_layout), detailed results (check_duplicates), and narrative output (check_and_summarize) cover the core lifecycle. Gaps are minor: no way to validate a config, request unmasked or full record payloads, or control output beyond max_groups.
Maintenance
Related MCP Connectors
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Read-only MCP for identity resolution and write guardrails.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables accessing and managing files from configured folders with filtering and size limits, allowing listing, reading, and searching files via MCP tools and resources.3-
- AlicenseAqualityBmaintenanceEnables MCP clients to access a local computer through a controlled, permission-based tool surface for read-only or developer-mode file, process, and terminal operations.6MIT
- AlicenseAqualityBmaintenanceEnables users to search files and directories through an MCP interface.1MIT
- AlicenseAqualityBmaintenanceEnables users to import, query, edit, audit, and export local personal records through schema-driven MCP tools while masking sensitive fields by default.8MIT