Model Context Protocol
AI原生翻译工作流
让您的 AI 编码助手(Cursor、Claude Desktop、Copilot 或 Kiro)直接访问,以同步翻译、搜索键值并管理您的本地化工作流程,无需离开编辑器。
CursorClaude DesktopGitHub CopilotKiroClineWindsurf
什么是MCP?
模型上下文协议(MCP)是一种开放标准,允许 AI 助手与外部工具和服务进行交互。您的 AI 代理无需复制粘贴命令,而是直接调用 Localingos 工具:在对话流程中同步翻译、搜索键值并推送更新。
可用工具
Core tools (local + remote)
Tool | Description |
|---|---|
localingos_sync | 推送源字符串并拉取翻译。仅传输已更改的内容——使用内容哈希跳过未更改的项目,并仅返回客户端所需的翻译。 |
localingos_push | 将源字符串推送到 Localingos,无需拉取翻译。 |
localingos_pull | 拉取最新翻译并将语言环境文件写入您的项目。 |
localingos_status | 显示项目状态:项目、语言区域、源键数量、翻译文件。 |
localingos_search | 在您的源字符串中搜索翻译键或文本。 |
localingos_extract | 运行 i18n 提取脚本,从 .messages.ts 文件重新生成 JSON。 |
Additional tools (remote + CLI mcp-serve)
Tool | Description |
|---|---|
localingos_get_translatables | Get all source strings for a project. |
localingos_get_translations | Get all translations for a project. |
localingos_get_translation | Get translations for a specific key. |
localingos_translation_jobs | List translation jobs for a project. |
localingos_retry_job | Retry a single failed translation job. |
localingos_retry_all_jobs | Retry all failed and blocked jobs. |
localingos_project_members | List members of a project. |
localingos_add_member | Add a member to a project. |
localingos_remove_member | Remove a member from a project. |
localingos_billing_status | Show billing status, plan, and usage. |
localingos_attach_billing | Attach your billing account to a project. |
localingos_detach_billing | Detach billing from a project. |
本地设置 (stdio)
安装 MCP 服务器并配置您的 AI 代理以在本地启动它。读取您的项目配置。无需服务器费用。
安装 MCP 服务器
npm install -g localingosClaude Desktop
Add to
~/Library/Application Support/Claude/claude_desktop_config.json:{
"mcpServers": {
"localingos": {
"command": "localingos", "args": ["mcp-serve"],
"cwd": "/path/to/your/project"
}
}
}Cursor
Add to
.cursor/mcp.json in your project:{
"mcpServers": {
"localingos": {
"command": "localingos", "args": ["mcp-serve"]
}
}
}Kiro
Add to
.kiro/settings/mcp.json:{
"mcpServers": {
"localingos": {
"command": "localingos", "args": ["mcp-serve"]
}
}
}Cline
In VS Code, open Cline → MCP Servers → Add Local Server:
Command: localingos
Arguments: mcp-serve远程设置 (mcp.localingos.com)
无需安装。将您的代理指向我们托管的 MCP 服务器。每次工具调用时传入您的 API 密钥和项目 ID。
Claude Desktop
{
"mcpServers": {
"localingos": {
"type": "streamable-http",
"url": "https://mcp.localingos.com"
}
}
}Cursor
{
"mcpServers": {
"localingos": {
"type": "streamable-http",
"url": "https://mcp.localingos.com"
}
}
}Kiro
Add to
.kiro/settings/mcp.json:{
"mcpServers": {
"localingos": {
"type": "streamable-http",
"url": "https://mcp.localingos.com"
}
}
}Cline
In VS Code, open Cline → MCP Servers → Add Remote Server:
Server URL: https://mcp.localingos.com
Server Name: localingosWhen using the remote server, your AI agent passes your API key and family ID with each tool call — no local config files needed.
示例对话
"同步我的翻译"
→ 代理调用 localingos_sync → 推送 770 个字符串,拉取 8 个语言环境,写入文件
"账单页面有翻译吗?"
→ 代理使用 "billing" 调用 localingos_search → 返回匹配的键和文本
"运行 i18n 提取并检查孤立条目"
→ 代理以 check=true 调用 localingos_extract → 报告键数量和孤立消息