cleantextlab-mcp
v2.0.1
Published
24 deterministic text tools for AI agents — URL sanitizer, JSON/SQL/YAML formatters, hex/base64/hash, token counter, cron explainer, and more. Runs locally over stdio; no API key, no network.
Maintainers
Readme
cleantextlab-mcp
24 deterministic text tools your agent can call instead of guessing.
An LLM asked to hex-encode a string, strip tracking params from 40 URLs, or count tokens will approximate the answer. These tools compute it. Same code as cleantextlab.com, packaged as an MCP server that runs on your machine.
No API key. No network. No telemetry. Text you pass in never leaves the process.
Install
Claude Code
claude mcp add cleantextlab -- npx -y cleantextlab-mcpClaude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"cleantextlab": {
"command": "npx",
"args": ["-y", "cleantextlab-mcp"]
}
}
}Cursor / Windsurf / Zed / any stdio client — same command + args in that client's MCP settings.
Requires Node 18+.
What you can ask for once it's installed
Clean the tracking junk off these links before I paste them in the newsletter.
sanitize-url strips utm_*, fbclid, gclid, si, trk, mkt_tok and friends; canonicalizes youtu.be/…?si=x to youtube.com/watch?v=…; reduces an Amazon product link to its bare ASIN; unwraps Google/Facebook/LinkedIn/DuckDuckGo redirect wrappers. One URL per line, as many as you like.
How many tokens is this before I stuff it into the context window?
token-counter — o200k_base encoding, returns a number, not an estimate.
Format this SQL / pretty-print this JSON / turn this YAML into JSON.
sql-format, json-format, yaml-json, csv-to-json — all auto-detect direction where it applies.
Pull every email address out of this support thread and dedupe them.
email-extract — validates, dedupes case-insensitively, sorts. Ask for csv if it's going into a spreadsheet.
What does
0 */6 * * 1-5actually mean?
cron-generator — plain English.
Give me the SHA-256 of this / 20 UUIDs / this IP range's broadcast address.
hash-generate, uuid-generator, subnet-calculator.
All 24 tools
| Tool | Does |
| --- | --- |
| sanitize-url | Strip tracking params, canonicalize YouTube, reduce Amazon to ASIN, unwrap redirects |
| token-counter | LLM token count (o200k_base) |
| word-count | Words, characters, sentences, paragraphs, reading time |
| json-format | Pretty-print JSON |
| sql-format | Format SQL (Standard, Postgres, MySQL) |
| yaml-json | YAML ↔ JSON |
| csv-to-json | CSV ↔ JSON |
| diff-checker | Unified diff of two blocks separated by --- |
| remove-line-breaks | Collapse newlines and whitespace to single spaces |
| remove-accents | é → e |
| sort-dedupe | Sort lines, drop case-insensitive duplicates |
| title-case | Title Case |
| email-extract | Extract, validate, dedupe emails (json / list / csv) |
| hex-convert | Text / base64 / numbers / colors / MAC / IP ↔ hex |
| base64 | Encode/decode, auto-detects |
| url-encode | Percent-encode/decode, auto-detects |
| hash-generate | SHA-1 / SHA-256 / SHA-512 |
| uuid-generator | v4 or v7, up to 1000 |
| subnet-calculator | IPv4/IPv6 CIDR details |
| timestamp-convert | Unix timestamp ↔ date (UTC) |
| cron-generator | Cron expression → English |
| roman-numerals | Number ↔ Roman |
| number-to-words | 100 → one hundred |
| ascii-tree | File paths → ASCII directory tree |
Every tool takes input (string). hash-generate also takes algorithm; email-extract takes format.
Hosted alternative
For a client that can't spawn a local process, the same 24 tools are served over Streamable HTTP at https://cleantextlab.com/api/mcp, gated by an API key (free: 10 calls/day; Pro: 5,000/day). Setup: https://cleantextlab.com/docs/mcp-setup
License
MIT
