mcp-charcount
Simple MCP server that provides a single tool to count characters or bytes in text.
Quick start
Run with stdio (no PATH to python needed):
uv run src/mcp_charcount/server.py
Develop with MCP Inspector:
uv run mcp dev src/mcp_charcount/server.py
Tool: count_chars
Args:
text: str,mode: "chars"|"bytes" = "chars",include_whitespace: bool = trueReturns:
{ "count": int, "mode": str, "include_whitespace": bool }
Tests
pytest -q(src layout is configured; install not required)With uv:
uv run pytest -q
Manifest
mcp.jsonis configured for this repo layout:command:uvargs:["run", "src/mcp_charcount/server.py"]This matches the current server which runsmcp.run(transport='stdio')when executed as a script.
Settings Example
codex
~/.codex/config.toml
Amazon Q Developer
~/.aws/amazonq/mcp.json
License: MIT
Related MCP Servers
- Asecurity-licenseAqualityA Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.Last updated -11910Apache 2.0
- -security-license-qualityEnables text extraction from web pages and PDFs, and execution of predefined commands, enhancing content processing and automation capabilities.
- AsecurityAlicenseAqualityProvides comprehensive document processing, including reading, converting, and manipulating various document formats with advanced text and HTML processing capabilities.Last updated -166116MIT License
- AsecurityAlicenseAqualityCounts characters and words in both Japanese and English text files, with special handling for Japanese morphological analysis and proper character counting excluding spaces and line breaks.Last updated -62MIT License