openwiki-mcp
openwiki-mcp
OpenWiki (OpenChamber) のドキュメント生成機能を Model Context Protocol ツールとして公開する MCP サーバーです。公式の未改変の OpenCode(または任意の MCP ホスト)がリポジトリの Wiki を生成・更新できるようにします。
opencode のソースツリーから完全に独立しています。openwiki 自体は外部パッケージ(npm インストールまたはステージングされたオフラインバンドル)として解決され、エージェントの認証情報は環境変数を介して中継され、保存されることはありません。
ツール
ツール | 対応するエージェント | 備考 |
| — (ローカル限定) |
|
|
| 初回の Wiki 生成を行います。オプションの |
|
| 差分ベースの更新。古いページのみ再生成されます。 |
Related MCP server: Minecraft Wiki MCP Server
前提条件
Node.js >= 22(MCP サーバーとエージェントの子プロセスの両方が
nodeで実行されます)openwiki パッケージのインストール:
npm install -g openwiki # online machine, or# offline machine: copy a prepared bundle and point at it set OPENWIKI_PACKAGE_ROOT=D:\path\to\staged\bundle\node_modules\openwikiOPENWIKI_PACKAGE_ROOTは、パッケージルートを直接指すか、node_modules/openwikiを含むレイアウトを指すことができます。ステージングされたバンドルは、ジャンクションやシンボリックリンクのトリックを必要としません。Node は通常のnode_modules探索を通じてエージェントのベアインポートを解決します。
エージェントモデルの設定
サーバーは以下の変数をエージェントの子プロセスに中継し(保存はしません):
環境変数 (サーバー側) | 意味 |
|
|
| モデル ID(例: |
| ローカルの OpenAI 互換ゲートウェイを指定し、実際のキーをエージェント環境から遠ざけます |
| openai-compatible プロバイダーのキー |
|
|
| オプション。openwiki インストールへの明示的なパス |
呼び出しごとの modelId/language/userMessage ツール引数は、その実行において周囲の環境設定を上書きします。
OpenCode への登録
opencode.json / opencode.jsonc に以下を追加してください:
{
"mcp": {
"openwiki": {
"type": "local",
"command": ["node", "D:/path/to/openwiki-mcp/dist/index.js"],
"environment": {
"OPENWIKI_PACKAGE_ROOT": "D:/path/to/staged/bundle/node_modules/openwiki",
"OPENWIKI_PROVIDER": "openai-compatible",
"OPENWIKI_MODEL_ID": "gpt-5",
"OPENAI_COMPATIBLE_BASE_URL": "http://127.0.0.1:4096/v1"
}
}
}
}これにより、3 つのツールがすべての OpenCode 会話で通常のツールとして利用可能になります。
開発
npm install
npm run build # tsc -> dist/
npm test # node --test (status inspection unit tests)
npm run dev # run the server via tsx (dev)スモークテスト:
node scripts/smoke.mjs <dir> status # local inspection only
node scripts/smoke.mjs <dir> init "note" # full agent run (needs model env)手動 MCP プロトコルチェック:
@'
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":1,"method":"tools/list"}
'@ | node dist/index.js設計ノート
src/openwiki/resolve.ts— パッケージ解決:OPENWIKI_PACKAGE_ROOT、次にrequire.resolve("openwiki/package.json")。src/openwiki/worker.mjs— アダプターワーカー: 標準入力から 1 つのジョブを読み取り、エージェントエントリを絶対パスでインポートし、標準出力に NDJSON 進捗を出力します。opencode フォークのpackages/openwikiアダプターから移植され、独立して維持されています。src/openwiki/run.ts— MCP サーバーの子プロセスとしてワーカーを起動するため、ハングしたエージェントが MCP ホストをダウンさせることはありません。src/status.ts— ローカルステータス検査(モデルコストなし)。v0.1 では
generateをエージェントのinitコマンドにマッピングしており、これは openwiki 0.3.x でinitが初回生成コマンド、updateが更新コマンドであることに対応しています。
This server cannot be deployed
Maintenance
Related MCP Connectors
- FlowdexOAuthdk.flowdex
Read and write your team's shared, AI-readable wiki from any MCP client.
Hosted markdown project wikis your team's AI assistants read, search, and update over MCP.
One wiki for all your agents: pages read and written over MCP, a link graph, and broken-link checks.
- hiveWikiOAuthai.hivewiki
Shared project wiki for AI agents: read and write pages, next actions, and activity logs over MCP.
Related MCP Servers
- AlicenseBqualityCmaintenanceMCP server for codewiki.google — AI-powered wiki documentation for open-source repositories. Search repos, fetch wiki content, and ask questions about any repo.349 npm17MIT
- AlicenseAqualityDmaintenanceEnables searching and retrieving Minecraft Wiki content in multiple formats (wikitext, HTML, markdown) through MCP tools, with batch retrieval and health monitoring.51MIT
- FlicenseAqualityDmaintenanceMCP server for managing GitHub wiki pages programmatically, enabling create, read, update, delete, and list operations via git cloning and pushing.51-
- AlicenseNot gradedqualityCmaintenanceMCP server to query a Git-hosted Wiki, offering tools to list, search, and read Markdown documents via Codex or VS Code.MIT