Skip to main content

Text Counter MCP Server

An MCP (Model Context Protocol) server that calculates basic text metrics for input text.

Features

  • get_text_count(text: str): Returns basic metrics for the provided text
    • characters: total character count
    • characters_without_space: character count excluding whitespace
    • words: word count

Example:

{
  "characters": 12,
  "characters_without_space": 11,
  "words": 2
}

Requirements

  • Python 3.10+
  • uv installed

All Python dependencies are defined in pyproject.toml and will be resolved by uv.

Run locally

From this directory:

uv run python main.py

Or from anywhere using an explicit directory:

uv run --directory /home/gws8820/devochat/mcp-proxy/servers/text-counter python main.py

Use with an MCP client

Add the following in your MCP client configuration (example servers.json):

{
  "mcpServers": {
    "text-counter": {
      "command": "uvx",
      "args": ["text-counter"]
    }
  }
}

Once connected, call the tool get_text_count with a text string argument.

License

Distributed under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text_counter-0.2.0.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text_counter-0.2.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file text_counter-0.2.0.tar.gz.

File metadata

  • Download URL: text_counter-0.2.0.tar.gz
  • Upload date:
  • Size: 32.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for text_counter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 369b81eb1672eb378bc054479dcfe5de2bfa35b46f5ced377bcc1103877fb7e5
MD5 c3723a51109b32daf4ee0814d19ce476
BLAKE2b-256 f3c4f6bdc5590f2e4966b2fa51b8689185a14c8eb053fb90439bb45a7ad85700

See more details on using hashes here.

File details

Details for the file text_counter-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: text_counter-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for text_counter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe01fbc8ba4f888bf18d4c52874989206e34d29097b21c64ca7d8bdbe7a0c060
MD5 8abf7a4ec790ad6705345b638efb58a6
BLAKE2b-256 5e6fa2ef91ed6e3377c6e66cfdcc54ef013b24e7b6403c01d24193234e535e72

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page