JW

jaalbin24/wikijs-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

19 stars 12 forks 质量 70 趋势 36

MCP 服务器旨在连接 Claude Code 到一个 Wiki.js 实例

概览

一个将 MCP 客户端连接到您 Wiki.js 实例的 MCP 服务器 。 它既支持,又适合当地MCP客户以及远程托管客户。 * Python 3.10+ * 有 API 访问功能的 Wiki.js 实例 * Wiki.js API 密钥(行政 > API 访问 > 新的 API 密钥) Wiki.js API密钥仅被MCP服务器用于与Wiki.js通信. 它仍然存在,从未归还或接触MCP客户。 Cloudflare 访问多用户授权,用于远程流式HTTP部署: 服务器默认不会绑定到 0.0.0.0 。 为生产,将HTTPS/认证放入当地HTTP收听器前. 服务器默认情况下会故意绑定到0.0.0.0. 对于远程部署,所推荐的设置是让MCP服务器在本地监听,并通过HTTPS倒置代用并在适当情况下通过认证层来曝光. 当MCP客户端可以在本地启动MCP服务器时使用stdio.

概述(AI 翻译)

一个将 MCP 客户端连接到您 Wiki.js 实例的 MCP 服务器 。

它既支持stdio的本地连接,也支持使用官方MCP流式HTTP运输的远端连接,使其适合本地MCP客户以及远程托管客户.

□ 先决条件

  • Py 3.10+
  • 允许 API 访问的 Wiki.js 实例 *一维基.js API密钥 ([[T0]).

□ 安装

关于地方发展:

□ 配置

维基语录链接:名人名言 - 文学作品 - 谚语 - 谚语

· 变量 · 默认 · · 说明 · · |---------. QQ[ [T1]] 需要您 Wiki.js 实例的 Base URL QQ QQ WIKIJS_API_KEY 为stdio/ single-key模式需要的QQ Legacy/default Wiki.js API密钥. 固定服务器侧并不再用工具返回QQ | WIKIJS_GRAPHQL_ENDPOINT | [T4] | 维基语录链接:名人名言 - 文学作品 - 谚语 - 谚语 当true,变异工具被禁用时… · 变量 · 默认 · · 说明 · · |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------- QQ WIKIJS_URL 需要您 Wiki.js 实例的 Base URL QQ QQ [ [T9]] 需要QQ Wiki.js API 键 QQ | WIKIJS_GRAPHQL_ENDPOINT| [T11]|维基.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

WikiJS MCP Server

An MCP server that connects MCP clients to your Wiki.js instance.

It supports both local connections over stdio and remote connections using the official MCP Streamable HTTP transport, making it suitable for local MCP clients as well as remotely hosted clients.

Prerequisites

  • Python 3.10+
  • A Wiki.js instance with API access enabled
  • A Wiki.js API key (Administration > API Access > New API Key)

Installation

pip install wikijs-mcp

For local development:

git clone https://github.com/Ho3pLi/wikijs-mcp-http.git
cd wikijs-mcp-http
pip install -e .

Configuration

Wiki.js

Variable Default Description
WIKIJS_URL required Base URL of your Wiki.js instance
WIKIJS_API_KEY required for stdio/single-key mode Legacy/default Wiki.js API key. Kept server-side and never returned by tools
WIKIJS_GRAPHQL_ENDPOINT /graphql Wiki.js GraphQL endpoint path
WIKIJS_READ_ONLY false When true, mutation tools are disabled
Variable Default Description
------------------------- ---------- ----------------------------------------
WIKIJS_URL required Base URL of your Wiki.js instance
WIKIJS_API_KEY required Wiki.js API key
WIKIJS_GRAPHQL_ENDPOINT /graphql Wiki.js GraphQL endpoint path
WIKIJS_READ_ONLY false When true, mutation tools are disabled

The Wiki.js API key is used only by the MCP server to communicate with Wiki.js. It remains server-side and is never returned or exposed to MCP clients.

Streamable HTTP

Variable Default Description
MCP_HOST 127.0.0.1 Host interface for HTTP mode
MCP_PORT 8000 Port for HTTP mode
MCP_PATH /mcp MCP Streamable HTTP endpoint path
MCP_ALLOWED_HOSTS 127.0.0.1:*,localhost:* Comma-separated Host header allowlist
MCP_ALLOWED_ORIGINS http://127.0.0.1:*,http://localhost:* Comma-separated Origin header allowlist

Cloudflare Access multi-user authorization, for remote Streamable HTTP deployments:

Variable Default Description
WIKIJS_CF_ACCESS_ISSUER unset Cloudflare Access JWT issuer, usually https://.cloudflareaccess.com
WIKIJS_CF_ACCESS_AUDIENCE unset Cloudflare Access application audience tag
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "wikijs": { "command": "pipx", "args": ["run", "wikijs-mcp"], "env": { "WIKIJS_URL": "https://your-wiki.com", "WIKIJS_API_KEY": "your-api-key" } } } }