home / mcp / mcp word counter mcp server
A Model Context Protocol server for analyzing text documents with word and character counting capabilities
Configuration
View docs{
"mcpServers": {
"qpd-v-mcp-wordcounter": {
"command": "npx",
"args": [
"-y",
"mcp-wordcounter"
]
}
}
}You can use the MCP Word Counter to quickly analyze text documents by counting words, total characters, and characters excluding spaces. It processes files directly, keeping content away from large language models, and exposes a simple tool set you can call from MCP clients or CLI workflows.
You access the Word Counter through an MCP client or by running it locally via the CLI. The core tool you use is analyze_text, which reads a text file and returns the word count, character count including spaces, and character count excluding spaces. You can point the tool at any text file on your system and receive a concise summary suitable for further text-processing tasks.
Prerequisites: ensure you have Node.js installed on your machine. You can verify by running node -v and npm -v. Then install the MCP Word Counter package.
npm install mcp-wordcounterTo use the Word Counter with Claude Desktop, add the MCP server configuration to your Claude setup. The configuration runs the tool via a local command using npx and targets the mcp-wordcounter package. This keeps the content processing isolated to the server side while you invoke analysis from your Claude workflows.
{
"mcpServers": {
"mcp-wordcounter": {
"command": "npx",
"args": ["-y", "mcp-wordcounter"],
"alwaysAllow": ["analyze_text"]
}
}
}Key capability: analyze_text. Provide a file path to a text document, and you receive three outputs: word count, character count including spaces, and character count excluding spaces. This is useful when you need quick statistics for document analysis, preprocessing for prompts, or feeding validated text metrics into other tools.
Counts words and characters in a text document. Accepts a filePath and returns word count, character count including spaces, and character count excluding spaces.