|
|
2 weken geleden | |
|---|---|---|
| .github | 2 weken geleden | |
| src | 2 weken geleden | |
| .gitignore | 1 jaar geleden | |
| .node_version | 2 weken geleden | |
| .npmignore | 1 jaar geleden | |
| AGENTS.md | 2 weken geleden | |
| CLAUDE.md | 2 weken geleden | |
| LICENSE | 1 jaar geleden | |
| Makefile | 2 weken geleden | |
| README.md | 2 weken geleden | |
| codegen.yml | 2 weken geleden | |
| docker-compose.yml | 1 jaar geleden | |
| env.example | 3 weken geleden | |
| eslint.config.js | 2 weken geleden | |
| jest.config.mjs | 1 jaar geleden | |
| package-lock.json | 2 weken geleden | |
| package.json | 2 weken geleden | |
| pnpm-lock.yaml | 2 weken geleden | |
| pnpm-workspace.yaml | 2 weken geleden | |
| tsconfig.json | 3 weken geleden |
A Model Context Protocol (MCP) server that provides integration with WikiJS, allowing AI assistants to search and retrieve content from your WikiJS knowledge base.
This MCP server enables AI assistants to interact with WikiJS instances by providing tools to:
# NOTE: the binary is named wikijs-mcp-edit, not after the package name:
npx -p @cahaseler/wikijs-mcp wikijs-mcp-edit
This always runs the latest published version from npm. For the current feature branch (see git remote), build from source instead.
git clone <your-clone-url>
cd wikijs-mcp
pnpm install # or: npm install
pnpm run build # or: npm run build
# Add as a user-scoped server (available across all projects)
claude mcp add wikijs \
-e WIKIJS_URL=https://your-wiki.example.com \
-e WIKIJS_API_KEY=your-api-key \
-- npx -p @cahaseler/wikijs-mcp wikijs-mcp-edit
# Or, when running from a local clone (uses your build instead of the
# published package):
claude mcp add wikijs \
-e WIKIJS_URL=https://your-wiki.example.com \
-e WIKIJS_API_KEY=your-api-key \
-- node /absolute/path/to/wikijs-mcp/build/index.js
# Or with edit functionality enabled
claude mcp add wikijs \
-e WIKIJS_URL=https://your-wiki.example.com \
-e WIKIJS_API_KEY=your-api-key \
-e WIKIJS_ENABLE_EDIT=true \
-- npx -p @cahaseler/wikijs-mcp wikijs-mcp-edit
Create a .mcp.json file in your project root:
{
"mcpServers": {
"wikijs": {
"command": "npx",
"args": ["-p", "@cahaseler/wikijs-mcp", "wikijs-mcp-edit"],
"env": {
"WIKIJS_URL": "https://your-wiki.example.com",
"WIKIJS_API_KEY": "your-api-key",
"WIKIJS_ENABLE_EDIT": "false"
}
}
}
}
Add to your Cursor settings (.cursor/settings.json):
{
"mcpServers": {
"wikijs-mcp": {
"command": "npx",
"args": ["-p", "@cahaseler/wikijs-mcp", "wikijs-mcp-edit"],
"env": {
"WIKIJS_URL": "https://your-wiki.example.com",
"WIKIJS_API_KEY": "your-api-key",
"WIKIJS_ENABLE_EDIT": "false"
}
}
}
}
Add to your Claude Desktop configuration:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"wikijs-mcp": {
"command": "npx",
"args": ["-p", "@cahaseler/wikijs-mcp", "wikijs-mcp-edit"],
"env": {
"WIKIJS_URL": "https://your-wiki.example.com",
"WIKIJS_API_KEY": "your-api-key",
"WIKIJS_ENABLE_EDIT": "false"
}
}
}
}
| Variable | Description | Required | Default |
|---|---|---|---|
WIKIJS_URL |
URL of your WikiJS instance (without /graphql) |
Yes | - |
WIKIJS_API_KEY |
WikiJS API key | Yes | - |
WIKIJS_ENABLE_EDIT |
Enable page editing functionality | No | false |
WIKIJS_DEFAULT_LOCALE |
Locale used when building page URLs | No | en |
Once configured, the following tools will be available (10 read / 6 write):
Read (always available):
query (required), path (optional), locale (optional)id (required)path (required), locale (required)limit (optional, max 500), locale (optional), tags (optional)id (required), offsetPage (optional), offsetSize (optional, max 200)pageId (required), versionId (required)locale (required), mode (optional, FOLDERS/PAGES/ALL, default PAGES), path (optional), parent (optional), includeAncestors (optional)query (required)locale (required)Write (only available when WIKIJS_ENABLE_EDIT=true):
title, content, description, path (required); editor (default markdown), isPublished (default true), isPrivate (default false), locale (optional, default en), tags (optional)content; all other fields are optional — omitted fields keep their existing values (metadata is never wiped by omission)
id, content (required); title, description, path, editor, isPublished, isPrivate, locale, tags (optional)id, destinationPath, destinationLocale (required)id (required)pageId, versionId (required)id, editor (required e.g. markdown, visual)engines in package.json)^20.19 || ^22.13 || >=24)Clone the repository:
git clone https://github.com/cahaseler/wikijs-mcp.git
cd wikijs-mcp
bash
pnpm install # or: npm install
Copy the environment template:
cp env.example .env
.env with your WikiJS credentialsTo run a local WikiJS instance for testing:
# Start WikiJS and PostgreSQL
docker-compose up -d
# The instance will be available at http://localhost:3000
# Follow the setup wizard to create an admin account
pnpm run build # or: npm run build
pnpm run clean # alternative: make clean
# or via make (uses pnpm internally)
make build
The server is a stdio MCP server — it is started by an MCP client, not manually as a daemon.
# Quick smoke without a wiki connection: expect output = version from package.json
node build/index.js --version
# Run it manually (it then waits, silently, for MCP protocol frames on stdio):
WIKIJS_URL=http://localhost:3000 WIKIJS_API_KEY=your-key node build/index.js
# The built server auto-loads .env from the current working directory (dotenv),
# so from the repo root this is sufficient: node build/index.js — provided
# you created .env via the Setup steps above. Note: env variables take
# precedence over .env values.
# Interactive verify the tools without a full client setup (browser UI, default http://localhost:6274):
npx @modelcontextprotocol/inspector node build/index.js # pnpm: pnpm dlx @modelcontextprotocol/inspector node build/index.js
Missing env vars abort the server immediately with
WIKIJS_URL and WIKIJS_API_KEY must be set on stderr.
Ensure your environment variables are properly configured. Check your .env file or the environment variables in your MCP client configuration.
Your API key may be expired or lack the necessary permissions. Create a new API key with appropriate permissions.
sh: wikijs-mcp-edit: not found when running npx @cahaseler/wikijs-mcpnpx fetched the package but looked for a binary named after the package. The binary is called wikijs-mcp-edit:
npx -p @cahaseler/wikijs-mcp wikijs-mcp-edit
If you modify the GraphQL queries, regenerate the types (requires WIKIJS_URL reachable — it introspects your Wiki.js instance):
pnpm codegen # or: npm run codegen
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.