Skip to main content
Glama
mirza1272

wordsmith-mcp

by mirza1272

Wordsmith MCP

MCP(Model Context Protocol)サーバーであり、MCP互換のAIクライアントにオフラインのテキスト分析・書き換えツール一式を提供します — 統計、抽出的要約、キーワード抽出、可読性スコア、命名ケース変換、エンティティ抽出、テキスト差分。

APIキーは不要です。ネットワーク呼び出しもありません。状態もどこにも保存されません。すべては渡されたテキストに対してローカルで実行されるため、高速かつ無料で、非公開文書にも安全に使用できます。

MCP Python SDK で構築されています。


存在理由

言語モデルはテキストの判断は得意ですが、計測は驚くほど当てになりません — 正確な単語数やFleschスコアを尋ねても、推測で答えるだけです。Wordsmithは、そうした作業に対してモデルに決定的な計算機を提供するため、文書の長さ、難易度、重要な用語に関する回答は、推定ではなく計算によって得られます。


Related MCP server: armavita-originality-ai-mcp

ツール

ツール

機能

主なパラメータ

text_stats

文字数、単語数、固有単語数、文数、段落数、行数、平均単語長・文長、推定読了時間

text

summarize_text

抽出的要約 — 意味のある単語の頻度で文をスコアリングし、最良の文を元の順序で返します

textmax_sentences(1〜20、デフォルト3)

extract_keywords

頻出する意味のある単語を出現数と相対頻度付きで抽出。ストップワードは除外

textlimit(1〜50、デフォルト10)、min_length

readability

Flesch Reading Ease + Flesch–Kincaidグレードレベル。平易な言葉での解釈付き

text

convert_case

snakekebabslugcamelpascalconstanttitlesentenceupperlower に変換します

textstyle

extract_entities

メールアドレス、URL、ハッシュタグ、メンション、電話番号、単独の数値を抽出します

text

diff_texts

下書きと改訂版の間のunified形式の行単位差分

beforeaftercontext_lines

すべてのツールは readOnlyHint: trueopenWorldHint: false と注釈付けされています — 何も変更せず、インターネットにもアクセスしません。


git clone https://github.com/mirza1272/wordsmith-mcp.git
cd wordsmith-mcp
python3 -m venv .venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate
pip install -e .

実行:

wordsmith-mcp

サーバーは stdio 経由でMCPを話し、クライアントを待って待機し続けます — これは正常な動作であり、ハングアップではありません。クライアント側がサーバーを起動します。詳細は以下を参照してください。

動作確認

python scripts/smoke_test.py

実際のMCPクライアントと同じようにサーバーを起動し、ツール一覧を取得して各ツールをすべて呼び出し、結果を表示します。

単体テストの実行

pip install -e ".[dev]"
pytest -q

クライアントへの接続

Claude Desktop

claude_desktop_config.json を編集します:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "wordsmith": {
      "command": "/absolute/path/to/wordsmith-mcp/.venv/bin/wordsmith-mcp"
    }
  }
}

Claude Desktopを再起動し、「この段落の読みやすさは?上位5キーワードは?」 のように尋ねてみてください。

Claude Code

claude mcp add wordsmith -- /absolute/path/to/wordsmith-mcp/.venv/bin/wordsmith-mcp

Cursor / Windsurf / その他のクライアント

mcpServers ブロックを受け付けるクライアントはすべて、上記のClaude Desktopの例と同じ形式を使用します。

MCP Inspector(ビジュアルデバッグ)

npx @modelcontextprotocol/inspector .venv/bin/wordsmith-mcp

ブラウザUIが開き、各ツールを手動で呼び出したり、生のJSON-RPCトラフィックを検査したりできます。


HTTPモード(ホステッドデプロイ向け)

同じサーバーは streamable HTTP にも対応しています。これはホステッドのマーケットプレイスが使用する方式です:

TRANSPORT=http PORT=8081 wordsmith-mcp

MCPエンドポイントは http://localhost:8081/mcp になります。

環境変数

デフォルト

意味

TRANSPORT

stdio

ローカルクライアント用は stdio、ホステッド用は http

HOST

0.0.0.0

HTTPモードでのバインドアドレス

PORT

8081

HTTPモードでのバインドポート

MCP_PATH

/mcp

MCPエンドポイントが提供されるHTTPパス


デプロイ

Smitheryの公開フォームは稼働中のHTTPS MCPエンドポイントを必要とするため、サーバーを先にホストしてから登録します。そのために Dockerfilerender.yaml が含まれています。smithery.yaml はコンテナを直接ビルドするホスト向けに用意されています。

詳しい手順: DEPLOY.md

要するに:コンテナをホスト(Render、Railway、Fly.io — render.yaml が含まれています)にデプロイし、生成された https://<host>/mcp URLをSmitheryに公開します。

まずローカルでコンテナをビルドして動作確認しておくとよいでしょう:

docker build -t wordsmith-mcp .
docker run --rm -p 8081:8081 wordsmith-mcp

プロジェクト構成

wordsmith-mcp/
├── src/wordsmith_mcp/
│   ├── __init__.py        # package exports
│   ├── __main__.py        # python -m wordsmith_mcp
│   ├── server.py          # MCP server: tool definitions and schemas
│   └── textutils.py       # pure text logic, no MCP imports
├── scripts/smoke_test.py  # end-to-end client that exercises every tool
├── tests/test_textutils.py
├── examples/claude_desktop_config.json
├── Dockerfile
├── smithery.yaml
├── pyproject.toml
└── README.md

textutils.py はアルゴリズムを保持し、MCPからは何もインポートしないため、ロジック単体でユニットテストが可能です。server.py はそれらの関数をモデルに説明する薄いプロトコル層です。


仕組み(MCPの60秒ツアー)

MCPは、AIクライアントがサーバーによって公開されたツールを発見して呼び出すことを可能にするJSON-RPCプロトコルです。

  1. クライアントがサーバーを起動します(stdio 経由のサブプロセスとして、または HTTP 経由で接続)。

  2. クライアントとサーバーは、プロトコルバージョンと機能を通知する initialize ハンドシェイクを交換します。

  3. クライアントは tools/list を呼び出します。SDKはPythonの型ヒントと Field(...) の説明から各ツールのJSON Schemaを生成するため、モデルはどの引数が有効かを正確に把握できます。

  4. モデルがツールを必要と判断すると、クライアントは引数付きで tools/call を送信します。サーバーはPython関数を実行し、結果を人間が読めるテキストと、宣言された出力スキーマに一致する structuredContent の両方として返します。

したがって、ツールを追加するには、型付きのPython関数を書いて @mcp.tool(...) でデコレートするだけです。


このリポジトリの関連資料

  • WRITEUP.md — 既存のMCPサーバー(Context7)の利用と、このサーバーの構築を通して学んだことについての私の記事。

  • DEPLOY.md — このサーバーをSmitheryとGlamaに公開するためのステップバイステップガイド。


ライセンス

MIT — LICENSE を参照してください。

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.

  • Free OpenAI-compatible inference with signed provenance receipts and 3 focused MCP tools.

  • Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mirza1272/wordsmith-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server