@rog0x/mcp-string-tools
Official@rog0x/mcp-string-tools
面向 AI 智能体的高级字符串操作工具,通过 Model Context Protocol (MCP) 提供服务。
工具
analyze_string
分析文本以获取详细指标:
字符数(含空格和不含空格)
单词、句子和段落计数
预估阅读时间
Flesch-Kincaid 阅读难度评分和等级
唯一单词数和最常用单词
最长单词
transform_string
使用各种操作转换文本:
remove_duplicate_lines - 从文本中移除重复行
remove_extra_whitespace - 折叠多余的空白和空行
extract_emails - 从文本中提取所有电子邮件地址
extract_urls - 从文本中提取所有 URL
extract_phone_numbers - 从文本中提取电话号码
mask_sensitive_data - 对电子邮件、电话号码和信用卡号进行掩码处理
truncate - 在单词边界处使用省略号截断文本
wrap_text - 在指定的列宽处对文本进行换行
diff_strings
比较两个字符串并查看差异:
character 模式 - 逐字符差异
word 模式 - 逐词差异(默认)
line 模式 - 逐行差异
显示新增、删除和未更改的片段及其位置
render_template
简单的模板引擎:
使用 JSON 数据对象中的值替换
{{variables}}条件:
{{#if var}}...{{#else}}...{{/if}}循环:
{{#each arr}}...{{this}}...{{@index}}...{{/each}}嵌套属性访问:
{{user.name}}
generate_slug
生成适合 URL 的 slug:
转写带重音符号的字符(例如,从
cafe生成cafe)移除特殊字符
可配置的分隔符(默认:
-)可选的最大长度,支持干净截断
可选的小写转换开关
Related MCP server: mcp-regex-tools
设置
npm install
npm run build在 Claude Desktop 中使用
将其添加到你的 claude_desktop_config.json 中:
{
"mcpServers": {
"string-tools": {
"command": "node",
"args": ["D:/products/mcp-servers/mcp-string-tools/dist/index.js"]
}
}
}许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Exact text tools for AI agents: unified diff, patch apply, regex testing, grapheme counting.
500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.
Utility tools for AI agents: hashing, text stats, validation, DNS, currency, GEO audits.
JSON/YAML, regex, diff, JWT, SQL dialects — the keyless millisecond ops an agent needs mid-task.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides 14+ character-level text analysis tools that give LLMs the ability to accurately count letters, analyze individual characters, and work with text at the character level—overcoming tokenization limitations.149 npm3MIT
- AlicenseNot gradedqualityDmaintenanceProvides a suite of regex and text processing tools for AI agents, including pattern testing, extraction, and replacement with capture group support. It also enables various text transformations like case conversion, line sorting, and deduplication through the Model Context Protocol.41 npmMIT
- AlicenseNot gradedqualityBmaintenanceProvides string utility operations via the MCP protocol, with built-in EU AI Act compliance.9 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides a set of micro-tools (time calculation, regex, encoding, JSON diff, etc.) for LLM agents to handle deterministic, precision tasks that models often get wrong.MIT