Skip to main content

An MCP server that calculates basic text metrics for input text.

Project description

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.

Project details


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.1.0.tar.gz (34.2 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.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: text_counter-0.1.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for text_counter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c7122939d7cd5daa4814e3c9f39f6f2d6246857102faa5138f3b359b45130df8
MD5 a3de35adacc4679c2e1afad5266622f4
BLAKE2b-256 15b58e86c055bbcc282aa8e3b1c9a75afca49f9f9ff994183cd3cf8e03844147

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for text_counter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6984e093d846fbaba63dfd13be012a0d7d4d038241395d0f766d30db9f4ab95
MD5 adc2f60e8d17929ba763a544592f5b72
BLAKE2b-256 3039856812ca746545b3f9da4067c45bd1941571e5bce5f446c2065b78b46f09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page