OK

oscillatelabsllc/kiwix-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

10 stars 3 forks 品質 70 トレンド 32

Kiwix HTTP サーバ用の MCP サーバーと Python クライアントライブラリ.

概要

Kiwix HTTP サーバ用の MCP サーバーと Python クライアントライブラリ。 (Debian bookworm パッケージ) と newer -based のデプロイに対してテスト済みです。 任意の標準的なkiwix-serve展開が動作するはずです。 - kiwix-serve は、 OPDS カタログ href 属性で unescaped と OPDS の href 属性を出す - Newer サーバは、ライブラリが複数の言語に及ぶときにブックスコープを必要とする - クライアントは、その場合の指示で明確なエラーを返す - Newer サーバはパスプレフィックス URL スキーム (例: /kiwix/content/book slug) — slug と記事 URL の処理が自動的に適応します Claudeデスクトップコンフィグ(~/ Library/Application Support/Claude/claude desktop config.json) Claude コード — ユーザースコープに追加して、すべてのプロジェクトで利用できます。 次に、MCP クライアントを [http://localhost:8000/sse. で指定します。 次に、MCP クライアントを [http://localhost:8000/mcp. で指定します。 ブラウザベースのMCPクライアント(例:llama-server WebUI)でHTTPトランスポートを使用する場合、CORSヘッダーは自動的に追加されます。 デフォルトではすべてのオリジンが許可されています.

概要(AI 翻訳)

Kiwix HTTP サーバ用の MCP サーバーと Python クライアントライブラリ。

互換性

kiwix-tools (Debian [bookworm]]]) と newer libkiwix ベースのデプロイメントに対してテストしました。 任意の標準[kiwix-serve]の展開が動作するはずです。

既知のquirksは透明に処理しました:

  • kiwix-serve は OPDS カタログ [href] の unescaped [&] を出力します。
  • 新しいサーバーは、ライブラリが複数の言語に及ぶときにブックスコープを必要とします。クライアントは、その場合の指示で明確なエラーを返します。
  • 新しいサーバーは、パスプレフィックスURLスキーム([/kiwix/content/book_slug])を使用します。 slugと記事のURL処理は自動的に適応します

ツール

ツール 概要
[kiwix_list_books ZIM 書籍一覧・オプションタイトルフィルタ
[kiwix_search 全書籍・特定の書籍を横断した全文検索
[kiwix_fetch_article URLで記事を原文として書き込む

インストール

または紫外線と:

使用法

stdio (Claude デスクトップ/Claude コード)

Claudeデスクトップコンフィグ(~/Library/Application Support/Claude/claude_desktop_config.json)):

Claude コード — ユーザースコープに追加して、すべてのプロジェクトで利用できます。

################################################################################################################################################################################################################################################################

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

kiwix-mcp

MCP server and Python client library for Kiwix HTTP servers.

Compatibility

Tested against kiwix-tools (Debian bookworm package) and newer libkiwix-based deployments. Any standard kiwix-serve deployment should work.

Known quirks handled transparently:

  • kiwix-serve emits unescaped & in OPDS catalog href attributes
  • Newer servers require a book scope when the library spans multiple languages — the client returns a clear error with instructions in that case
  • Newer servers use a path-prefixed URL scheme (e.g. /kiwix/content/book_slug) — slug and article URL handling adapts automatically

Tools

Tool Description
kiwix_list_books List available ZIM books; optional title filter
kiwix_search Full-text search across all books or a specific book
kiwix_fetch_article Fetch an article as plain text by URL

Installation

pip install kiwix-mcp

Or with uv:

uv pip install kiwix-mcp

Usage

stdio (Claude Desktop / Claude Code)

kiwix-mcp --base-url http://localhost:8080
# or
KIWIX_BASE_URL=http://localhost:8080 kiwix-mcp

Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "kiwix": {
      "command": "kiwix-mcp",
      "args": ["--base-url", "http://localhost:8080"]
    }
  }
}

Claude Code — add at user scope so it’s available in all projects:

claude mcp add --scope user --transport http kiwix https://your-kiwix-mcp-host/mcp/

SSE

kiwix-mcp --transport sse --base-url http://localhost:8080

Then point your MCP client at http://localhost:8000/sse.

HTTP (streamable)

kiwix-mcp --transport streamable-http --base-url http://localhost:8080

Then point your MCP client at http://localhost:8000/mcp.

CORS (browser-based clients)

When using HTTP transports with browser-based MCP clients (e.g. llama-server WebUI), CORS headers are added automatically. By default all origins are allowed.

To restrict allowed origins:

kiwix-mcp --transport streamable-http --base-url http://localhost:8080 \
  --cors-allow-origins "http://localhost:3000,http://myapp.example.com"
# or
CORS_ALLOW_ORIGINS="http://localhost:3000" kiwix-mcp --transport streamable-http --base-url http://localhost:8080

CORS has no effect on stdio transport.

Docker

GitHub で README 全文を見る

インストール

docker run -e KIWIX_BASE_URL=http://your-kiwix-server:8080 \
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "kiwix": { "command": "kiwix-mcp", "args": ["--base-url", "http://localhost:8080"] } } }