
String
io.github.rog0x由 GitHub 账号 rog0x 发布v1.0.2更新于 Oct 27, 2026
String analyzer, diff, templates for AI agents
概览
本地 MCP 服务器,为助手提供文本分析、转换、差异比较、模板渲染和 slug 生成等字符串工具。
- 可以做什么
- 分析文本:统计字符、词、句子和段落数量,估算阅读时间、Flesch-Kincaid 可读性等级、唯一词与高频词、最长单词
- 转换文本:去除重复行、合并多余空白、提取邮箱、网址和电话号码、遮蔽敏感数据、按词边界截断、按列宽换行
- 比较两个字符串,支持字符、词、行三种差异模式,显示新增、删除和未变片段
- 渲染模板:变量替换、条件判断、循环和嵌套属性访问
- 生成 URL 友好 slug,支持音标转写、自定义分隔符、最大长度和可选小写
- 适用场景
- 适合助手需要在本地度量、清理、比较或重排文本的场景,例如检查可读性、去除重复行、在分享前遮蔽邮箱和卡号、比较两段字符串差异,或为网址生成 slug。
- 运行要求
- 作为本地 stdio 进程在桌面端运行;需安装 npm 包并构建,然后用 node 指向构建后的入口文件。未声明账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 String,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@rog0x/mcp-string-tools
Advanced string manipulation tools for AI agents, served over the Model Context Protocol (MCP).
Tools
analyze_string
Analyze text to get detailed metrics:
- Character count (with and without spaces)
- Word, sentence, and paragraph counts
- Estimated reading time
- Flesch-Kincaid reading level score and grade
- Unique word count and most common words
- Longest word
transform_string
Transform text with various operations:
- remove_duplicate_lines - Remove duplicate lines from text
- remove_extra_whitespace - Collapse extra whitespace and blank lines
- extract_emails - Extract all email addresses from text
- extract_urls - Extract all URLs from text
- extract_phone_numbers - Extract phone numbers from text
- mask_sensitive_data - Mask emails, phone numbers, and credit card numbers
- truncate - Truncate text with ellipsis at word boundaries
- wrap_text - Wrap text at a specified column width
diff_strings
Compare two strings and see the differences:
- character mode - Character-by-character diff
- word mode - Word-by-word diff (default)
- line mode - Line-by-line diff
- Shows additions, deletions, and unchanged segments with positions
render_template
Simple template engine:
- Replace
{{variables}}with values from a JSON data object - Conditionals:
{{#if var}}...{{#else}}...{{/if}} - Loops:
{{#each arr}}...{{this}}...{{@index}}...{{/each}} - Nested property access:
{{user.name}}
generate_slug
Generate URL-friendly slugs:
- Transliterates accented characters (e.g.,
cafefromcafe) - Removes special characters
- Configurable separator (default:
-) - Optional max length with clean truncation
- Optional lowercase toggle
Setup
Usage with Claude Desktop
Add to your claude_desktop_config.json:
License
MIT
来源:README.md,提交 29a699e
工具
0版本历史
1- v1.0.2最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。