
Data Cleaner Agent
io.github.wesseltlPublished by GitHub account wesseltlv0.1.3Updated Oct 24, 2026
Clean messy CSVs: an LLM picks the steps, tested code does the work. Data untouched by the model.
Overview
A local MCP server that cleans messy CSV text with tested Python transformations, returning the cleaned CSV plus a step-by-step report.
- What you can do
- Clean CSV text: run header normalization, whitespace trimming, numeric coercion, date standardization, category standardization and duplicate removal, returning the cleaned CSV and a report of what each step did, including values that could not be parsed cleanly.
- When to use it
- Useful when an assistant receives messy CSV data with inconsistent headers, mixed date formats, currency-formatted numbers or duplicate rows, and you want it cleaned by deterministic code rather than reformatted token by token in the prompt.
- Requirements
- Runs as a local process; install the PyPI package with the mcp extra and start it with python -m cleaner.mcp_server. Works offline with no API key by default; the optional LLM planner needs the llm extra and an ANTHROPIC_API_KEY environment variable.
Installation
In SourceWeft
- Open Data Cleaner Agent in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
data-cleaner-agent
Clean a messy CSV with an agentic workflow. An LLM decides which cleaning steps the data needs, and tested Python functions do the actual work. The model plans the cleanup, it never touches your data values, so nothing gets hallucinated or silently rewritten.
Works offline out of the box (no API key). Can be driven by an LLM, and other AI agents can call it as an MCP tool.
Before / after
In one pass it fixed the headers, trimmed whitespace, parsed three different date formats to ISO,
turned €1.200,50 / $900 / € 750,00 into numbers, standardized the country names, and dropped the
duplicate Alice row.
Install & run
No API key needed. The default planner is a set of offline heuristics.
The idea
An "agentic workflow" is just software with a few parts:
The decision that makes it safe to trust:
The planner decides which tool runs on which column. The tools do the transformation. A language model is good at judgment ("this column looks like money") and bad at being a reliable calculator. So the LLM only ever picks operations from a fixed set. It never reads a value and writes back a "cleaned" one, which is where LLM data-cleaning usually goes wrong.
Two planners, one loop
Both return the same list of steps, so the loop is identical. You swap the brain, not the plumbing.
The log reports what each step actually did, including where a conversion could not produce a clean result (unparseable numbers/dates, unmapped categories), so a clean parse is distinguishable from a confident guess.
Use it from other code or agents
As an MCP tool (Claude Desktop)
Other AI agents can call the cleaner as a tool, so they clean a CSV properly instead of reformatting it token by token in the prompt. Three steps:
1. Install it
2. Add it to your client's config (Claude Desktop's config lives at
~/Library/Application Support/Claude/claude_desktop_config.json on macOS, or
%APPDATA%\Claude\claude_desktop_config.json on Windows):
3. Restart Claude Desktop. The agent now has a clean_csv tool that takes CSV text and returns the
cleaned CSV plus a report of what it did.
Use it with other MCP clients
The same server works in any MCP client, only the config differs. The command is
python -m cleaner.mcp_server.
Cursor — ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project), hot-reloads:
VS Code / GitHub Copilot — .vscode/mcp.json. Note the different key (servers, not mcpServers)
and the required type. Tools only run in Copilot Agent mode:
Windsurf — ~/.codeium/windsurf/mcp_config.json (create it if missing):
Cline — add it from the extension's MCP settings panel in VS Code.
Understanding the report
The tool doesn't just hand back tidy data, it tells you what each step actually did, including where it couldn't get a clean result, so you can tell a clean parse from a confident guess:
So instead of silently dropping a value or leaving a wrong category, it surfaces it, and you know exactly which cells to double-check.
What's in the box
cleaner/tools.py holds the transformations: snake_case_headers, strip_whitespace,
coerce_numeric, standardize_dates, standardize_categorical, drop_duplicate_rows.
Take standardize_dates. 2023-01-05 (year first, month in the middle) and 05/01/2023 (day first)
need opposite parsing rules, and one global setting corrupts one or the other, so the tool decides per
value. Mixed dates are genuinely ambiguous, and this handles them explicitly instead of guessing.
Tests
License
MIT.
Source: README.md at commit 0623109
Tools
0Version history
1- v0.1.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts