text-count-mcp-server

by yuiseki

1 stars
234 downloads
Not rated
GitHub

About

A Model Context Protocol server for text counting

Details

Author
yuiseki
GitHub stars
1
Downloads
234
Categories
Other

- count_characters tool: counts characters in a text string
- count_words tool: counts words in a text string
- Word counting currently supports English and other space-delimited languages
- Implements the Model Context Protocol for integration with AI models

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name text-count-mcp-server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the package with npm install, then run it as a standalone server using node build/index.js. It can be used with any client that supports the Model Context Protocol.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "text-count-mcp-server": {
            "text-count-mcp-server": {
                "command": "node",
                "args": [
                    "build/index.js"
                ]
            }
        }
    }
}

McpServers

{
    "text-count-mcp-server": {
        "command": "node",
        "args": [
            "build/index.js"
        ]
    }
}

text-count-mcp-server

A Model Context Protocol (MCP) server that provides text counting tools for AI models.

Overview

This server implements the Model Context Protocol to provide tools for counting characters and words in text. These tools help AI models to accurately count text elements without relying on their own counting abilities.

Features

- count_characters: Count the number of characters in a text string
- count_words: Count the number of words in a text string (currently supports English and other space-delimited languages)

Installation

npm install

Usage

As a standalone server

node build/index.js

With an MCP-compatible client

This server can be used with any client that supports the Model Context Protocol.

API

count_characters

Counts the number of characters in the provided text.

Input:

{
  "text": "The text to count characters in."
}

Output:

{
  "content": [
    {
      "type": "text",
      "text": "The text contains 30 characters."
    }
  ]
}

count_words

Counts the number of words in the provided text.

Input:

{
  "text": "The text to count words in."
}

Output:

{
  "content": [
    {
      "type": "text",
      "text": "The text contains 6 words."
    }
  ]
}

Limitations

- Japanese language word counting is not yet supported.
- Other languages use space-based word splitting, which may not be accurate for all languages.

License

See the LICENSE file for license rights and limitations.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.