Wiki.js MCP Server
Provides tools for managing pages (including unpublished), users, and groups in a Wiki.js instance via its GraphQL API.
Click on "Install 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., "@Wiki.js MCP Serverlist all pages including unpublished"
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.
Wiki.js MCP Server
Model Context Protocol (MCP) server for Wiki.js integration via GraphQL API.
š Description
This project provides an MCP server for interacting with Wiki.js through GraphQL API. MCP (Model Context Protocol) is an open protocol developed by Anthropic that enables AI models to safely interact with external services and tools.
The server provides a unified interface for working with Wiki.js that can be used by various AI agents and tools supporting MCP.
Related MCP server: WikiJS MCP Server
⨠Features
š Page Management
Get Wiki.js pages by ID
Get page content by ID
List pages with sorting options
Search pages by query
Create new pages
Update existing pages
Delete pages
š List all pages including unpublished
š Search unpublished pages
š Force delete pages (including unpublished)
š Get page publication status
š Publish unpublished pages
š„ User Management
List users
Search users by query
Create new users
Update user information
š§ Group Management
List user groups
š Transports
STDIO: for editor integration (Cursor, VS Code)
HTTP: for web integrations and API access
š Quick Start
ā” Want to start right now? See 5-Minute Guide
Installation
Clone the repository:
git clone https://github.com/heAdz0r/wikijs-mcp-server.git
cd wikijs-mcp-serverRun automatic setup:
npm run setupThis script will automatically:
Install dependencies
Create
.envfile based onexample.envBuild TypeScript code
Configuration
Edit the
.envfile and specify your Wiki.js settings:
# Port for HTTP MCP server
PORT=3200
# Base URL for Wiki.js (without /graphql)
WIKIJS_BASE_URL=http://localhost:3000
# Wiki.js API token
WIKIJS_TOKEN=your_wikijs_api_token_hereEdit the
.cursor/mcp.jsonfile and replaceyour_wikijs_api_token_herewith your real token
How to get Wiki.js API token:
Log into Wiki.js admin panel
Go to "API" section
Create a new API key with necessary permissions
Copy the token to
.envAND to.cursor/mcp.json
š¦ Running
HTTP server (recommended)
# Start main HTTP server with Cursor MCP support
npm start
# or
npm run start:http
# Stop server
npm run stopTypeScript version
npm run start:typescriptSTDIO mode (for direct editor integration)
npm run server:stdioDevelopment mode
npm run devTesting
npm testš Editor Integration
Cursor IDE
ā ļø IMPORTANT: Without
.cursor/mcp.jsonfile, Cursor integration will NOT work!
Quick Setup
Start HTTP server:
npm startAutomatic configuration setup:
npm run setup:cursorEdit
.cursor/mcp.jsonand specify your real token:
{
"mcpServers": {
"wikijs": {
"transport": "http",
"url": "http://localhost:3200/mcp",
"events": "http://localhost:3200/mcp/events",
"cwd": ".",
"env": {
"WIKIJS_BASE_URL": "http://localhost:3000",
"WIKIJS_TOKEN": "your_real_wiki_js_token_here"
}
}
}
}Critical Parameters
transport: "http"- mandatory HTTP transporturl: "http://localhost:3200/mcp"- exact URL for JSON-RPCevents: "http://localhost:3200/mcp/events"- URL for Server-Sent EventsWIKIJS_TOKEN- real Wiki.js API token (not placeholder!)
Verification
After setup, tools with mcp_wikijs_* prefix should appear in Cursor:
mcp_wikijs_list_pages()mcp_wikijs_search_pages()mcp_wikijs_get_page()And others...
VS Code (with MCP extension)
Add to VS Code settings:
{
"mcp.servers": {
"wikijs": {
"command": "node",
"args": ["lib/mcp_wikijs_stdin.js"],
"cwd": "/path/to/wikijs-mcp"
}
}
}š Development
Project Structure
wikijs-mcp-server/
āāā src/ # TypeScript source code
ā āāā server.ts # HTTP server
ā āāā tools.ts # Tool definitions
ā āāā api.ts # Wiki.js API client
ā āāā types.ts # Data types
ā āāā schemas.ts # Zod validation schemas
ā āāā README.md # Source code documentation
āāā lib/ # JavaScript library files
ā āāā fixed_mcp_http_server.js # Main HTTP server (compiled)
ā āāā mcp_wikijs_stdin.js # STDIN server for editors
ā āāā mcp_client.js # Demo MCP client
ā āāā mcp_wrapper.js # MCP protocol utilities
ā āāā README.md # Library documentation
āāā scripts/ # Management scripts
ā āāā setup.sh # Initial setup
ā āāā start_http.sh # Start HTTP server
ā āāā stop_server.sh # Stop HTTP server
ā āāā start_typescript.sh # Start TypeScript version
ā āāā setup_cursor_mcp.sh # Cursor setup
ā āāā test.sh # Run tests
ā āāā test_mcp.js # Test HTTP server
ā āāā test_mcp_stdin.js # Test STDIN server
ā āāā README.md # Scripts documentation
āāā .cursor/ # Cursor MCP configuration
ā āāā mcp.json # MCP configuration file (CRITICALLY IMPORTANT!)
āāā dist/ # Compiled TypeScript code
āāā package.json # Project metadata
āāā README.md # Main documentationšØ CRITICALLY IMPORTANT:
.cursor/mcp.jsonfile is required for Cursor integration!
Available Scripts
Setup and Build
npm run setup- Initial project setupnpm run build- Build TypeScript projectnpm run setup:cursor- Setup Cursor integration
Running Servers
npm start/npm run start:http- HTTP MCP server (port 3200)npm run stop- Stop all MCP serversnpm run start:typescript- TypeScript version of server (port 8000)npm run server:stdio- STDIO version for direct integration
Development and Testing
npm run dev- Development mode with hot reloadnpm run demo- Capability demonstrationnpm test- Run testsnpm run client- Run demo client
API Endpoints (HTTP mode)
GET /tools- List of available toolsGET /health- Server health checkPOST /mcp- MCP JSON-RPC endpoint
Usage Examples
// Get list of pages
{
"method": "list_pages",
"params": {
"limit": 10,
"orderBy": "TITLE"
}
}
// Create new page
{
"method": "create_page",
"params": {
"title": "New Page",
"content": "# Title\n\nContent...",
"path": "folder/new-page"
}
}
### Search for pages:
```python
# Search in all content and metadata
result = await mcp_client.call_tool("search_pages", {
"query": "magic system",
"limit": 5
})Working with Unpublished Pages:
# Get all pages including unpublished ones
all_pages = await mcp_client.call_tool("list_all_pages", {
"limit": 100,
"includeUnpublished": True
})
# Search only unpublished pages
unpublished = await mcp_client.call_tool("search_unpublished_pages", {
"query": "draft",
"limit": 10
})
# Check page publication status
status = await mcp_client.call_tool("get_page_status", {
"id": 42
})
# Publish an unpublished page
result = await mcp_client.call_tool("publish_page", {
"id": 42
})
# Force delete page (works with unpublished pages)
result = await mcp_client.call_tool("force_delete_page", {
"id": 42
})User management:
# List all users
users = await mcp_client.call_tool("list_users")
# Search users by query
search_result = await mcp_client.call_tool("search_users", {
"query": "John"
})
# Create new user
new_user = await mcp_client.call_tool("create_user", {
"email": "john@example.com",
"name": "John Doe",
"passwordRaw": "password123",
"providerKey": "local",
"groups": [1],
"mustChangePassword": false,
"sendWelcomeEmail": true
})
# Update user information
updated_user = await mcp_client.call_tool("update_user", {
"id": 1,
"name": "John Doe Updated"
})š Troubleshooting
Connection Issues
Ensure Wiki.js is running and accessible
Check WIKIJS_BASE_URL correctness
Verify API token is valid
MCP Issues
Check Node.js version (requires >=18.0.0)
Ensure all dependencies are installed
Check server logs for errors
š Documentation
Source Code Documentation - TypeScript source code structure
Library Documentation - JavaScript library files
Scripts Documentation - description of all management scripts
Changelog - release and update log
License - project usage terms
š¤ Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
š License
This project is distributed under the MIT License. See LICENSE file for details.
š Useful Links
Wiki.js - Official Wiki.js website
Model Context Protocol - MCP specification
Anthropic - MCP protocol developer
GraphQL - Query language for APIs
ā Support
If this project helped you, please give it a ā on GitHub!
Have questions? Create an Issue or refer to the documentation.
š New Feature: Automatic URLs
Search Stages
Search works in 4 stages:
GraphQL API search - fast search through indexed content
Metadata search - search in titles, paths, and page descriptions
HTTP content search - deep search in page content via HTTP
Forced verification - fallback search on known pages
Usage Examples
Content Search
{
"method": "search_pages",
"params": {
"query": "ZELEBOBA",
"limit": 5
}
}Result:
[
{
"id": 103,
"path": "test/test-page",
"title": "Test Page",
"description": "Test page to demonstrate Wiki.js API capabilities",
"url": "http://localhost:8080/en/test/test-page"
}
]Title Search
{
"method": "search_pages",
"params": {
"query": "find me",
"limit": 3
}
}Result:
[
{
"id": 108,
"path": "test/test-gemini-mcp",
"title": "Test Gemini MCP Page (find me)",
"url": "http://localhost:8080/en/test/test-gemini-mcp"
}
]New Search Benefits
ā Finds pages even with limited API permissions - uses HTTP fallback
ā Multi-level search - combines multiple strategies
ā Content search - finds text inside pages
ā Metadata search - titles, paths, descriptions
ā Fallback methods - guaranteed results for known pages
ā Correct URLs - all results contain ready-to-use links
Technical Details
HTML Content Processing
The system automatically extracts text from HTML using:
Search in
<template slot="contents">blockHTML tags and entities cleanup
Fallback to full page content
With limited GraphQL API permissions, the system:
Switches to HTTP method for content retrieval
Uses direct requests to HTML pages
Preserves all page metadata
š Changelog
Version 1.3.0 - Unpublished Pages Management (Latest)
š New Features:
list_all_pages- Get all pages including unpublished onessearch_unpublished_pages- Search specifically in unpublished pagesforce_delete_page- Enhanced deletion that works with unpublished pagesget_page_status- Check publication status of any pagepublish_page- Publish unpublished pages programmatically
š§ Improvements:
Enhanced server API with new routes for unpublished page management
Better error handling for page deletion operations
Comprehensive GraphQL mutation support for advanced page operations
Restructured project: Moved JavaScript files to
lib/directory for better organization
š Bug Fixes:
Fixed issues with accessing unpublished pages through standard APIs
Improved authentication handling for admin-level operations
Version 1.2.0 - International Release
š Internationalization:
Complete English translation of documentation
README.md and QUICK_START.md now available in English
Prepared for international market expansion
Version 1.1.0 - Enhanced Search & User Management
⨠Features:
Smart multi-method page search (GraphQL + content + metadata)
User management tools (create, update, search)
Group management capabilities
Improved content extraction from HTML pages
š ļø Available Tools
š Page Tools
Tool Name | Description | Parameters |
| Get page information by ID |
|
| Get page content by ID |
|
| List pages with sorting |
|
| Search pages by query |
|
| Create new page |
|
| Update existing page |
|
| Delete page |
|
| š List all pages including unpublished |
|
| š Search only unpublished pages |
|
| š Force delete page (works with unpublished) |
|
| š Get page publication status |
|
| š Publish unpublished page |
|
š„ User Tools
Tool Name | Description | Parameters |
| List all users | None |
| Search users by query |
|
| Create new user |
|
| Update user information |
|
š Group Tools
Tool Name | Description | Parameters |
| List user groups | None |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that enables AI agents to interact with Wiki.js as a knowledge base through a comprehensive set of 29 tools for content retrieval and management. It supports full-text search, page versioning, and asset browsing with optional write operations secured by safety gates.Last updated29183MIT
- Alicense-qualityDmaintenanceAn 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.Last updated17MIT
- 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.Last updated6MIT
- Alicense-qualityDmaintenanceMCP server for Wiki.js integration, enabling AI assistants to create, read, update, delete, search, and move wiki pages via natural language.Last updated1MIT
Related MCP Connectors
MCP server for AgentDocs (agentdocs.eu): read, search, write, comment on & share Markdown docs.
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/heAdz0r/wikijs-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server