Home / Servers / Text Toolkit

Text Toolkit MCP server

Hashes, encodings, regex, diffs and counts, computed not guessed.

Forty-odd exact text utilities: hashing and HMAC, base64, hex, URL and HTML encoding, regex matching and replacing, unified diffs, case conversion, readability scores, Markdown and HTML conversion, UUIDs and random strings.

Why use the hosted one: A model guesses at a hash or a diff; these are calculated, bounded against hostile input, and all behind one connection.

Connect

Run in your terminal
claude mcp add --transport http hj-text https://mcp.hjlabs.in/mcp/text \
  --header "Authorization: Bearer YOUR_API_KEY"

Create an API key and put it in place of YOUR_API_KEY. Step-by-step guides: claude.ai and ChatGPT connectors, Claude Code, Cursor, VS Code, Claude Desktop, Windsurf, Zed, OpenAI Codex CLI, Gemini CLI.

All 43 tools

ToolWhat it does
count_textCount characters (with and without spaces), words, sentences, paragraphs and lines in a text, with an estimated reading and speaking time. Use before summarising or checking length limits.
change_caseConvert text or an identifier between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, path/case, Title Case, Sentence case, UPPER and lower. Splits existing camel/snake/kebab words correctly.
slugifyTurn a title into a URL slug: lowercase ASCII, accents removed, words joined with hyphens (or a separator you choose). Use for URLs, file names and ids.
sort_linesSort the lines of a text: alphabetical, natural (numbers in order: file2 before file10), numeric or by length; ascending or descending; optionally case-insensitive and with duplicates removed.
dedupe_linesRemove duplicate lines from a text, keeping the first occurrence and the original order. Optionally ignore case and surrounding whitespace. Reports how many were removed.
normalise_whitespaceClean up whitespace: trim lines, collapse runs of spaces and tabs to one space, collapse 3+ blank lines to one, convert Windows line endings, and optionally join all lines into one paragraph.
reverse_textReverse a text by characters (Unicode-safe), by words, or by lines.
regex_matchFind every match of a JavaScript regular expression in a text, with capture groups (numbered and named) and positions. Pattern up to 2 KB, text up to 200 KB; the g flag is implied.
regex_replaceReplace every match of a regular expression in a text. The replacement may use $1, $<name> and $& as in JavaScript. Returns the new text and the number of replacements.
regex_testCheck whether a regular expression matches a text at all, and show the first match. Also reports whether the pattern is valid, so use it to validate a pattern before using it elsewhere.
diff_textCompare two texts line by line and return a unified diff (like `diff -u`), plus counts of added and removed lines. Empty output means the texts are identical. Up to 5,000 lines each.
hash_textHash a text with MD5, SHA-1, SHA-256, SHA-384 or SHA-512 (UTF-8 input), as hex or base64. Use for checksums and fingerprints, not for passwords.
hmacCompute an HMAC signature of a message with a secret key, using SHA-1, SHA-256, SHA-384 or SHA-512. Use to sign or verify webhooks and API requests.
base64_encodeEncode text (UTF-8) as base64, standard or URL-safe (no padding). Use for data URLs, basic auth headers and JWT parts.
base64_decodeDecode base64 (standard or URL-safe, padded or not) to UTF-8 text. Non-text bytes are shown as hex instead.
hex_encodeEncode text (UTF-8) as lowercase hexadecimal, optionally with a separator between bytes.
hex_decodeDecode a hexadecimal string (spaces, colons and a 0x prefix are ignored) to UTF-8 text.
url_encodePercent-encode text for a URL. "component" encodes everything but unreserved characters (use for query values and path segments); "full" leaves URL syntax such as :/?#&= intact (use on a whole URL).
url_decodeDecode percent-encoded text (and + as space when asked), with a clear error on a malformed sequence.
html_escapeEscape text for safe inclusion in HTML: & < > " and ' become entities.
html_unescapeDecode HTML entities such as &amp;, &#65; and &#x1F600; back to characters.
html_to_markdownConvert an HTML document or fragment to readable Markdown: headings, links (made absolute with base_url), lists, code, tables and images. Navigation, scripts and styles are dropped.
strip_htmlRemove all HTML tags, scripts and styles from a text and decode entities, leaving plain text.
markdown_to_htmlConvert Markdown to HTML: headings, paragraphs, bold, italic, strikethrough, inline code, fenced code blocks, links, images, ordered and unordered lists (one level of nesting), blockquotes and horizontal rules. Raw HT…
unicode_inspectList every character in a short text with its code point (U+XXXX), UTF-8 bytes, UTF-16 units and general category. Use to find invisible, look-alike or combining characters.
uuid_generateGenerate one or more UUIDs: version 4 (random) or version 7 (time-ordered, sortable by creation time).
random_stringGenerate a cryptographically random string or password of a given length from a chosen alphabet: alphanumeric, letters, digits, hex, or "password" (letters, digits and symbols, with at least one of each).
number_to_wordsSpell out a number in English words, e.g. 1234.5 → "one thousand two hundred thirty-four point five". Up to quadrillions.
roman_numeralsConvert a number (1 to 3999) to a Roman numeral, or a Roman numeral back to a number.
readabilityScore how easy an English text is to read: Flesch Reading Ease, Flesch-Kincaid grade, Gunning Fog, Coleman-Liau and Automated Readability Index, with the underlying counts and a plain-language verdict.
extract_from_textPull email addresses, URLs, phone numbers, hashtags, @mentions, IPv4 addresses and numbers out of a text, de-duplicated and in order of appearance.
truncate_textShorten a text to a maximum number of characters or words without cutting a word in half, adding an ellipsis (or a suffix you choose) if anything was removed.
word_frequencyThe most frequent words in a text with counts and share, ignoring case and (by default) common English stop words. Use to see what a text is about or to find overused words.
lorem_ipsumGenerate placeholder Lorem ipsum text: a number of paragraphs with a number of sentences each, or a number of words. Deterministic, so the same request gives the same text.
caesar_cipherShift the letters of a text by a number of positions (Caesar cipher; shift 13 is ROT13). Use a negative shift, or the same shift with decode=true, to reverse it. Non-letters are left alone.
morse_codeTranslate text to Morse code or Morse code back to text. Letters are separated by spaces and words by " / ". Unknown characters are skipped and reported.
text_similarityHow alike two texts are: Levenshtein edit distance, a 0–1 similarity ratio, and word-level Jaccard overlap. Use for fuzzy matching, deduplication and typo detection. Up to 5,000 characters each.
wrap_textRe-wrap paragraphs to a maximum line width, keeping paragraph breaks. Optionally indent each line or prefix it (for quoting or commenting).
find_and_replaceReplace every occurrence of a plain string (not a regex) in a text, optionally ignoring case or matching whole words only. Returns the new text and the count.
line_numbersPrefix each line of a text with its line number, right-aligned, with a separator you choose. Handy for quoting code or pointing at a specific line.
text_to_binaryConvert text to its binary representation (8 bits per UTF-8 byte, space separated) or binary back to text.
compare_stringsCompare two strings exactly and explain any difference: where they first differ, trailing whitespace, line endings, invisible characters and Unicode normalisation. Use when two values "look the same" but are not equal.
generate_checklistTurn lines of text into a Markdown checklist, numbered list or bullet list, trimming existing bullets and numbers first.

Try asking

Give me the SHA-256 of "hello world" and a unified diff of these two config files.

Usage and limits

Every account gets a free daily allowance of tool calls; connecting, listing and searching are not counted. See the limits. Only a tool that runs costs a call.

Other hosted servers