paraglide-mcp

paraglide-mcp

Enables translation of i18n messages in Paraglide JS projects by serving small batches, validating translations against source structure, and saving them per locale through inlang's SDK.

Category
访问服务器

README

paraglide-messages-mcp

npm license: MIT node >= 20

An MCP server that turns AI agents into a parallel translation team for Paraglide JS / inlang messages/{locale}.json files.

The agent calling the tools is the translator. The server makes that safe and fast:

  • Validated writes — every translation is checked against the source (placeholders, markup, plural variants) before anything lands on disk; bad items are rejected individually, never the whole batch.
  • One agent per locale, in parallel — the translate loop reads and writes only the source and target locale's files, so subagents can translate all locales concurrently without conflicts.
  • Fast and offline — direct JSON file access with a stat-validated cache; tool calls cost milliseconds regardless of project size, and no network is ever needed.
  • Toolchain-invisible — written files are byte-compatible with the message-format plugin's own output, and external edits (editor, compiler, git) are always picked up.

Quick start

No installation — add this to your .mcp.json (Claude Code) or claude_desktop_config.json:

{
  "mcpServers": {
    "paraglide": {
      "command": "npx",
      "args": [
        "-y",
        "paraglide-messages-mcp",
        "--project",
        "./project.inlang",
        "--translation-style",
        "Concise product UI; informal address; keep brand terms untranslated."
      ]
    }
  }
}

--project is optional: the server finds project.inlang in the working directory (or a single *.inlang directory up to one level deep) by itself. --translation-style is optional but recommended: it gives agents the linguistic brief to use for tone, formality, and terminology instead of deriving style from existing translations.

Then ask your agent to translate — or use the translate_project prompt to translate every locale at once with one subagent per locale.

Tools

Tool Purpose
project_info Locales, base locale, totalKeys across all locales, translatableKeys from non-empty base messages, per-locale translated/missing counts, extra non-source keys, and the startup translation style brief when configured.
get_translation_batch Next batch of untranslated messages for a locale (default 50), with source text and required placeholders. Optionally autosaves the previous batch in the same call (pass translations), so the loop is one round-trip per batch and the final batch is saved by the call that reports done.
get_retranslation_batch Cursor-paged batch over already-translated messages too — refresh stale entries after source/terminology changes. Same optional autosave as get_translation_batch.
save_translations Validate and persist translations for one locale; per-item results — overwrites existing values. (The batch tools share this save core for their autosave.)
list_message_keys Keys only, filterable by prefix and status, paginated.
get_messages Full message content by keys or prefix.
search_messages Find messages by text or key substring.
delete_messages / rename_message Key management across all locales.
remove_orphan_messages Delete target-locale keys that are absent from the source locale (base locale by default), optionally scoped by locale or prefix.
add_locale / remove_locale Locale management in settings.json.

Prompts

Prompt Purpose
translate_project Translate every locale: the main agent uses the startup translation style brief (or asks the user for one), then fans out one subagent per locale in parallel.
translate_locale Translate one locale via the batch loop.
translate_prefix Same, scoped to keys starting with a prefix.
retranslate Redo existing translations (stale copy, changed terminology) — by key prefix, every target locale by default, one subagent per locale.
review_locale Review existing translations against the base locale and fix problems.

Read-only state is also exposed as MCP resources (paraglide://project/info, paraglide://locales/{locale}/missing, paraglide://messages/{locale}/{key}), so clients can pin it as context without spending tool calls.

Agent skill

skill/paraglide-translation/ is an optional installable skill in the open Agent Skills format. The skill simply points the agent to the MCP server.

# Codex, via the skills CLI
npx skills add whazeted/paraglide-messages-mcp --skill paraglide-translation -a codex

# Or install from the skill folder URL directly
npx skills add https://github.com/whazeted/paraglide-messages-mcp/tree/main/skill/paraglide-translation -a codex

For other skills-compatible agents, replace codex with that agent's skills CLI target name. You can list the skill before installing:

npx skills add whazeted/paraglide-messages-mcp --list

Compatibility

Requires the standard Paraglide JS setup: the inlang message format plugin with a single message file per locale (any pathPattern location). Other inlang plugins (i18next, next-intl, ICU) and multi-file namespaces are deliberately not supported — see COMPATIBILITY.md for the exact criteria and reasoning.

Performance

A full 10-locale translation run over a 5,000-message project costs ~3 s of server time (M1 Max Mac Studio)— the pipeline is bounded by the agent's translation speed, not the server.

Documentation

  • DEVELOPMENT.md — architecture, message format details, validation rules, building, testing, benchmarking, releasing
  • COMPATIBILITY.md — supported project setups

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选