Back to MCP directory
publicPublicdnsLocal runtime

string-catalog-mcp

一个用于处理Xcode字符串目录文件的MCP服务器,支持iOS/macOS应用本地化字符串的读取、搜索和更新。

article

README

🚀 string-catalog-mcp

string-catalog-mcp 是一个用于处理 Xcode 字符串目录(.xcstrings)文件的 MCP 服务器。它允许 AI 助手读取、搜索和更新你的 iOS/macOS 本地化字符串。

运行中的 MCP

🚀 快速开始

📦 安装指南

pnpm install
pnpm build

💻 使用示例

基础用法

在你的 MCP 配置中添加以下内容:

{
  "mcpServers": {
    "string-catalog-mcp": {
      "command": "pnpm",
      "args": ["dlx", "string-catalog-mcp"]
    }
  }
}

📚 详细文档

🔧 可用工具

list_supported_languages

列出字符串目录中所有语言,并标识出源语言。

"我的 Localizable.xcstrings 文件支持哪些语言?"

get_catalog_statistics

获取每种语言的翻译覆盖情况,包括总键数和完成百分比。

"给我展示我的字符串目录的翻译统计信息"

get_translations_for_key

获取特定键在所有支持语言中的所有翻译。

"给我展示 'welcome_message' 键的所有翻译"

search_keys

搜索包含特定子字符串的本地化键(不区分大小写)。

"在我的字符串目录中查找所有包含 'error' 的键"

list_all_keys

列出目录中的所有本地化键(支持大目录的分页)。

"列出我项目中的所有本地化键"

update_translations

在字符串目录中添加或更新翻译。接受结构化的 JSON 负载,支持 iOS 格式占位符(%@, %d, %lld, %f, %1$@)。

"为 'hello_world' 键添加德语和法语翻译"

🔧 可用提示

translate-strings

为特定键生成翻译,并提供格式占位符的指导。

"使用 translate-strings 提示将 'welcome_message' 和 'goodbye' 翻译成德语、法语和日语"

batch-translate

为指定语言翻译目录中所有未翻译或过时的字符串。

"使用 batch-translate 为我的目录中所有缺失的字符串添加德语翻译"

review-translations

审查现有翻译的质量、一致性和占位符使用情况。

"审查我的德语翻译是否存在质量问题"

🔧 常见工作流程

为你的应用添加新语言

  1. "我的 Localizable.xcstrings 文件支持哪些语言?"
  2. "使用 batch-translate 为 /path/to/Localizable.xcstrings 添加西班牙语翻译"

翻译特定字符串

  1. "在我的字符串目录中搜索包含 'settings' 的键"
  2. "给我展示 'settings_title' 键的翻译"
  3. "将 'settings_title' 和 'settings_description' 翻译成德语和法语"

审查翻译质量

  1. "给我展示我的目录的翻译统计信息"
  2. "审查德语翻译的占位符问题和一致性"

📄 许可证

本项目采用 MIT 许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client