字词计数器
STDIO文本分析和字数统计工具服务器
文本分析和字数统计工具服务器
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.
npm install mcp-wordcounter
npx mcp-wordcounter
Add to your Claude Desktop configuration (claude_desktop_config.json
):
{ "mcpServers": { "mcp-wordcounter": { "command": "npx", "args": ["-y", "mcp-wordcounter"], "alwaysAllow": ["analyze_text"] } } }
Counts words and characters in a text document.
Parameters:
filePath
(string, required): Path to the text file to analyzeReturns:
Example response:
{ "content": [{ "type": "text", "text": "Analysis Results:\n• Word count: 150\n• Character count (including spaces): 842\n• Character count (excluding spaces): 702" }] }
# 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
MIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.