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
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
| Tool | What it does |
|---|---|
count_text | Count 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_case | Convert 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. |
slugify | Turn 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_lines | Sort 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_lines | Remove 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_whitespace | Clean 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_text | Reverse a text by characters (Unicode-safe), by words, or by lines. |
regex_match | Find 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_replace | Replace 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_test | Check 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_text | Compare 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_text | Hash 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. |
hmac | Compute 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_encode | Encode text (UTF-8) as base64, standard or URL-safe (no padding). Use for data URLs, basic auth headers and JWT parts. |
base64_decode | Decode base64 (standard or URL-safe, padded or not) to UTF-8 text. Non-text bytes are shown as hex instead. |
hex_encode | Encode text (UTF-8) as lowercase hexadecimal, optionally with a separator between bytes. |
hex_decode | Decode a hexadecimal string (spaces, colons and a 0x prefix are ignored) to UTF-8 text. |
url_encode | Percent-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_decode | Decode percent-encoded text (and + as space when asked), with a clear error on a malformed sequence. |
html_escape | Escape text for safe inclusion in HTML: & < > " and ' become entities. |
html_unescape | Decode HTML entities such as &, A and 😀 back to characters. |
html_to_markdown | Convert 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_html | Remove all HTML tags, scripts and styles from a text and decode entities, leaving plain text. |
markdown_to_html | Convert 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_inspect | List 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_generate | Generate one or more UUIDs: version 4 (random) or version 7 (time-ordered, sortable by creation time). |
random_string | Generate 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_words | Spell out a number in English words, e.g. 1234.5 → "one thousand two hundred thirty-four point five". Up to quadrillions. |
roman_numerals | Convert a number (1 to 3999) to a Roman numeral, or a Roman numeral back to a number. |
readability | Score 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_text | Pull email addresses, URLs, phone numbers, hashtags, @mentions, IPv4 addresses and numbers out of a text, de-duplicated and in order of appearance. |
truncate_text | Shorten 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_frequency | The 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_ipsum | Generate 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_cipher | Shift 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_code | Translate 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_similarity | How 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_text | Re-wrap paragraphs to a maximum line width, keeping paragraph breaks. Optionally indent each line or prefix it (for quoting or commenting). |
find_and_replace | Replace 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_numbers | Prefix 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_binary | Convert text to its binary representation (8 bits per UTF-8 byte, space separated) or binary back to text. |
compare_strings | Compare 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_checklist | Turn 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.