m

mcp-charcount

@TORIFUKUKaiou/mcp-charcount
0 Stars 7 次浏览 TORIFUKUKaiou 更新于 2026-08-23
该服务暂未提供标准配置,请参考 README 手动接入

服务介绍

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

[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

相关 MCP 服务