Skip to main content
Glama
wolf123450

STE Dictionary MCP Server

by wolf123450

STE Dictionary MCP Server

ASD-STE100シンプル・テクニカル・イングリッシュ(STE)に対してテキストをチェックするMCPサーバー:どの単語が承認されているか、されていないか、各違反をどのSTEの単語に置き換えるか。data/内の静的な辞書スナップショットから完全にオフラインで動作し、実行時のネットワークアクセスは不要。完全な設計はdocs/superpowers/specs/2026-08-21-ste-mcp-design.mdを参照。

セットアップ

pip install -r requirements.txt
python scripts/download_nltk_data.py
pytest

check_structureツールは、2つの小さなNLTKデータパッケージ(punkt_tab文/単語トークナイザーとaveraged_perceptron_tagger_eng品詞タガー。古典的な統計モデルであり、ディープラーニングではない)を必要とする。依存関係のインストール後にpython scripts/download_nltk_data.pyを一度実行すると、それらがダウンロードされ、NLTKのダウンローダーがデフォルトで取得する英語以外のトークナイザー言語がトリミングされ、ディスク上のフットプリントが約58MBではなく数MBに抑えられる。再実行しても安全。この手順をスキップすると、check_structureは実行を促すRuntimeErrorをスローする。

サーバーはSTE_DATA_DIR環境変数から辞書スナップショットを読み取り、デフォルトは./data(サーバーが起動された作業ディレクトリからの相対パス)。data/内のスナップショットはこのリポジトリにコミットされているため、別途ダウンロード手順は不要。

Related MCP server: mcp-textstats

スタンドアロンでの実行

python -m ste_mcp.server

stdioでMCPを話す。

Claude Codeへのインストール

Claude Code CLIでサーバーを登録する。PATH上のpythonにmcpパッケージがインストールされていない場合は、Pythonインタープリタへの絶対パスを使用する。

ローカルスコープ(Claude Codeがこのリポジトリから実行された場合のみ利用可能):

cd /absolute/path/to/ste-dictionary-mcp
claude mcp add --transport stdio --env STE_DATA_DIR=/absolute/path/to/ste-dictionary-mcp/data ste-dictionary -- python -m ste_mcp.server

ユーザースコープ(任意のディレクトリから利用可能)。ユーザースコープのサーバーはこのリポジトリを作業ディレクトリとして実行されないため、最初にリポジトリにcdする小さなスクリプト(例:~/.claude/ste-launcher.sh)で起動をラップする:

#!/bin/sh
cd /absolute/path/to/ste-dictionary-mcp
exec python -m ste_mcp.server

次に登録する:

chmod +x ~/.claude/ste-launcher.sh
claude mcp add --transport stdio --scope user --env STE_DATA_DIR=/absolute/path/to/ste-dictionary-mcp/data ste-dictionary -- ~/.claude/ste-launcher.sh

claude mcp listまたはセッション内の/mcpで確認する。

Claude Desktopの設定

claude_desktop_config.jsonに追加:

{
  "mcpServers": {
    "ste-dictionary": {
      "command": "python",
      "args": ["-m", "ste_mcp.server"],
      "cwd": "/absolute/path/to/ste-dictionary-mcp",
      "env": {
        "STE_DATA_DIR": "/absolute/path/to/ste-dictionary-mcp/data"
      }
    }
  }
}

ツール

ツール

目的

check_word(word)

この単語/フレーズはSTEか、何に置き換わるか。

check_text(text, include_unknown=True)

ドキュメントをスキャンして、非STE、曖昧、不明、技術用語を位置情報付きで検出する。

check_structure(text)

ドキュメントをスキャンして、構造的なSTE違反(長すぎる文、受動態、命令形でない、4つ以上の名詞の連続、長すぎる段落、動名詞の名詞用法)を検出する。

lookup_technical_term(term)

承認済みの技術用語または略語を検索する。

dictionary_info()

辞書の出典、鮮度、カバレッジの統計。

check_word/check_textは単語リストベースであり、文法チェッカーではない:語彙はチェックするが、文の構造はチェックしない。check_structureは、単語リストでは捕捉できないASD-STE100ルールに対して、(本格的な文法エンジンではなく、小さな統計的POSタガーによる)軽量な構造チェックを追加する。正確なルールとそのヒューリスティックな限界については、ste_mcp/structure.pyのdocstringを参照。これは診断のみ(書き換え提案はなし)。これらのツールを使用するエージェントが書き換えを担当する。

一部の単語には、STE承認済みの意味と非STEの意味の両方がある(例:「long」は普通の形容詞としてはSTEだが、「as long as」/「no longer」はそうではない)。これらの場合、check_wordはstatus: "ambiguous"("non_ste"の代わりに)と、どの意味が文脈に当てはまるかを呼び出し側が検証するよう促すnoteを返し、check_textはnon_steではなく別のambiguousバケット/サマリーカウントで報告する。status: "non_ste"は、一致したすべての意味が非STEである単語にのみ予約されている。

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides lightweight documentation review tools including issue detection, readability scoring, style checking, and document summarization for integration with MCP-compatible clients.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides text statistics and readability scores (Flesch Reading Ease, Flesch-Kincaid Grade Level) via offline, keyless tools.
    9 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables automated agents and writers to check Norwegian and English prose before sending, returning concrete style findings, revision hints, and verdicts instead of authorship claims, with a no-judgment band, positive quality checks, a private local mode, and phrase-bank memory.
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables deterministic, LLM-free checking of text against a prose editorial standard, returning violations with rule IDs, locations, severity, confidence, and suggested fixes, while also supporting safe fixes and writing measurements.
    5
    304 npm
    MIT