MCP server for managing a Wiki.js instance via its GraphQL admin API
Project description
wikijs-mcp
An MCP server that lets Claude (or any MCP client) manage a Wiki.js instance through its GraphQL admin API — read and write pages, manage navigation and groups, and trigger Git storage syncs.
Published on PyPI as
mcp-server-wikijs; the source repo ismargus/wikijs-mcp. The admin focus (navigation, groups, Git sync, raw GraphQL) sets it apart from content-authoring Wiki.js MCP servers.
How it works: MCP does not run inside Wiki.js. This is a small stdio server your MCP client launches locally; it talks to
https://<your-wiki>/graphql. If your Wiki.js is on a private network, the machine running this needs network reach to it.
Tools
| Tool | What it does |
|---|---|
execute_graphql(query, variables?) |
Run any Wiki.js GraphQL query/mutation (escape hatch) |
list_pages(locale?, limit?) |
List pages (id, locale, path, title) |
get_page(path?, locale?, id?) |
Get a page's content + metadata |
create_page(path, title, content, …) |
Create a page |
update_page(id, content?, title?, …) |
Update a page — only passed fields change |
delete_page(id) |
Delete a page |
get_navigation() |
Current nav mode + tree |
set_navigation_mode(mode) |
NONE / TREE / MIXED / STATIC |
list_groups() / get_group(id) |
Groups + their permissions/page rules |
trigger_git_sync() |
Re-sync the Git storage target (re-import content repo) |
Prerequisites
- A running Wiki.js 2.x instance.
- An API key: Administration → API Access → enable the API → New API Key (full access; the 2.x API isn't finely scoped). Copy the token.
Quick start
Run it on demand with uvx (no install) — set the two
environment variables and go:
export WIKIJS_URL="https://wiki.example.com"
export WIKIJS_TOKEN="your-api-key"
uvx mcp-server-wikijs
Or install it:
pip install mcp-server-wikijs # or: uv tool install mcp-server-wikijs
mcp-server-wikijs
The server speaks MCP over stdio, so running it directly just waits for a client — that's expected. Wire it into a client below.
Configuration
| Variable | Required | Description |
|---|---|---|
WIKIJS_URL |
✅ | Base URL of your Wiki.js instance (e.g. https://wiki.example.com). The GraphQL endpoint is <URL>/graphql. |
WIKIJS_TOKEN |
✅ | Wiki.js API key. Aliases also accepted: WIKIJS_API_TOKEN, WIKI_JS_MCP_API_TOKEN. |
For standalone runs you can instead drop a .env next to where you launch it
(cp .env.example .env); it's loaded automatically.
Register with an MCP client
Claude Code
claude mcp add wikijs --env WIKIJS_URL=https://wiki.example.com --env WIKIJS_TOKEN=your-api-key -- uvx mcp-server-wikijs
…or add it to .mcp.json / your settings:
{
"mcpServers": {
"wikijs": {
"command": "uvx",
"args": ["mcp-server-wikijs"],
"env": {
"WIKIJS_URL": "https://wiki.example.com",
"WIKIJS_TOKEN": "your-api-key"
}
}
}
}
Tip: keep secrets out of committed files — reference an env var that's already in your shell, e.g.
"WIKIJS_TOKEN": "${WIKIJS_TOKEN}", and start the client from a shell where it's set.
Claude Desktop
Add the same block to claude_desktop_config.json
(Settings → Developer → Edit Config), then restart Claude Desktop.
Examples
Once registered, ask your assistant things like:
- "List every page under
clients/in theenlocale." - "Create a page at
guides/onboardingtitled 'Onboarding' with this content: …" - "Update page 31 — append a 'Troubleshooting' section, leave everything else."
- "Trigger a Git sync so the wiki re-imports the content repo."
Security
The Wiki.js API key is full-admin — treat it as a privileged credential. Keep it in your secrets manager / environment, never commit it, and revoke or rotate it anytime from Wiki.js → API Access. Every write tool acts with that key's full authority, so review mutations before approving them.
Development
git clone https://github.com/margus/wikijs-mcp
cd wikijs-mcp
uv sync # install runtime + dev deps
uv run pytest # run the test suite (no live wiki needed — httpx is mocked)
uv run ruff check . # lint
The Wiki.js logic lives in src/wikijs_mcp/client.py (WikiJSClient), unit-tested against
httpx.MockTransport. src/wikijs_mcp/server.py is a thin layer of MCP tool wrappers over
it. See CONTRIBUTING.md.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_wikijs-0.1.0.tar.gz.
File metadata
- Download URL: mcp_server_wikijs-0.1.0.tar.gz
- Upload date:
- Size: 60.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a206bf90e46127e620441861f8133bbf2120d6da227294ea326c3ca52423ffba
|
|
| MD5 |
6cc6b3be7bc066745f0b13aaac6f17ea
|
|
| BLAKE2b-256 |
ced2fae3d6073d375fa3aab7e05ad7c3f4f96025ef618c442d3e86746ab0e7e2
|
Provenance
The following attestation bundles were made for mcp_server_wikijs-0.1.0.tar.gz:
Publisher:
publish.yml on margus/wikijs-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_server_wikijs-0.1.0.tar.gz -
Subject digest:
a206bf90e46127e620441861f8133bbf2120d6da227294ea326c3ca52423ffba - Sigstore transparency entry: 1954826693
- Sigstore integration time:
-
Permalink:
margus/wikijs-mcp@c4e440ff44ce1ac34e35a6a6c910a21a850ee988 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/margus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c4e440ff44ce1ac34e35a6a6c910a21a850ee988 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_server_wikijs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_server_wikijs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4a586c1c0ca0083328bcaab1c16b1a59dad02fafefb96b1090a860333f1857e
|
|
| MD5 |
e5900f7ed39729398a3f49ec41f1a6c3
|
|
| BLAKE2b-256 |
4afa317a68dcb87ca285272fa654795f30661950f19c313b0c536f662d2b3766
|
Provenance
The following attestation bundles were made for mcp_server_wikijs-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on margus/wikijs-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_server_wikijs-0.1.0-py3-none-any.whl -
Subject digest:
f4a586c1c0ca0083328bcaab1c16b1a59dad02fafefb96b1090a860333f1857e - Sigstore transparency entry: 1954826950
- Sigstore integration time:
-
Permalink:
margus/wikijs-mcp@c4e440ff44ce1ac34e35a6a6c910a21a850ee988 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/margus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c4e440ff44ce1ac34e35a6a6c910a21a850ee988 -
Trigger Event:
push
-
Statement type: