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
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the text file to analyze |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions counting words and characters but does not describe how the tool behaves, such as whether it reads files safely, handles errors, or returns specific formats. For a tool with no annotations, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand quickly. Every part of the sentence contributes to clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, error handling, or return values, which are crucial for an agent to use the tool correctly. For a tool with such minimal structured data, the description should provide more context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the parameter 'filePath' clearly documented. The description does not add any additional meaning or details about parameters beyond what the schema provides. According to the rules, with high schema coverage, the baseline score is 3, as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function as 'Count words and characters in a text document,' which specifies the verb (count) and resources (words, characters). It distinguishes the tool's purpose well, though without sibling tools, differentiation isn't needed. It's not a tautology and is specific enough for understanding.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or exclusions. It simply states what the tool does without context for usage, leaving the agent to infer based on the purpose alone. This lack of explicit guidelines reduces its helpfulness.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
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.1337174MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server that enables LLMs to count occurrences of specific letters within words, created as a learning example for the Model Context Protocol.1
- FlicenseBqualityDmaintenanceA 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.14
- 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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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