Skip to main content
Glama
TORIFUKUKaiou

MCP Character Count

README.md
# 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 = true`
- Returns: `{ "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.json` is configured for this repo layout:
  - `command`: `uv`
  - `args`: `["run", "src/mcp_charcount/server.py"]`
  This matches the current server which runs `mcp.run(transport='stdio')` when executed as a script.

## Settings Example

### codex

`~/.codex/config.toml`  

```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`  

```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

TDQS

A3.6/5.0

Scored across 1 tool

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness2/5

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

ActivityInactive
ResponsivenessNo issues