MCP Character Count
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Character Countcount characters in 'Hello World' excluding whitespace"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: MCP Character Counter
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
[mcp_servers.mcp-charcount]
command = "uv"
args = ["--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-charcount", "run", "src/mcp_charcount/server.py"]Amazon Q Developer
~/.aws/amazonq/mcp.json
{
"mcpServers": {
"local.mcp-charcount": {
"command": "/opt/homebrew/bin/uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-charcount",
"run",
"src/mcp_charcount/server.py"
]
}
}
}License: MIT
Available Tools
1 toolcount_charsA
Count the length of input text.
- mode="chars": Unicode code points count (Python len).
- mode="bytes": UTF-8 encoded byte length.
- include_whitespace: when False, whitespace characters are filtered out before counting.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| mode | No | chars | |
| include_whitespace | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: the two counting modes (Unicode code points vs. UTF-8 bytes) and the whitespace filtering option. However, it doesn't mention performance characteristics, error handling, or output format details, leaving some behavioral aspects unclear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly structured and concise. It starts with a clear purpose statement, then uses bullet points to efficiently explain parameter behaviors. Every sentence earns its place with no wasted words, making it easy to scan and understand.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 parameters, no annotations, but with an output schema), the description is reasonably complete. It explains what the tool does and parameter semantics well. Since an output schema exists, it doesn't need to describe return values. The main gap is lack of usage context, but otherwise it provides good coverage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains the semantics of all three parameters: 'text' is implied as input, 'mode' defines counting methods with examples, and 'include_whitespace' specifies filtering behavior. This fully compensates for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Count the length of input text.' This specifies the verb ('count') and resource ('length of input text'), making the function immediately understandable. However, with no sibling tools mentioned, there's no need for differentiation, so it doesn't reach the highest score of 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It explains what the tool does but offers no context about scenarios where it would be appropriate or prerequisites for use. Without sibling tools, this is less critical, but still a gap in usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- First observed
count_chars
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool has a single, clearly defined purpose of counting characters in text.
A single tool inherently has perfect naming consistency, as there are no other tool names to compare against. The name 'count_chars' follows a clear verb_noun pattern.
A single tool for a character counting server feels thin and limited in scope. While the tool is functional, the server's purpose could reasonably support additional related operations (e.g., word counting, line counting, text analysis), making the single tool count appear underdeveloped.
The server's domain appears to be text analysis or character operations, but it only offers character counting with configurable modes. There are obvious gaps, such as no tools for word counting, line counting, text transformation, or other common text processing tasks, which limits its utility.
Maintenance
Related MCP Connectors
Count occurrences of any character in your text instantly. Specify the character and get precise cā¦
Character count, text discarded
Counts tokens under OpenAI-compatible (tiktoken) encodings, by model or encoding name.
ISO-8859-1 byte count, text discarded
Related MCP Servers
- FlicenseBqualityDmaintenanceA lightweight server that provides detailed text analysis, counting total characters, characters without spaces, letters, numbers, and symbols for AI assistants like Claude Desktop and GitHub Copilot.14-
- FlicenseNot gradedqualityNot gradedmaintenanceProvides detailed character analysis for text, counting total characters, characters without spaces, letters, numbers, and symbols through a simple MCP tool interface.-
- FlicenseAqualityDmaintenanceProvides tools for accurate Twitter/X post character counting, validation, and optimization using official counting methods. It enables users to extract entities like URLs and hashtags to ensure content fits within platform constraints.41-
- AlicenseNot gradedqualityDmaintenanceProvides tools for AI models to count characters and words in text, supporting English and other space-delimited languages.1MIT