MediaWiki MCP Server
AIエージェントが、MediaWikiを使うどのwikiでも、Wikipediaを含めて、ページを読み、検索し、編集できるようにします。
147 GitHubのスター作者 Professional Wikiライセンス MIT更新 18 日前
導入方法
このMCPはローカル型です。あなたのパソコンで動きます。
パソコンに入れたアプリ(Claude Desktop、Claude Code、Cursor、VS Codeなど)で使えます。アプリを選んでください:
ターミナルに貼り付け:
claude mcp add mediawiki -- npx -y @professional-wiki/mediawiki-mcp-server
入力するもの
| 名前 | 内容 | 必須 |
|---|---|---|
CONFIG | Path to your configuration file | いいえ |
MCP_ALLOW_STATIC_FALLBACK | Set to 'true' to allow HTTP startup when config.json has static credentials. Otherwise the server refuses to start, preventing silent shared-identity fallback for unauthenticated requests. | いいえ |
MCP_CONTENT_MAX_BYTES | Byte cap for the content bodies and result blocks tools return (wikitext, rendered HTML, diffs, statement and row listings). An oversized response is truncated with a trailing marker describing what was left out. | いいえ |
MCP_FILE_DATA_MAX_BYTES | Hard cap on the base64-encoded size of a get-file-data response. A transport/safety backstop; callers tune actual size with the tool's width parameter. Over-cap responses error rather than truncate. | いいえ |
MCP_LOG_LEVEL | Minimum severity for logger output (stderr telemetry and sendLoggingMessage broadcast). Invalid values fail loudly on first log call. | いいえ |
MCP_MAX_REQUEST_BODY | Maximum HTTP request body size on the StreamableHTTP transport. Accepts size strings like 1mb or 512kb. | いいえ |
MCP_METRICS | Set to 'true' to expose Prometheus metrics at GET /metrics on the HTTP transport. Has no effect on the stdio transport. | いいえ |
MCP_OAUTH_ALLOWED_REDIRECTS | Additional allowed redirect URIs for hosted-proxy client registration: comma-separated exact URIs (which must include a host) and https prefix patterns ending in /*. Loopback, claude.ai, and verified first-party clients (ChatGPT, Cursor, VS Code) are always allowed; unset means no additional clients. | いいえ |
MCP_OAUTH_CIMD_ALLOWED_HOSTS | Comma-separated additional client_id document hosts trusted for CIMD (bare host or host:port). Verified first-party hosts are always trusted. | いいえ |
MCP_OAUTH_CREDENTIALS_FILE | Override the default OAuth credentials store path. Default: ~/.config/mediawiki-mcp/credentials.json on Linux/macOS, %APPDATA%\mediawiki-mcp\credentials.json on Windows. | いいえ |
MCP_OAUTH_NO_BROWSER | Set to '1' to skip launching a browser during the OAuth dance and log the auth URL to stderr instead. Useful in headless environments and CI. | いいえ |
MCP_OAUTH_PROXY_STORE_FILE | Path to the hosted OAuth proxy's encrypted state file, which lets sign-ins survive restarts. Default: proxy-store.enc under the mediawiki-mcp config dir; /app/data/proxy-store.enc in the Docker image. | いいえ |
MCP_PUBLIC_URL | Override the request-derived public URL used in the protected-resource discovery doc and WWW-Authenticate header. Set this when running behind a proxy that rewrites the request Host. | いいえ |
MCP_SHUTDOWN_GRACE_MS | Maximum milliseconds to wait for in-flight /mcp calls to drain on SIGTERM/SIGINT before exiting. Capped at 600000. | いいえ |
MCP_TRANSPORT | Type of MCP server transport | いいえ |
MCP_UPLOAD_MAX_BYTES | Memory cap on the server-side fetch used by upload-file-from-url and update-file-from-url. Files larger than this are routed to the wiki's own copy-upload instead of being buffered by the server. Guards this server's memory, not the wiki's $wgMaxUploadSize. | いいえ |
MCP_USER_AGENT | Replaces the User-Agent header of every outbound request, which defaults to mediawiki-mcp-server/<version> (https://github.com/ProfessionalWiki/MediaWiki-MCP-Server). If you set it, give a name and an email or URL, e.g. 'ExampleBot/1.0 (bot@example.org)'. | いいえ |
PORT | Port used for StreamableHTTP transport | いいえ |
準備完了!試してみましょう
アプリを再起動して、次のどれかをチャットに貼ってください:
リリースの手順についてのページを、wikiで検索してください。
インストールのページの直近10回の編集を見せてください。
概要
このサーバーは、MediaWikiで動くどのwikiにも、AIエージェントを接続します。エージェントはページを検索して読み、版を比べ、カテゴリやファイルを閲覧できます。サインインしている場合は、ページを作成、編集、移動、ファイルをアップロードできます。複数のwikiで動き、NeoWiki、Semantic MediaWiki、Cargo、Bucket、Wikibaseのための追加のツールがあります。
できること
search-page: wikiの全文検索get-page: ページを取得するget-page-history: 最近の版を一覧にするcompare-pages: 2つの版の差分を取るget-category-members: カテゴリのページを一覧にするcreate-page: ページを作る(サインインが必要)update-page: ページを編集する(サインインが必要)upload-file: ファイルをアップロードする(サインインが必要)
使う場面
- ›エージェントに、wikiで何かを調べさせたいとき
- ›wikiを管理していて、ページの編集や移動を手伝ってほしいとき
- ›ページの2つの版を比べたいとき
必要なもの
相性のいいスキル
MCPかスキルか
MCPはエージェントに手を与え、スキルはその正しい使い方を教えます。組み合わせると、結果が良くなりトークンも節約できます。
よくある質問
無料ですか?
はい。パッケージはnpmにあり、READMEにはオープンソースのライセンスのバッジが表示されています。
ログインが必要ですか?
公開のwikiを読むには不要です。錠のマークが付いたツールは、認証が必要です。
複数のwikiで使えますか?
はい。各ツールは任意のwiki引数を受け取り、設定ファイルにwikiを一覧にします。
変更を止められますか?
はい。readOnlyをtrueに設定したwikiでは、書き込みのツールは拒否されます。
どの拡張機能に対応していますか?
NeoWiki、Semantic MediaWiki、Bucket、Cargo、Wikibaseのツールは、その拡張機能がインストールされたwikiでだけ登録されます。
MediaWiki社が作っていますか?
いいえ。Professional Wikiが作っています。
うまく動かないとき
- ›プライベートなwikiを使う場合は、config.jsonを作ってください。別の場所にある場合は、CONFIGにそのパスを設定してください。
- ›ブラウザのないサーバーでOAuthを使う場合は、MCP_OAUTH_NO_BROWSER=1を設定し、ログに出たURLを開いてください。
- ›応答が途中で切れる場合は、MCP_CONTENT_MAX_BYTESを大きくしてください。
毎週5つの新しいスキル。1分で読めます。