MCP Word Counter
MCP 字数统计器
模型上下文协议 (MCP) 服务器,提供用于分析文本文档的工具,包括统计单词和字符数。该服务器通过提供简单的文档统计功能,帮助 LLM 执行文本分析任务。
特征
统计文档中的字数
计算字符总数(包括空格)
统计字符数(不包括空格)
直接处理文件,无需将内容暴露给 LLM
Related MCP server: Letter Counter MCP Server
安装
npm install mcp-wordcounter用法
作为 CLI 工具
npx mcp-wordcounter在克劳德桌面
添加到您的 Claude Desktop 配置( claude_desktop_config.json ):
{
"mcpServers": {
"mcp-wordcounter": {
"command": "npx",
"args": ["-y", "mcp-wordcounter"],
"alwaysAllow": ["analyze_text"]
}
}
}可用工具
分析文本
计算文本文档中的单词和字符数。
参数:
filePath(字符串,必需):要分析的文本文件的路径
返回:
字数统计
字符数(包括空格)
字符数(不包括空格)
响应示例:
{
"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 文件。
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
Available Tools
1 toolanalyze_textC
Count words and characters in a text document
Inputs: filePath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'analyze_text' has a single, clearly defined purpose of counting words and characters, so an agent cannot misselect between non-existent alternatives.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'analyze_text' follows a clear verb_noun pattern, which would be consistent if more tools were added.
The server 'MCP Word Counter' has only one tool, which feels thin for its apparent scope of text analysis. While word and character counting is a specific task, a typical text analysis server might include additional tools (e.g., for sentiment, readability, or language detection) to provide more comprehensive functionality.
The tool set is severely incomplete for a text analysis domain. It only covers basic word and character counting, with obvious gaps such as sentence counting, paragraph analysis, frequency analysis, or other common text metrics. This limited surface will likely cause agent failures when more advanced text processing is needed.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Document conversion MCP server: PDF to Markdown, image OCR, spreadsheet parsing.
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.13191MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables LLMs to count occurrences of specific letters within words, created as a learning example for the Model Context Protocol.1-
- AlicenseBqualityDmaintenanceA lightweight server that provides detailed text analysis, counting total characters, characters without spaces, letters, numbers, and symbols for AI assistants like Claude Desktop and GitHub Copilot.14ISC
- AlicenseNot gradedqualityDmaintenanceProvides tools for text file analysis, including metrics like word counts and character frequencies, alongside file reading and directory browsing capabilities. This server enables LLMs to interact with and process local file content securely through the Model Context Protocol.MIT