requarks-wiki-mcp
Provides a built-in resource guide for Wiki.js-specific markdown syntax to assist agents in authoring and updating page content.
Includes a built-in guide for Mermaid diagram syntax to help agents create and manage visual diagrams within the wiki.
Enables comprehensive management of a Wiki.js knowledge base, including tools for page CRUD operations, full-text search, comment management, asset browsing, and site navigation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@requarks-wiki-mcp search the wiki for 'onboarding' and summarize the content of the top result"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
requarks-wiki-mcp
MCP server for a Wiki.js instance that lets agents use it like a knowledge base.
Features:
29 tools (19 read + 10 write) covering pages, comments, tags, assets, users, navigation, and system info.
Search, list, and browse pages for retrieval workflows (RAG-like usage).
Fetch page content by path or page ID, view version history and restore previous versions.
Browse site hierarchy with page tree, page links graph, and navigation structure.
Full comment system: list, read, create, update, and delete comments on pages.
Asset and folder browsing for media file discovery.
User context: current user profile and user search.
System diagnostics: version info, site config, and navigation tree.
Tag management: list, search, update, and delete tags.
Optional page create/update/delete/move/restore tools with explicit safety gates.
Built-in resources: markdown syntax guide, Mermaid diagram guide, and API permissions guide.
Typed error taxonomy with LLM-friendly error messages.
GraphQL client with timeout, exponential-backoff retry, and request correlation.
Security hardening: sensitive field filtering, URL validation, input length limits.
Requirements
Node.js 20+
A reachable Wiki.js hostname
Wiki.js API key (JWT) with proper permissions
Related MCP server: WikiJS MCP Server
Setup
cp .env.example .env
npm installConfigure .env:
WIKI_BASE_URL=https://your-wiki-hostname
WIKI_API_TOKEN=your_wikijs_api_key_jwt
WIKI_GRAPHQL_PATH=/graphql
WIKI_DEFAULT_LOCALE=en
WIKI_DEFAULT_EDITOR=markdown
# Mutating operations are disabled by default
WIKI_MUTATIONS_ENABLED=false
# Optional extra safety gate for writes. If set, write tools must pass matching confirm.
WIKI_MUTATION_CONFIRM_TOKEN=
WIKI_MUTATION_DRY_RUN=true
# Comma-separated path prefixes without leading slash (empty = no prefix restriction)
WIKI_ALLOWED_MUTATION_PATH_PREFIXES=
# HTTP resilience
WIKI_HTTP_TIMEOUT_MS=15000
WIKI_HTTP_MAX_RETRIES=2Environment variable reference:
Variable | Required | Default | Description |
| Yes | - | Base Wiki.js URL (for example, |
| Yes | - | Wiki.js API key JWT used in |
| No |
| GraphQL endpoint path appended to |
| No |
| Default locale used when tool input does not provide locale. |
| No |
| Default editor used for page creation when not specified. |
| No |
| Enables all write tools (page, comment, and tag mutations) when set to |
| No | `` (empty) | Optional extra safety gate. When set, write tool calls must provide matching |
| No |
| When |
| No | `` (empty) | Comma-separated path prefixes (without leading slash) allowed for mutations. Empty means no prefix restriction. |
| No |
| HTTP request timeout in milliseconds (including body reads). Minimum 1. |
| No |
| Max retries for transient read failures (408, 502-504). Mutations are never retried. Minimum 0. |
Wiki.js prerequisite (GraphQL + API key):
This MCP uses Wiki.js GraphQL internally.
In Wiki.js admin, go to
Administration -> APIand enable API access.Create an API key and set it as
WIKI_API_TOKEN.
MCP Client Config Example (~/.mcp.json)
{
"mcpServers": {
"requarks-wiki": {
"command": "npx",
"args": ["-y", "@yowu-dev/requarks-wiki-mcp@latest"],
"env": {
"WIKI_BASE_URL": "https://wiki.your-domain.dev",
"WIKI_API_TOKEN": "your_wikijs_api_key_jwt",
"WIKI_GRAPHQL_PATH": "/graphql",
"WIKI_DEFAULT_LOCALE": "en",
"WIKI_DEFAULT_EDITOR": "markdown",
"WIKI_MUTATIONS_ENABLED": "true",
"WIKI_MUTATION_CONFIRM_TOKEN": "CONFIRM_UPDATE",
"WIKI_MUTATION_DRY_RUN": "false",
"WIKI_ALLOWED_MUTATION_PATH_PREFIXES": "",
"WIKI_HTTP_TIMEOUT_MS": "15000",
"WIKI_HTTP_MAX_RETRIES": "2"
}
}
}
}Register MCP Via Local Path (Without npm Publish)
You can register this MCP server directly from your local project path without publishing/installing from npm.
Build in this repository
npm install
npm run buildRegister local absolute path in
~/.mcp.json
{
"mcpServers": {
"requarks-wiki-local": {
"command": "node",
"args": ["/absolute/path/to/requarks-wiki-mcp/dist/index.js"],
"env": {
"WIKI_BASE_URL": "https://wiki.your-domain.dev",
"WIKI_API_TOKEN": "your_wikijs_api_key_jwt",
"WIKI_GRAPHQL_PATH": "/graphql",
"WIKI_DEFAULT_LOCALE": "en",
"WIKI_DEFAULT_EDITOR": "markdown",
"WIKI_MUTATIONS_ENABLED": "true",
"WIKI_MUTATION_CONFIRM_TOKEN": "",
"WIKI_MUTATION_DRY_RUN": "false",
"WIKI_ALLOWED_MUTATION_PATH_PREFIXES": "",
"WIKI_HTTP_TIMEOUT_MS": "15000",
"WIKI_HTTP_MAX_RETRIES": "2"
}
}
}
}Notes:
Always use an absolute path.
Re-run
npm run buildafter code changes sodist/index.jsstays up to date.
Run
Development:
npm run devBuild + run:
npm run build
npm startMCP Tools
Read Tools (19)
Pages:
Tool | Description |
| Full-text search across wiki pages. |
| List pages with optional locale filter and limit. |
| Get full page content by path + locale. |
| Get full page content by numeric ID. |
| Browse site hierarchy (folders, pages, or both). |
| View edit history trail for a page. |
| Get a specific version's full content. |
| Get page link relationships (knowledge graph). |
Tags:
Tool | Description |
| List all tags for content taxonomy discovery. |
| Search for tags matching a query string. |
Comments:
Tool | Description |
| List all comments for a page by path and locale. |
| Get a single comment by ID. |
System & Navigation:
Tool | Description |
| Wiki.js version, database type, and usage statistics. |
| Navigation tree structure. |
| Site configuration (non-sensitive fields). |
Assets:
Tool | Description |
| List assets with optional folder and kind filter. |
| List asset folders. |
Users:
Tool | Description |
| Get the currently authenticated API user's profile. |
| Search users by name or email. |
Write Tools (10, disabled unless WIKI_MUTATIONS_ENABLED=true)
Page Mutations:
Tool | Description |
| Create a new page with content, tags, and metadata. |
| Update an existing page by ID. |
| Delete a page by ID. May need |
| Move/rename a page to a new path or locale. |
| Restore a page to a previous version. |
Comment Mutations:
Tool | Description |
| Create a comment on a page. |
| Update an existing comment by ID. |
| Delete a comment by ID. |
Tag Mutations:
Tool | Description |
| Update a tag's slug and title. |
| Delete a tag from all pages. |
Mutation Safety
When
WIKI_MUTATION_CONFIRM_TOKENis set, mutation tools require a matchingconfirmargument.When
WIKI_MUTATION_DRY_RUN=true, write tools return a preview and do not mutate Wiki.js.If
WIKI_ALLOWED_MUTATION_PATH_PREFIXESis set, page and comment-create mutations are limited to those path prefixes.All mutation attempts write a structured audit line to stderr.
MCP Resources
Resource URI | Description |
| Wiki.js markdown syntax guide (CommonMark/GFM + Wiki.js-specific extensions) intended for page authoring and updates. |
| Mermaid 8.8.2 diagram syntax guide for Wiki.js (9 supported diagram types, unsupported feature warnings, version restrictions). |
| Wiki.js API permission model, error codes, and API key configuration guide for self-diagnosing permission errors. |
Permission Notes (Wiki.js)
Wiki.js permission behavior can be surprising for API keys. In particular:
Some operations may require
manage:pages/delete:pagesrules at page-rule level.Reading
contentmay requireread:sourcedepending on schema/field-level checks.Comment operations require
read:comments,write:comments, ormanage:comments.System info and navigation require admin-level API key permissions.
Common error codes:
Code | Meaning |
6013 |
|
6003 | Page does not exist |
8002 |
|
8003 |
|
8004 |
|
8005 |
|
For more details, read the wikijs://api-permissions-guide resource.
Suggested Minimum API Key Permissions
For read-heavy KB use:
read:pages,read:sourceread:comments(for comment browsing)Page rules allowing those permissions for intended paths/locales
For write workflows:
write:pages(create and update)manage:pagesordelete:pages(for delete/move operations)write:comments,manage:comments(for comment mutations)manage:system(for tag management)
Security Guidance
Keep API token server-side only.
Start with read-only permissions.
Keep
WIKI_MUTATIONS_ENABLED=falseunless updates are needed.Optional hardening: set a strong random
WIKI_MUTATION_CONFIRM_TOKENand pass matchingconfirmfor write calls.Keep
WIKI_MUTATION_DRY_RUN=trueuntil you are ready for real writes.Use
WIKI_ALLOWED_MUTATION_PATH_PREFIXESto constrain write scope.wikijs_get_system_infofilters sensitive infrastructure fields (dbHost, configFile, etc.) by default.scriptJs/scriptCssfields in page create/update are length-limited (10,000 chars) and include browser execution warnings.
Available Tools
29 toolswikijs_create_commentA
Create a new comment on a page. Requires WIKI_MUTATIONS_ENABLED=true and may need comment posting permissions. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: pageId (required), content (required), confirm, replyTo, +2 more.
wikijs_create_pageA
Create a new page. Requires WIKI_MUTATIONS_ENABLED=true. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: path (required), title (required), content (required), confirm, +10 more.
wikijs_delete_commentA
Delete a comment by ID. Requires WIKI_MUTATIONS_ENABLED=true and comment management permissions. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: id (required), confirm.
wikijs_delete_pageA
Delete a page by ID. Requires WIKI_MUTATIONS_ENABLED=true and may need manage:pages or delete:pages permission. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: id (required), confirm.
wikijs_delete_tagA
Delete a tag by ID. Removes the tag from all pages and the tag registry. Requires WIKI_MUTATIONS_ENABLED=true and may need manage:system permission. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: id (required), confirm.
wikijs_get_commentA
Get a single comment by ID. Returns full comment details including content and author information.
Inputs: id (required).
wikijs_get_current_userA
Get the profile of the currently authenticated API user. Returns identity, permissions context, and activity info.
Inputs: no named parameters.
wikijs_get_page_by_idA
Get a single page body/content by numeric page ID.
Inputs: id (required).
wikijs_get_page_by_pathB
Get a single page body/content using path + locale.
Inputs: path (required), locale.
wikijs_get_page_historyA
Get edit history trail for a page by ID. Returns version dates, authors, and change types.
Inputs: id (required), offset, limit.
wikijs_get_page_linksB
Get all pages and their outbound links for a locale. Returns an array of pages with their link relationships.
Inputs: locale.
wikijs_get_page_treeA
Get the page tree hierarchy for site navigation and structure discovery. Returns folders and/or pages with depth info.
Inputs: path, parentId, mode, locale, +1 more.
wikijs_get_page_versionA
Get a specific version of a page by page ID and version ID. Returns full page content and metadata for that version.
Inputs: id (required), versionId (required).
wikijs_get_site_configA
Retrieve safe (non-sensitive) site configuration including title, description, feature flags, and upload limits. Does not expose secrets or authentication keys.
Inputs: no named parameters.
wikijs_get_system_infoA
Retrieve Wiki.js system information including version, database type, and usage statistics. Useful for diagnostics. Sensitive fields (dbHost, configFile, workingDirectory, hostname) are filtered out.
Inputs: no named parameters.
wikijs_list_asset_foldersB
List asset folders within a parent folder. Returns folder structure for navigating the asset hierarchy.
Inputs: parentFolderId.
wikijs_list_assetsA
List assets (files, images) in a specific folder. Returns asset metadata including filename, type, size, and upload date.
Inputs: folderId, kind.
wikijs_list_commentsA
List all comments for a specific page by path and locale. Returns comment details including author info and timestamps.
Inputs: path (required), locale.
wikijs_list_pagesC
List pages for crawling/indexing with optional locale and limit.
Inputs: locale, limit, orderBy, orderByDirection.
wikijs_list_tagsA
List all tags used across wiki pages. Useful for discovering content categories and taxonomy.
Inputs: no named parameters.
wikijs_move_pageA
Move a page to a new path or locale. Requires WIKI_MUTATIONS_ENABLED=true and may need manage:pages permission. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: id (required), destinationPath (required), confirm, destinationLocale.
wikijs_restore_pageA
Restore a page to a previous version. Requires WIKI_MUTATIONS_ENABLED=true and may need manage:pages permission. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: id (required), versionId (required), confirm.
wikijs_search_pagesA
Search pages by keyword and return path/title summary for knowledge lookup.
Inputs: query (required), locale, path.
wikijs_search_tagsA
Search for tags matching a query string. Returns an array of matching tag name strings.
Inputs: query (required).
wikijs_search_usersA
Search for users by name or email. Returns matching user profiles for collaboration context.
Inputs: query (required).
wikijs_update_commentA
Update an existing comment by ID. Requires WIKI_MUTATIONS_ENABLED=true and comment management permissions. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: id (required), content (required), confirm.
wikijs_update_pageC
Update an existing page by ID. Requires WIKI_MUTATIONS_ENABLED=true. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: id (required), confirm, title, content, +11 more.
wikijs_update_tagA
Update an existing tag by ID. Changes the tag slug and/or title. Requires WIKI_MUTATIONS_ENABLED=true and may need manage:system permission. confirm is only checked when WIKI_MUTATION_CONFIRM_TOKEN is set.
Inputs: id (required), tag (required), title (required), confirm.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Each tool targets a distinct resource-action pair (e.g., create_page, delete_comment, list_tags). There is no overlap or ambiguity; an agent can clearly differentiate between them.
All tools follow the consistent pattern wikijs_verb_noun in snake_case. The naming is uniform and predictable, making it easy to infer tool functionality.
With 29 tools, the set is slightly large but well-scoped for a full wiki system covering pages, comments, tags, assets, navigation, search, and configuration. It avoids bloat and each tool serves a clear purpose.
The toolset provides comprehensive CRUD for pages, comments, and tags, plus search and system info. However, asset and navigation mutations (create/update/delete) are missing, which represents a minor gap.
Maintenance
Related MCP Connectors
Shared project wiki for AI agents: read and write pages, next actions, and activity logs over MCP.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Self-hostable team wiki; agents read & write it via MCP; Atlas turns your repo into a cited wiki.
Hosted markdown project wikis your team's AI assistants read, search, and update over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for Wiki.js projects that enables full-text search, page retrieval, and page management capabilities. It allows LLMs to interact with wiki content through specialized tools for searching, listing, and creating pages.ISC
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables full management of WikiJS instances, supporting operations like page creation, searching, and updating. It also provides tools for knowledge graph exploration, content summarization, and retrieval of wiki statistics.-
- AlicenseAqualityDmaintenanceAn MCP server for Wiki.js that enables AI agents to create, read, update, search, list, and move wiki pages via the GraphQL API. It supports surgical section updates and structured content management through named sections.6MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Wiki.js integration, enabling AI assistants to create, read, update, delete, search, and move wiki pages via natural language.1MIT