TextClean MCP
Free deterministic PDF, Markdown, citation, invisible-character, and formatting cleanup for agents.
Should I use this
Quality & Safety
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"textclean": {
"url": "https://textclean.org/mcp/free"
}
}
}Remote endpoints
https://textclean.org/mcp/freestreamable-httpWhat it can do
Tool inventory
Tools (1)
⚪clean_text(text, destination, preset, stripMarkdown, removeCitations, ...)
Clean supplied text deterministically without rewriting its meaning. Use for copied PDF text, Markdown/HTML artifacts, citations, spacing, or destination formatting; not OCR, file uploads, grammar correction, or AI-authorship detection. Preserves supported document structure unless a selected cleanup removes it. Returns cleanedText, destination-rendered text, optional html, a changes list, and usage counters as structured JSON and matching JSON text. No API key required. 20 calls per UTC day per network address; shared networks share this allowance. Service-wide load protection can return HTTP 429; honor Retry-After. Maximum 20000 UTF-16 code units per call. Accepted processing attempts consume quota, including repeats. Input and results are processed remotely in memory, not stored or logged; only quota metadata is retained. Validation and quota failures return errors. Example: {"text":"A split para-\ngraph.","preset":"pdf","destination":"email"}.
Input Schema
{
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 20000,
"pattern": "\\S",
"description": "Required nonblank source text, not a URL or file path. Length is measured in UTF-16 code units. Send only text you intend this remote service to process."
},
"destination": {
"description": "Output rendering, default preserve. preserve retains heading/quote markers and inline Markdown in text; other modes remove those markers, with bullet/numbered lists retained. email wraps HTML in a div; blog in an article; message and document return unwrapped semantic HTML; plain omits HTML. Does not change cleaning options.",
"type": "string",
"enum": [
"preserve",
"email",
"message",
"blog",
"document",
"plain"
]
},
"preset": {
"description": "Cleaning preset, default default: trim, collapse repeated spaces/blank lines, NFC Unicode. pdf also repairs hard wraps/hyphens and removes detected page numbers/edges. ai strips Markdown artifacts, not AI authorship. html removes HTML tags/scripts/styles and decodes entities. list removes blank/duplicate lines and sorts lines. Explicit flags override preset settings.",
"type": "string",
"enum": [
"default",
"pdf",
"ai",
"html",
"list"
]
},
"stripMarkdown": {
"description": "Override Markdown artifact removal, including headings/list markers, emphasis, link markup, and code fences. Omit to use the preset: true for ai, false otherwise. May remove structure; false does not disable destination rendering of Markdown.",
"type": "boolean"
},
"removeCitations": {
"description": "Remove recognized numbered brackets, footnote markers, and compact author-year citations. Default false for every preset. May remove meaningful references; enable only when requested.",
"type": "boolean"
},
"replaceLongDashes": {
"description": "Replace em/en dashes with the selected punctuation or space. Default preserve. Replacement normalizes surrounding whitespace and may join adjacent line breaks.",
"type": "string",
"enum": [
"preserve",
"hyphen",
"comma",
"colon",
"space"
]
}
},
"required": [
"text"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Output Schema
{
"type": "object",
"properties": {
"destination": {
"type": "string",
"enum": [
"preserve",
"email",
"message",
"blog",
"document",
"plain"
],
"description": "Selected rendering destination."
},
"cleanedText": {
"type": "string",
"description": "Text after selected cleanup, before destination rendering."
},
"text": {
"type": "string",
"description": "Destination-rendered text suitable for copying."
},
"html": {
"description": "Rendered semantic HTML. Omitted for plain destination.",
"type": "string"
},
"changes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "Human-readable transformation name."
},
"count": {
"type": "number",
"description": "Number of changes reported for this transformation."
}
},
"required": [
"label",
"count"
],
"additionalProperties": false
},
"description": "Applied transformations; empty when no cleanup changed the source."
},
"usage": {
"type": "object",
"properties": {
"calls": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Calls consumed in the current allowance window, including this call."
},
"remaining": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Calls remaining in the current allowance window."
},
"plan": {
"description": "Present as free on the anonymous endpoint; omitted on the Pro endpoint.",
"type": "string",
"const": "free"
}
},
"required": [
"calls",
"remaining"
],
"additionalProperties": false,
"description": "Aggregate quota counters only; contains no API key or network address."
}
},
"required": [
"destination",
"cleanedText",
"text",
"changes",
"usage"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Community
Evidence