
MCP Character Counter

2025.04.23
0
JavaScript文本分析字符统计开发效率
MCP Character Counter 是一个轻量级的 Model Context Protocol (MCP) 服务器,提供详细的文本字符分析功能。该工具可以统计文本中的总字符数、不含空格的字符数、字母、数字和符号的数量。
View on GitHub
Overview
基本能力
产品定位
MCP Character Counter 是一个用于文本字符分析的轻量级工具,旨在为开发者和AI助手提供详细的字符统计功能。
核心功能
- 统计文本中的总字符数
- 统计不含空格的字符数
- 统计字母数量(a-z, A-Z)
- 统计数字数量(0-9)
- 统计符号数量(非字母数字字符)
- 提供字符类型的详细分类
适用场景
- 文本编辑和分析
- 代码审查和统计
- 数据验证和清理
- AI助手的文本处理
工具列表
count-characters-in-text
: 接受文本输入并返回字符组成的详细分析
常见问题解答
无明确常见问题解答部分
使用教程
使用依赖
- Node.js v17 或更高版本
- Claude Desktop 或 GitHub Copilot 或其他兼容的 MCP 客户端
安装教程
-
克隆仓库:
bash git clone https://github.com/webreactiva-devs/mcp-character-counter.git cd mcp-character-counter
-
安装依赖:
bash npm install
调试方式
- 修改
character-counter.js
文件 - 在 MCP 客户端中重启服务器
与 Claude Desktop 使用
- 打开 Claude Desktop 配置:
macOS:
bash code ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows:
powershell
code %APPDATA%\Claude\claude_desktop_config.json
- 添加字符计数器到 MCP 服务器配置中
- 重启 Claude Desktop
- 使用示例:
- "Count the characters in this paragraph"
- "How many numbers are in this text: '123 Main St, Apt 45B'?"
与 GitHub Copilot 使用
- 确保已安装 GitHub Copilot
- 在 VS Code 设置中添加 MCP 服务器配置
- 重启 VS Code
- 使用示例:
/mcp count-characters-in-text This is the text I want to analyze