Clean Paste AI — Text, Unicode & Markdown Cleaner

v1.0.0
io.github.cleanpasteai/clean-paste-ai Checked 1 day ago Published 2 days ago

Detect & remove 450+ invisible Unicode chars, em-dashes, and Markdown via free Streamable HTTP MCP.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

scan_text_residue Scan Text for Invisible Unicode & Punctuation Residue

Inspect text for 450+ invisible/hidden Unicode characters (zero-width spaces, narrow no-break spaces U+202F, Unicode tag characters, bidi controls) and em-dash / smart-quote counts without modifying the text. Reports objective character residue only (not statistical sampling watermark detection).

ParameterTypeDescription
text *stringThe text to inspect (up to 200,000 characters).
include_cjk_punctuationbooleanOptional. When true, also counts CJK full-width quotation marks and dashes in punctuation stats. Defaults to false.

clean_invisible_text Clean Invisible Unicode Characters & Em-Dashes

Remove 450+ invisible/hidden Unicode characters from pasted AI or web text while protecting composite Emoji (ZWJ/FE0F), RTL script marks, CJK punctuation, and code blocks. Optionally replaces em-dashes (—) and curly smart quotes in the same pass.

ParameterTypeDescription
text *stringThe text to clean (up to 200,000 characters).
em_dash_stylestringHow to replace em-dashes when normalize_punctuation is true: "spaced-hyphen" (" - ", default), "comma" (", "), "space" (" "), or "hyphen" ("-").
normalize_cjk_punctuationbooleanWhen true, also normalize CJK punctuation marks. Defaults to false (protects CJK punctuation).
normalize_punctuationbooleanReplace em-dashes, en-dashes, curly smart quotes, and ellipsis outside code blocks. Defaults to false.
normalize_unicodebooleanNormalize Unicode to NFC form. Defaults to true.
normalize_whitespacebooleanCollapse redundant inline spaces while preserving code indentation. Defaults to true.
preserve_paragraphsbooleanKeep blank lines between paragraphs. Defaults to true.
remove_invisiblebooleanRemove hidden Unicode characters. Defaults to true.

strip_markdown Strip Markdown to Clean Plain Text, Docs HTML, or Sheets TSV

Clean Markdown via AST parsing while protecting code blocks and LaTeX math, stripping ChatGPT/Perplexity citation markers, and optionally removing invisible Unicode characters and em-dashes. Supports Plain text, Docs & Word (clean semantic HTML without gray shading), and Sheets & Excel (TSV tables) presets.

ParameterTypeDescription
markdown *stringMarkdown input text (up to 200,000 characters).
bullet_charstringBullet character for unordered lists (e.g. "•", "-", or ""). Defaults to "•".
em_dash_stylestringEm-dash replacement style when normalize_punctuation is true. Defaults to "spaced-hyphen".
include_htmlbooleanInclude clean semantic HTML (for Word/Google Docs paste without gray shading). Automatically true when preset is "docs".
keep_link_urlbooleanKeep URLs in parentheses like "label (https://...)". Defaults to false (keeps link text only).
normalize_punctuationbooleanAlso replace em-dashes and smart quotes outside code blocks. Defaults to false.
presetstringOutput preset: "plain" (clean plain text, default), "docs" (also returns clean transparent-background HTML for Word/Google Docs), or "sheets" (TSV-formatted tables for Excel/Sheets).
strip_citationsbooleanStrip AI chat citation markers (such as [1], citeturn0search1) outside code blocks. Defaults to true.
strip_invisiblebooleanAlso remove invisible Unicode characters in the same pass. Defaults to true.

html_to_clean_markdown Convert Pasted Rich HTML to Clean Markdown

Convert rich HTML copied from ChatGPT, Google Docs, Word, or web pages into clean, shading-free Markdown, optionally stripping invisible Unicode characters in the same pass.

ParameterTypeDescription
html *stringRaw HTML string to convert (up to 200,000 characters).
em_dash_stylestringEm-dash replacement style when normalize_punctuation is true. Defaults to "spaced-hyphen".
normalize_punctuationbooleanAlso replace em-dashes and smart quotes outside code blocks. Defaults to false.
strip_invisiblebooleanAlso remove invisible Unicode characters from the resulting Markdown. Defaults to true.