Skip to main content
Glama

dictionary-mcp

プロジェクトの中で用語を統一するための辞書MCP

概要

dictionary-mcp は、プロジェクト固有の用語を管理するための Model Context Protocol (MCP) サーバーです。 用語の追加・検索・更新・削除が可能で、同じ用語でもコンテキスト(文脈・分野)によって異なる訳を使い分けできます。

Related MCP server: AuditSocials Glossary MCP

提供ツール

ツール名

説明

lookup_term

用語の定義を検索。context を指定するとその文脈に合った訳を返します

list_terms

登録済み用語の一覧を返します(コンテキスト別の訳も表示)

add_term

新しい用語を追加。context で文脈を指定可能

update_term

定義を更新。context を指定すると文脈別の定義を追加・更新

delete_term

辞書から用語を削除します

コンテキスト(instructions)

MCP の instructions により、AI クライアント(Claude など)に辞書の使い方を案内しています。翻訳・執筆のタイミングや推奨ワークフローを伝えることで、適切な場面でツールが利用されるようになります。

セットアップ

前提条件

  • Node.js 18 以上

  • pnpm

インストール

pnpm install
pnpm build

開発用起動

pnpm dev

MCP クライアントへの設定

方式1: stdio(ローカル)

Claude Desktop などの MCP クライアントに以下の設定を追加してください。

{
  "mcpServers": {
    "dictionary-mcp": {
      "command": "node",
      "args": ["/path/to/dictionary-mcp/dist/index.js"]
    }
  }
}

方式2: SSE(HTTP / リモート公開)

SSE で HTTP サーバーとして起動し、URL 経由で MCP に接続できます。

起動:

pnpm build
pnpm start:sse
# デフォルトで http://localhost:3030/mcp で待ち受け
# ポートは環境変数 PORT で変更可能(例: PORT=8080 pnpm start:sse)

クライアント設定例(mcp-proxy 経由):

Claude Desktop など stdio のみサポートするクライアントは、mcp-proxy を使ってリモート SSE サーバーに接続できます。

{
  "mcpServers": {
    "dictionary-mcp": {
      "command": "npx",
      "args": [
        "mcp-proxy",
        "--transport",
        "streamablehttp",
        "http://localhost:3030/mcp"
      ]
    }
  }
}

Claude Code の場合: Streamable HTTP との互換性問題があるため、type: "sse" を指定してください。

{
  "mcpServers": {
    "dictionary-mcp": {
      "type": "sse",
      "url": "http://localhost:3030/mcp"
    }
  }
}

URL ベースの MCP を直接サポートするクライアント(Cursor など)では、http://localhost:3030/mcp をそのまま指定できる場合があります。

辞書データ

用語データは dictionary.json に保存されます。このファイルはリポジトリにコミットすることで、チーム全体で辞書を共有できます。

dictionary.json のフォーマット

{
  "terms": {
    "用語名": {
      "definitions": [
        { "description": "デフォルトの訳" },
        { "context": "文脈名", "description": "その文脈での訳" }
      ],
      "aliases": ["別名1", "別名2"],
      "updatedAt": "2025-02-25T12:00:00.000Z"
    }
  }
}

フィールド

必須

説明

terms

○

用語名をキーとするオブジェクト

terms[用語名].definitions

○

定義の配列。コンテキスト別に複数持てる

terms[用語名].definitions[].description

○

訳・定義

terms[用語名].definitions[].context

-

文脈・分野(例: 行政・ビジネス、プロジェクト・技術)

terms[用語名].aliases

-

別名・別表記の配列

terms[用語名].updatedAt

○

更新日時(ISO 8601 形式)

context を持たない定義がデフォルトとして扱われます。lookup_term で context を指定した場合、一致するコンテキストの定義を返し、なければデフォルトを返します。

例(コンテキスト別の訳):

{
  "terms": {
    "実施": {
      "definitions": [
        { "description": "administration" },
        { "context": "プロジェクト・技術", "description": "implementation" }
      ],
      "updatedAt": "2025-02-25T12:00:00.000Z"
    },
    "帳票": {
      "definitions": [{ "description": "report" }],
      "aliases": ["レポート", "一覧表"],
      "updatedAt": "2025-02-25T11:00:00.000Z"
    }
  }
}

add_term や update_term ツールで用語を追加・更新すると、updatedAt は自動で設定されます。旧フォーマット(description 単体)で書かれた辞書も読み込み時に自動で新フォーマットへ変換されます。

Available Tools

5 tools
add_termA

新しい用語と定義を辞書に追加します。既に存在する用語の場合はエラーを返します。

Inputs: term (required), description (required), aliases, context.

delete_termC

辞書から用語を削除します。

Inputs: term (required).

list_termsA

辞書に登録されている全用語の一覧を返します。コンテキスト別の定義がある用語は、複数の訳を表示します。

Inputs: no named parameters.

lookup_termA

指定した用語の定義をプロジェクト辞書から検索します。コンテキストを指定すると、その文脈に合った訳を返します。

Inputs: term (required), context.

update_termA

辞書に登録済みの用語の定義を更新します。context を指定すると、その文脈用の定義を追加・更新します。

Inputs: term (required), aliases, context, description.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct action on the same domain object: lookup a term, list terms, add a term, update a term, and delete a term. The boundaries between lookup_term and list_terms are especially clear because one retrieves a specific definition while the other returns the full inventory.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern: lookup_term, list_terms, add_term, update_term, delete_term. The convention is predictable and easy for an agent to infer.

    Tool Count5/5

    Five tools are well-scoped for a project dictionary MCP server. Every tool corresponds to a core operation, and there is no obvious redundancy or missing major capability that would justify additional tools.

    Completeness4/5

    The surface covers the full core lifecycle: lookup, list, create, update, and delete. A minor gap is that context-specific behavior is described for lookup and update but not explicitly for deletion or creation, though the core CRUD workflow is complete.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables read-only Chinese–English terminology lookup, consistency and forbidden-variant checking of documents, validation of aligned source/target translation pairs, and extraction of applicable glossary terms for a given text. It exposes four tools over an offline local SQLite terminology library using approved entries, without translating text or modifying files.
      MIT