Skip to main content
Glama

MCP Word Counter

by qpd-v

MCP Word Counter

A Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.

Features

  • Count words in documents
  • Count total characters (including spaces)
  • Count characters excluding spaces
  • Process files directly without exposing content to LLMs

Installation

npm install mcp-wordcounter

Usage

As a CLI tool

npx mcp-wordcounter

In Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

{ "mcpServers": { "mcp-wordcounter": { "command": "npx", "args": ["-y", "mcp-wordcounter"], "alwaysAllow": ["analyze_text"] } } }

Available Tools

analyze_text

Counts words and characters in a text document.

Parameters:

  • filePath (string, required): Path to the text file to analyze

Returns:

  • Word count
  • Character count (including spaces)
  • Character count (excluding spaces)

Example response:

{ "content": [{ "type": "text", "text": "Analysis Results:\n• Word count: 150\n• Character count (including spaces): 842\n• Character count (excluding spaces): 702" }] }

Development

# Install dependencies npm install # Build the project npm run build # Run in watch mode during development npm run watch # Test with MCP Inspector npm run inspector

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

A Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.

  1. Features
    1. Installation
      1. Usage
        1. As a CLI tool
        2. In Claude Desktop
        3. Available Tools
      2. Development
        1. License
          1. Contributing

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              Provides advanced analytical, research, and natural language processing capabilities through a Model Context Protocol server, enabling dataset analysis, decision analysis, and enhanced NLP features like entity recognition and fact extraction.
              Last updated -
              2
              TypeScript
              MIT License
              • Linux
              • Apple
            • A
              security
              F
              license
              A
              quality
              A comprehensive Model Context Protocol server for advanced code analysis that provides tools for syntax analysis, dependency visualization, and AI-assisted development workflow support.
              Last updated -
              28
              4
              Python
            • -
              security
              F
              license
              -
              quality
              An MCP server that enables LLMs to count occurrences of specific letters within words, created as a learning example for the Model Context Protocol.
              Last updated -
              TypeScript
            • A
              security
              A
              license
              A
              quality
              A comprehensive Model Context Protocol server providing access to 70+ IT tools for developers and system administrators, including encoding/decoding, text manipulation, hashing, and network utilities.
              Last updated -
              76
              400
              6
              TypeScript
              MIT License
              • Linux

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/qpd-v/mcp-wordcounter'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server