Skip to main content
Glama

概要

このリポジトリは、MDN 日本語翻訳を支援する MCP サーバーです。
MCP クライアント(Cursor / Claude / VS Code など)からサーバーを登録するだけで、翻訳の開始・同期・レビューとガイドライン参照ができます。Cursor Rules / Skills は必須ではありません。

MDN の本文はリポジトリに含めません。手元では mdn/content および mdn/translated-content を GitHub 上で fork し、その fork を clone して参照する想定です。

利用者向けの詳細は GitHub Pages(TypeDoc)の次のページです。

Related MCP server: Work Note MCP Server

目的

  • 翻訳開始(原文コピー)の自動化。

  • 原文との同期(sourceCommit)の管理。

  • glossary マクロの補助。

  • ガイドラインに基づくレビュー。

アーキテクチャ

MCP Client(Cursor / Claude / VS Code / other)
    │  stdio または Streamable HTTP
    ▼
mdn-translation-ja-mcp
├─ Tools
├─ Resources
├─ Prompts
└─ content + translated-content

integrations/cursor/   … optional UX

設計の詳細は architecture/mcp-native.md を参照してください。

最小セットアップ

前提リポジトリ(fork → clone)

同じ親ディレクトリに次を並べます(ディレクトリ名は任意ですが、この名前だと後述の兄弟ディレクトリ解決と一致します)。

.
├── content
├── translated-content
└── mdn-translation-ja-mcp
mkdir -p mdn-work && cd mdn-work
git clone https://github.com/<あなたのGitHubユーザー名>/content.git
git clone https://github.com/<あなたのGitHubユーザー名>/translated-content.git
git clone https://github.com/gurezo/mdn-translation-ja-mcp.git

<あなたのGitHubユーザー名> は fork 先のアカウント名に読み替えてください。上流は mdn/content / mdn/translated-content です。

ランタイム

  • Node.js 24 以上(LTS 推奨)

  • MCP クライアント(stdio または Streamable HTTP)。HTTP 必須ではありません。Cursor Rules / Skills は任意です。

サーバーのビルド

cd mdn-translation-ja-mcp
npm install
npm run build

dist/index.js(stdio)と dist/http.js(Streamable HTTP)が生成されます。チャットのエージェントのために npm start を手動で走らせる必要はありません。クライアントが MCP 設定経由でサーバーを起動します。npm start / npm run start:http は単体確認用です。

サーバー登録

どのクライアントでも次を渡します。パスは 絶対パス に置き換えてください。

  • command: node

  • args: /absolute/path/to/mdn-translation-ja-mcp/dist/index.js

  • env.MDN_CONTENT_ROOT: content のルート

  • env.MDN_TRANSLATED_CONTENT_ROOT: translated-content のルート

設定ファイルの例は examples/README.md です。

クライアント別の置き場は site/client-integration.md を参照してください。

content / translated-content のパス解決

  1. 環境変数(任意)MDN_CONTENT_ROOTMDN_TRANSLATED_CONTENT_ROOT両方指定すると、その絶対パスを使います。片方だけは不可です。

  2. 兄弟ディレクトリ — どちらも未設定のとき、プロセスのカレントディレクトリのひとつ上を親とみなし、そこにある contenttranslated-content を参照します。

解決した content 相当のルートには files/en-us が、translated-content 相当のルートには files/ja がディレクトリとして存在する必要があります。名前だけの空フォルダではエラーになります。

MCP Tools

先頭に / は付きません(登録名は mdn_trans_start のようなスネークケースです)。シェルコマンドではありません。

MCP ツール名

主な引数

用途

mdn_trans_start

url

content の原文 index.mdtranslated-content の対応パスへコピーするだけ(翻訳・_redirects.txt・他ファイルの修正はしない)

mdn_trans_commit_get

url

content の git 履歴からコミットハッシュを取得し、l10n.sourceCommit を翻訳ファイルに反映する

mdn_trans_replace_glossary

jaFile

1 引数 {{glossary}} を第 2 引数付きに置換する

mdn_trans_review

jaFile

ガイドライン機械レビュー(mdn://data/review-rules と同じ JSON)。読み取りのみ

urlhttps://developer.mozilla.org/en-US/docs/... 形式です。URL 側の /docs/ はファイルパスに現れません。

jaFile は translated-content 内の絶対パス、または files/ja/ からの相対パスです。MCP はエディタの「開いているファイル」を知りません。

詳細は site/mcp-tools.md です。

MCP Resources

人手翻訳ではガイドラインを Resource から読んでください。.agents/skills のコピーは不要です。

URI

内容

mdn://guidelines/editorial

表記ガイドライン

mdn://guidelines/l10n

L10N ガイドライン

mdn://guidelines/japanese-style

文体ルール

mdn://glossary

用語抜粋と Wiki 参照手順

mdn://data/glossary-terms

機械用 glossary(mdn_trans_replace_glossary と同一)

mdn://data/review-rules

機械チェックルール(mdn_trans_review と同一)

mdn://data/prohibited-expressions

禁止・注意表現

詳細は site/mcp-resources.md です。

MCP Prompts

標準手順は Prompt です。サーバー内では LLM を実行しません。

Prompt

引数

用途

mdn_translate

url

翻訳開始からレビューまでの標準フロー

mdn_sync

url

既存訳の l10n.sourceCommit 同期

mdn_review

jaFile

機械レビューと人手確認項目

詳細は site/mcp-prompts.md です。

翻訳フロー

一例として、Prompt mdn_translate は次の順で Tools / Resources を使います。

  1. mdn_trans_startjaindex.md を用意する

  2. mdn_trans_commit_getl10n.sourceCommit を書き込む

  3. Resources — ガイドラインを読む

  4. クライアント LLM — 本文を翻訳する

  5. mdn_trans_replace_glossary{{glossary}} 第 2 引数を補完する

  6. mdn_trans_review — 機械チェックする(対象ファイルは変更しない)

既存訳の同期は mdn_sync、レビューだけなら mdn_review です。手順の全体は site/translation-workflow.md です。

Cursor integration(optional)

Cursor で必要なのは MCP 接続設定だけです。Rules / Skills は任意です。

  • 手動: examples/cursor/mcp.example.jsontranslated-content/.cursor/mcp.json にコピーし、絶対パスを書き換える

  • 一括: npm run setup:translated-content-cursor(既定は mcp.json のみ。薄い Rule は --with-rules

cd mdn-translation-ja-mcp
npm run build
npm run setup:translated-content-cursor

translated-content/.cursor/ は手元のローカル設定です。翻訳 PR に含めないでください。

入れると便利な点(エージェントがツール名をシェルと誤認しにくくなる等)は integrations/cursor/README.md にまとめています。

他 MCP クライアント

Cursor 以外では examples/mcp/README.md の JSON を使います。MCP Inspector なら .cursor は不要です。

npm run build
npm run inspect

検証結果は architecture/client-verification.md を参照してください。

ツールの応答

本サーバーは stdionpm startdist/index.js)または Streamable HTTPnpm run start:httpdist/http.js)で起動します。各ツールの結果は MCP の text コンテンツとして返ります。想定外のエラーはクライアント側でツール呼び出しエラーとして扱われることがあります。

API ドキュメント(TypeDoc)

TypeScript API リファレンスと上記の利用者向けページを TypeDoc で生成します(出力先は docs/)。

# 生成済みドキュメントの削除
npm run docs:clean

# ドキュメント生成(docs/ を再生成)
npm run docs:build

# docs:publish は docs:build と同じ(ローカルで docs/ を更新する)
npm run docs:publish

トラブルシュート

症状

確認すること

HTTP で MCP に接続できない

npm run start:http が起動しているか。クライアントの url(ホスト・ポート・パス /mcp)が一致しているか。

MCP が起動しない / Cannot find module

npm run build 済みか。stdio のときは args のパスが dist/index.js の絶対パスか。

dist/index.js が無い

リポジトリルートで npm installnpm run build

ワークスペースが解決できない

MDN_CONTENT_ROOTMDN_TRANSLATED_CONTENT_ROOT両方セットするか、両方未設定にする。

content / translated-content が見つからない

親ディレクトリに両方があるか。または上記環境変数で正しい絶対パスを指定。

mdn_trans_commit_get が git 関連で失敗する

contentfork した mdn/content を clone したリポジトリか、対象ファイルが追跡されているか。

Node のバージョンエラー

package.jsonenginesnode >= 24

mdn_trans_review がシェルで見つからない

MCP ツールとして呼ぶnpm start では解決しない)。クライアントにサーバーが接続済みか。フォールバック: npm run mdn:trans:review -- --jaFile=files/ja/.../index.md

ライセンスと第三者表記

  • 本リポジトリのソースコード: MIT License

  • MDN 本文・翻訳データ・外部サイトの扱い: THIRD_PARTY.md

注意

  • MDN コンテンツは含まれません。

  • content / translated-content は上流を fork したうえで、別途 clone が必要です。

  • MDN のライセンスに従って利用してください。

Available Tools

4 tools
mdn_trans_commit_getsourceCommit の取得と反映A

content リポジトリで該当原文の最新コミットを取得し、翻訳ファイルのフロントマターに l10n.sourceCommit を書き込みます。

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYeshttps://developer.mozilla.org/en-US/docs/... 形式の URL

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It clearly states it modifies the translation front matter, which is a write operation, and that it fetches a commit from the content repository. However, it does not disclose potential side effects (e.g., file creation, network requirements) or failure behavior. The core behavior is transparent, but details are sparse.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one concise sentence, front-loaded with the context ('content リポジトリで'), and every clause adds meaning. No fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the description states the main action, it lacks context about return values, error conditions, or prerequisites. Since there is no output schema, the absence of return-value information is notable. Given the tool's moderate complexity (read+write) and lack of annotations, the description is adequate but not rich.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter `url` is fully described in the schema (100% coverage), so description adds no additional semantic value beyond what the schema already states. The description's mention of 'corresponding original text' loosely connects to the URL, but this is not explicit parameter-level detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves the latest commit for a source document in the content repository and writes it to the translation file's front matter as l10n.sourceCommit. The verb-resource pairs (get commit, write front matter) are specific and distinguish it from sibling tools like mdn_trans_start or mdn_trans_review.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus the sibling tools. It does not mention prerequisites, alternatives, or situations where it should be avoided. The context is implied by the tool name (commit_get), but no direct comparison to siblings is offered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mdn_trans_replace_glossaryglossary マクロの第2引数補完A

指定した翻訳ファイル内の {{glossary("id")}} を、用語データに基づき {{glossary("id", "表示")}} に置換します。

ParametersJSON Schema
NameRequiredDescriptionDefault
jaFileYestranslated-content 内のパス(絶対パス、または files/ja/ からの相対)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It indicates a replacement action but does not state whether the file is modified in place, how existing second arguments are handled, or what happens if the terminology data lacks the ID. This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single focused sentence in Japanese, front-loaded with the action and target, with no redundant information. Every word contributes to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with no output schema, the description covers the core transformation but lacks behavioral and usage context. It does not mention return behavior or potential side effects, leaving some gaps for an agent to safely invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The sole parameter jaFile already has a clear schema description (path in translated-content, absolute or relative). The tool description adds no additional semantics beyond referring to 'specified file', so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (replace) and resource (glossary macros in a translation file), with a clear transformation pattern from {{glossary("id")}} to {{glossary("id", "表示")}}. It distinguishes itself from sibling tools (start, review, commit) which serve different workflow stages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The context of use is implied: run on a translation file to complete glossary macro second arguments. However, there is no explicit guidance on when to use it versus alternatives, nor any exclusion criteria or prerequisites (e.g., needing terminology data). Sibling tools are not compared.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mdn_trans_review翻訳のガイドライン機械レビュー(読み取りのみ)A
Read-only

.agents/skills 由来の機械チェック(表記・文体・l10n メタデータ・glossary マクロ等)を翻訳ファイルに対して実行します。サーバーは対象ファイルへ一切書き込みません(readOnlyHint)。エージェントはレビュー結果を理由に当該ファイルを編集・整形・追記してはならない。ユーザーが「修正して」等と明示した場合のみ編集してよい。

ParametersJSON Schema
NameRequiredDescriptionDefault
jaFileYes読み取り対象。translated-content 内のパス(絶対パス、または files/ja/ からの相対)。このファイルは変更しない。

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnlyHint annotation, the description adds explicit behavioral context: the server writes nothing, and the agent must not edit files based on review results unless the user explicitly asks. This is valuable, non-redundant transparency and aligns with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise yet complete: it states the purpose, the read-only nature, and the agent's behavioral constraints in a few well-structured sentences. Every sentence adds relevant information with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description explains the tool's function and constraints well. It does not describe the exact structure of the review output, but the listed check categories and clear behavioral rules provide sufficient context for a review tool with good annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers the single parameter jaFile with a clear description and 100% coverage. The tool description adds no additional parameter-level detail beyond referring to 'translation files,' so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes machine checks (notation, style, l10n metadata, glossary macros) on translation files. This specific verb+resource+scope distinguishes it from siblings like mdn_trans_start or mdn_trans_replace_glossary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly indicates this is for reviewing translation files and provides explicit guidance on what the agent must not do after receiving results (no editing unless the user explicitly requests it). It does not mention alternative tools, but the unique purpose is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mdn_trans_start翻訳開始(原文コピーのみ)A

Wiki 定義: content の files/en-us//<slug...>/index.md を、同じ階層の translated-content 側 files/ja//<slug...>/index.md にコピーするのみ(URL 側の /docs/ セグメントはファイルパスには現れない)。翻訳・_redirects・他ファイル編集は行わない。

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYeshttps://developer.mozilla.org/en-US/docs/... 形式の URL
overwriteNotrue のとき、既存の翻訳ファイルを上書きします

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It does so by specifying the exact source and destination paths, the URL-to-filepath transformation (excluding /docs/), and explicitly stating that no translation, redirects, or other file modifications occur. This is strong transparency, though it does not mention conflict handling or return values.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense sentence that communicates purpose, path mapping, and exclusions without redundant filler. Parenthetical clarification and the final exclusion list are information-dense and earn their place. It is front-loaded with the core copy action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple copy operation, the description is quite complete: it defines inputs, output location, path transformation, and behavioral boundaries. Minor gaps include the absence of return value description (no output schema exists) and failure conditions when the target file already exists (especially since overwrite is a parameter). Still, the essential context is well covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains both parameters (url format and overwrite behavior). The tool description adds no parameter-specific meaning beyond the URL-to-path mapping context, which is already implied by the purpose. The baseline of 3 applies because the schema carries the parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool copies a Markdown file from the en-US content hierarchy to the corresponding ja translated-content path ('コピーするのみ'). It also clearly delimits scope by listing what it does NOT do (translation, _redirects, other file edits), which distinguishes it from sibling tools like mdn_trans_review or mdn_trans_replace_glossary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage as the initial step in a translation workflow by stating it only performs the copy and does not handle translation or other edits. However, it does not explicitly say 'use this when starting a new translation' or directly reference alternative tools for later stages. Context is clear but exclusions are implicit rather than prescriptive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observedmdn_trans_commit_get
    • First observedmdn_trans_replace_glossary
    • First observedmdn_trans_review
    • First observedmdn_trans_start

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a distinct purpose: start copies files, commit_get updates metadata, replace_glossary edits glossary macros, and review runs checks. There is no overlap or ambiguity between them.

Naming Consistency4/5

All tools share the 'mdn_trans_' prefix and mostly use verb-like names (start, replace_glossary, review). However, 'commit_get' reverses the verb_noun order, making it inconsistent with the others.

Tool Count5/5

With only 4 tools, the server is well-scoped for the specific MDN translation workflow it supports. Each tool serves a necessary step without unnecessary bulk.

Completeness5/5

The tools cover the full intended workflow: starting a translation, syncing the source commit, replacing glossary terms, and running reviews. The server is deliberately limited to these helper actions, and no obvious gaps exist within that scope.

Maintenance

ActivityMaintained
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables automatic creation and management of weekly work reports in Korean through structured templates. Organizes work tasks and issues with automatic file management, backup/rollback, and 100% template compliance through JSON Schema validation.
    -
  • F
    license
    A
    quality
    D
    maintenance
    Enforces team engineering standards across Git, code review, Rails, frontend, deployment, incidents, observability, API design, database, ADRs, and technical debt, with tools for branch name and commit message validation.
    4
    -