Skip to main content
Python

Text Utils

v0.2.2
20

@nimblebraininc/text-utils

Text manipulation toolkit with reverse, case conversion, slugify, URL extraction, truncation, and token counting

python

README

MCP Text Utils

A text manipulation toolkit for the Model Context Protocol (MCP). Provides 7 tools for common text operations.

Tools

ToolDescription
reverse_textReverse the characters in a text string
text_infoAnalyze text: word count, character breakdown, line count
transform_caseConvert between snake_case, camelCase, kebab-case, PascalCase, SCREAMING_SNAKE_CASE, Title Case
slugifyConvert text into a URL-safe slug
extract_urlsExtract all URLs from a block of text
truncateTruncate text at word boundaries with configurable suffix
count_tokensEstimate LLM token count (word-based heuristic)

Install via mpak

mpak install @nimblebraininc/text-utils

Local Development

uv sync
make test        # Run tests
make check       # Format + lint + typecheck + tests
make run         # Run server (stdio)
make run-http    # Run HTTP server
make bundle      # Build MCPB bundle

Claude Desktop Config

{
  "mcpServers": {
    "text-utils": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-text-utils", "python", "-m", "mcp_text_utils.server"]
    }
  }
}

License

MIT