wikijs-mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Model Context Protocol (MCP) server for
Wiki.js, the self-hosted wiki that keeps its pages as markdown and exposes everything through one GraphQL endpoint.
Lets MCP clients like Claude Code, Claude Desktop or Codex search, read and edit wiki pages — and, if you let them, manage its assets, comments, users, groups and maintenance jobs.
Sixty-two tools is the ceiling, not the floor:
WIKIJS_ALLOW_TOOLS=essential registers a curated seven
instead, and a model picks the right tool far more reliably from
seven than from sixty-two — see
choosing which tools load.
is resolved against the colour scheme of the page showing it, so GitHub
picks the variant that matches its own theme toggle. npm strips and
when it sanitises the README and keeps the , which is why that
fallback brings its own dark card instead of relying on a media query.
All three URLs must stay absolute: npm does not resolve repo-relative paths. -->
What makes it different
**Finds text search cannot.** Wiki.js' default engine indexes titles and
descriptions only — so search_pages says which engine is running, and
grep_pages searches the actual text of pages.
**Will not clobber a colleague.** update_page compares against the moment you
read the page and refuses to overwrite an edit saved in between. Surgical edits
must match exactly once.
**Writes can be confined to part of the wiki.** WIKIJS_ALLOWED_PATHS limits the
writing page and asset tools to path prefixes, matched by path segment, while
reads stay unrestricted.
Requirements
- Node.js ≥ 22
- A running **Wiki.js** instance and an API token
Configuration
| Variable | Required | Description |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------ |
| WIKIJS_URL | yes | Base URL of the wiki, e.g. https://wiki.example.com. A trailing /graphql is trimmed |
| WIKIJS_TOKEN | yes | API key from Administration → API Access. WIKIJS_API_KEY is accepted as an alias |
| WIKIJS_LOCALE | no | Locale assumed by page tools that are not given one (default en) |
| WIKIJS_READ_ONLY | no | true, 1 or yes registers only the read tools |
| WIKIJS_ALLOWED_PATHS | no | Comma-separated page path prefixes the write tools are confined to, e.g. docs,team/notes |
| WIKIJS_ALLOW_TOOLS | no | Comma-separated tool names, list_* prefixes, or essential for a curated preset |
| WIKIJS_DENY_TOOLS | no | Same syntax; removed from whatever WIKIJS_ALLOW_TOOLS left |
| ELICITATION | no | false replaces the approval dialog with the two-call token. **Not prefixed** |
| WIKIJS_INSECURE_TLS | no | true accepts self-signed certificates (scoped to this connection) |
**The locale is part of a page's identity**, not a display preference: the same path
under en and de is two different pages. On a wiki set up in another language,
set WIKIJS_LOCALE or every lookup by path answers "not found". list_locales
reports what is installed.
**API keys are administrative.** Wiki.js offers "full access" or a group, and a
full-access key can rewrite every page and every account. WIKIJS_READ_ONLY,
WIKIJS_ALLOWED_PATHS and the key's own group permissions are three independent
ways to narrow that — see SECURITY.md.
> **Use https://.** Over plain http the token travels unencrypted; the server
> prints a warning unless the host is local. For self-signed certificates prefer a
> proper internal CA over WIKIJS_INSECURE_TLS.
Without credentials the server still starts and lists its tools (so registries and
inspectors can introspect it), but every call fails with setup instructions instead
of reaching the API.
Choosing which tools load
WIKIJS_ALLOW_TOOLS and WIKIJS_DENY_TOOLS take comma-separated
tool names; a trailing * matches a whole family. essential is a curated preset —
search_pages, grep_pages, get_page, list_pages, get_page_tree, create_page and update_page, which is what it takes to find, read and write a wiki page end to end — marked as such in the
tool reference.
An entry that matches no tool aborts startup and names it, so a typo cannot silently
hide a tool — an absent tool is not something anyone traces back to an environment
variable. A filtered tool is never registered, so it is absent from tools/list and