@redairforce/wikijs-mcp
Provides tools for managing Wiki.js documentation, including page creation/update/delete, hierarchical documentation structures, file-to-documentation sync, and multi-level context management across repositories.
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., "@@redairforce/wikijs-mcp create a page titled 'Installation Guide' under /docs"
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.
@redairforce/wikijs-mcp
A comprehensive Model Context Protocol (MCP) server for Wiki.js integration with hierarchical documentation support and multi-level context management. Now available on npm for easy installation and use with Claude Code.
š Quick Start
npm Installation (Recommended)
# Install globally for CLI usage
npm install -g @redairforce/wikijs-mcp
# Or install locally in your project
npm install @redairforce/wikijs-mcpLocal Development Installation
# Clone the repository
git clone https://github.com/redairforce/wikijs-mcp.git
cd wikijs-mcp
# Install dependencies
npm install
# Build the package
npm run buildConfiguration
Create a .env file in your project directory:
# Copy the example configuration
cp .env.example .env
# Edit with your Wiki.js credentials
WIKIJS_API_URL=https://your-wiki.example.com
WIKIJS_TOKEN=your_jwt_token_hereQuick CLI Test
# Test your Wiki.js connection
wikijs-mcp test-connection
# List existing pages
wikijs-mcp list-pages
# Start the MCP server
wikijs-mcp serverUsage with Claude Code
Add to your Claude Code MCP configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"wikijs": {
"command": "wikijs-mcp",
"args": ["server"]
}
}
}Related MCP server: WikiJS MCP Server
šÆ Features
š Core Page Management
Create/Update/Delete pages with full content support
Search across all Wiki.js content
List pages with pagination
Get individual pages by ID or path
šļø Hierarchical Documentation
Nested page creation with automatic path management
Repository structure generation for organized documentation
Auto-categorization by file type (components, API, utils, etc.)
š§ Advanced Features
Bulk operations for creating multiple pages
File-to-documentation sync with code analysis
Automatic content generation from source files
GraphQL integration with comprehensive error handling
š Claude Integration
22 MCP tools available to Claude Code
Real-time documentation updates during development
Code-aware content generation with syntax highlighting
Project structure analysis and documentation
š Available MCP Tools
Connection & Status
wikijs_connection_status- Test Wiki.js connectionwikijs_get_site_info- Get detailed site information
Core Page Management
wikijs_create_page- Create new pageswikijs_update_page- Update existing pageswikijs_get_page- Retrieve pages by ID/pathwikijs_delete_page- Delete pageswikijs_list_pages- List pages with paginationwikijs_search_pages- Search page content
Hierarchical Documentation
wikijs_create_nested_page- Create pages with parent-child relationshipswikijs_create_repo_structure- Generate complete repository documentation
Bulk Operations
wikijs_bulk_create_pages- Create multiple pages at once
File Integration
wikijs_sync_file_docs- Sync source files with documentationwikijs_generate_file_overview- Generate documentation from code files
Multi-Level Context Management
wikijs_detect_context- Auto-detect repository and workspace contextwikijs_init_repository- Initialize repository documentation contextwikijs_init_workspace- Initialize multi-repository workspacewikijs_set_context_mode- Switch between repository/workspace/architectural modeswikijs_get_context- Get current context optimized for Claude consumptionwikijs_repository_status- Show current repository context and documentation statuswikijs_workspace_status- Show workspace with all repositories and statuswikijs_cross_repo_link- Create architectural mapping between repositorieswikijs_smart_sync_file- Intelligently sync files with context awareness
š ļø Command Line Usage
The package also provides a CLI for direct Wiki.js management:
Test Connection
wikijs-mcp test-connectionCreate a Page
wikijs-mcp create-page "My Page Title" "# Content here" "/docs/my-page"List Pages
wikijs-mcp list-pages --limit 20Search Pages
wikijs-mcp search "API documentation"Start MCP Server
wikijs-mcp server
# or simply
wikijs-mcpš Usage Examples
Creating Nested Documentation
// Claude can execute this via MCP tools
await wikijs_create_nested_page({
title: "Button Component",
content: "# Button Component\n\nReusable button with multiple variants...",
parentPath: "/frontend/components",
description: "React button component documentation"
});Repository Structure Generation
await wikijs_create_repo_structure({
repoName: "My Frontend App",
description: "Modern React application with TypeScript",
sections: ["Overview", "Components", "API", "Testing", "Deployment"]
});File-to-Documentation Sync
await wikijs_sync_file_docs({
filePath: "./src/components/Button.tsx",
wikiPath: "/frontend/components/button",
extractContent: true,
includeMetadata: true
});āļø Configuration Options
Environment Variables
Variable | Description | Default | Required |
| Wiki.js instance URL | - | ā |
| JWT API token | - | ā * |
| Username (alternative auth) | - | ā * |
| Password (alternative auth) | - | ā * |
| Logging level |
| ā |
| Default documentation space |
| ā |
| Repository root path |
| ā |
*Either WIKIJS_TOKEN or both WIKIJS_USERNAME and WIKIJS_PASSWORD required.
š Development
Setup
git clone <repository>
cd custom-wikijs-mcp
npm installBuild
npm run buildDevelopment Mode
npm run devTesting
npm testš§ Multi-Level Context Architecture
Overview
The WikiJS MCP server features a sophisticated multi-level context system that prevents token explosion while maintaining rich cross-repository intelligence. This enables seamless documentation workflows across multiple repositories and system architecture levels.
š Context Levels
Level | Focus | Token Budget | Use Case | Wiki Spaces |
š Repository | Single repo documentation | ~200 tokens | "Document frontend applications" |
|
š¢ Workspace | Multi-repo coordination | ~800 tokens | "Coordinate frontend & backend repos" |
|
šļø Architectural | System-wide relationships | ~1200 tokens | "Document how services integrate with database layer" |
|
š Documentation Workflow
Phase 1: Individual Repository Documentation
# Navigate to your first repository
cd /path/to/your/repo
# Claude automatically detects repository context
# - Creates .wikijs-state.json for persistent tracking
# - Maps to wiki space: your-project-docs
# - Tracks individual files ā wiki pages with hash tracking
# - Documents components, configurations, and setup guidesExample Interaction:
You: "Document all the components in this repository"
Claude: [Repository Level - 200 tokens]
- Auto-detects current directory as git repository
- Creates comprehensive component catalog
- Maps files to wiki pages with change tracking
- Documents all modules, services, and dependenciesPhase 2: Multi-Repository Coordination
# Navigate to workspace root to coordinate repositories
cd /workspace
# Initialize workspace context (ties repositories together)
# - Creates .wikijs-workspace.json for multi-repo state
# - Detects all repositories in workspace (frontend/, backend/, etc.)
# - Enables cross-repository page linking and references
# - Coordinates documentation structure across reposExample Interaction:
You: "Now tie the frontend and backend repositories together in the wiki"
Claude: [Workspace Level - 800 tokens]
- Loads context from both frontend and backend repositories
- Creates cross-references between wiki spaces
- Documents how repositories relate to each other
- Builds unified navigation across different spacesPhase 3: Architectural Documentation
# Still at workspace root - switch to architectural focus
# - Documents system-wide architecture and relationships
# - Creates cross-repository dependency mapping
# - Maintains architectural decision records (ADRs)
# - Shows network flows and component interactionsExample Interaction:
You: "Document the system architecture showing how frontend and backend integrate"
Claude: [Architectural Level - 1200 tokens]
- Creates architectural relationship: "Frontend API calls depend on backend authentication service"
- Documents network topology and data flows
- Shows dependencies between different repositories
- Creates system-wide architectural diagrams and explanationsšÆ Context Switching
Automatic Detection (Recommended)
Claude automatically selects appropriate context based on:
Current Directory: Repository root vs workspace root
Request Keywords: "architecture", "cross-repo", "system design"
Existing Context: Detects existing .wikijs-state.json or .wikijs-workspace.json files
Manual Control (When Needed)
# Explicit context switching
"Switch to workspace level to coordinate between repositories"
"Move to architectural context to document system design"
"Focus on repository level for just this application"š Iterative Documentation Refinement
Initial Documentation ā Review ā Corrections
# After Claude creates initial documentation
You: "I reviewed the API documentation at https://docs.example.com/en/api
and need corrections. The authentication endpoint actually uses OAuth2."
Claude: [Repository Level - loads existing context]
- Accesses current .wikijs-state.json context (~200 tokens)
- Loads existing wiki page content for reference
- Makes targeted updates based on your corrections
- Updates wiki.js page with accurate information
- Maintains file change tracking for future updatesLoading Documentation for Interrogation
# Later session - return to work on repository
cd /path/to/your/repo
You: "Load the API documentation so I can ask about the authentication flow"
Claude: [Auto-loads repository context]
- Reads .wikijs-state.json (persistent repository state)
- Loads existing wiki page mappings and content
- Tracks recent file changes since last sync
- Ready to answer questions about documented configurationCross-Repository Questions
# Working at workspace level
cd /workspace
You: "How does the frontend application connect to backend services?"
Claude: [Workspace Level - cross-repository intelligence]
- Loads frontend-docs documentation context
- Loads backend-docs documentation context
- References architectural relationship mappings
- Provides comprehensive answer spanning both repositoriesš§ Smart Features
Change Detection & Incremental Updates
# When returning to a repository later
Claude: [Automatically detects]
"I notice 3 files have changed since last documentation sync"
"The wiki page was last updated 5 days ago - should we review for updates?"
"New package.json dependencies detected - documentation may need updates"Documentation-Driven Development
You: "I'm updating the API service - what documentation needs updates?"
Claude: [Repository context with file mappings]
"Based on tracked file mappings, updating the API service will require updates to:
- /api/endpoints page (version numbers)
- API configuration guide (if parameters change)
- Architecture page (if networking changes)
Would you like me to prepare these updates?"šļø Generated Wiki Structure
Wiki.js Organization:
āāā frontend-docs/ (Repository Level)
ā āāā components/ ā Your component documentation
ā āāā deployment-guide/
ā āāā configuration/
ā āāā troubleshooting/
ā
āāā backend-docs/ (Repository Level)
ā āāā api-services/
ā āāā authentication/
ā āāā database-schemas/
ā āāā middleware/
ā
āāā system-architecture/ (Architectural Level)
āāā system-overview/
āāā frontend-backend-integration/
āāā network-topology/
āāā dependency-mapping/
āāā architectural-decisions/š” Key Benefits
Token Efficiency: 200-1200 tokens vs 25,000+ token explosion
Persistent Intelligence: Context survives between sessions via JSON files
Cross-Repository Relationships: Documents dependencies and integrations
Iterative Refinement: Easy corrections and updates to existing documentation
Documentation Interrogation: Query your documentation like a knowledge base
Automatic Organization: Smart categorization and wiki space management
Change Tracking: File hash system prevents unnecessary wiki updates
This creates a living documentation system where your wiki becomes an intelligent, queryable knowledge base that grows and evolves with your codebase.
š Advanced Usage
Custom File Analysis
The package automatically categorizes files for documentation:
Components: React/Vue components, UI elements
API: Endpoints, controllers, routes
Utils: Helper functions, utilities
Services: Business logic, external integrations
Models: Data models, types, schemas
Tests: Unit tests, integration tests
Config: Configuration files, environment setup
GraphQL Integration
Built on the verified GraphQL mutations that work with Wiki.js:
Proper authentication handling
Comprehensive error reporting
Retry logic with exponential backoff
Full type safety with TypeScript
š¤ Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
š License
MIT License - see LICENSE file for details.
š Acknowledgments
Wiki.js Team - For the excellent documentation platform
MCP Protocol - For standardized AI integration
@modelcontextprotocol/sdk - For the TypeScript MCP implementation
Ready to enhance your documentation workflow? š Install @redairforce/wikijs-mcp and let Claude manage your Wiki.js content seamlessly!
Available Tools
22 toolswikijs_bulk_create_pagesB
Create multiple pages in bulk
Inputs: pages (required).
wikijs_connection_statusA
Test the connection to Wiki.js and get basic site information
Inputs: no named parameters.
wikijs_create_nested_pageB
Create a page with hierarchical path structure
Inputs: title (required), content (required), parentPath (required), tags, +5 more.
wikijs_create_pageC
Create a new page in Wiki.js with markdown content
Inputs: path (required), title (required), content (required), tags, +5 more.
wikijs_create_repo_structureC
Create a complete repository documentation structure
Inputs: repoName (required), description (required), basePath, sections.
wikijs_cross_repo_linkC
Create architectural mapping between repositories
Inputs: toRepo (required), fromRepo (required), description (required), toComponent (required), +2 more.
wikijs_delete_pageB
Delete a page by ID
Inputs: id (required).
wikijs_detect_contextC
Auto-detect repository and workspace context for current directory
Inputs: directory.
wikijs_generate_file_overviewC
Generate documentation overview for a code file
Inputs: filePath (required), includeCode, analysisDepth.
wikijs_get_contextC
Get current context information optimized for Claude consumption
Inputs: mode.
wikijs_get_pageB
Retrieve a page by ID or path
Inputs: id, path.
wikijs_get_site_infoB
Get detailed information about the Wiki.js instance
Inputs: no named parameters.
wikijs_init_repositoryC
Initialize repository context for Wiki.js documentation
Inputs: repoRoot, wikiSpace, workspaceName.
wikijs_init_workspaceB
Initialize workspace context for multi-repository documentation
Inputs: repositories, workspaceName, workspaceRoot.
wikijs_list_pagesB
List pages with pagination
Inputs: limit, offset.
wikijs_repository_statusB
Show current repository context and documentation status
Inputs: no named parameters.
wikijs_search_pagesB
Search for pages by text content
Inputs: query (required), path, locale.
wikijs_set_context_modeB
Switch context mode (repository/workspace/architectural)
Inputs: mode (required).
wikijs_smart_sync_fileC
Intelligently sync file with Wiki.js using context awareness
Inputs: filePath (required), autoPath, forceUpdate.
wikijs_sync_file_docsC
Synchronize file content with Wiki.js documentation
Inputs: filePath (required), wikiPath (required), extractContent, includeMetadata.
wikijs_update_pageB
Update an existing page in Wiki.js
Inputs: id (required), tags, title, content, +3 more.
wikijs_workspace_statusB
Show workspace context with all repositories and their status
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 22 tools
Several tools cluster around the same action: create_page, create_nested_page, bulk_create_pages, and create_repo_structure all create pages, while sync_file_docs and smart_sync_file are near-duplicates. The context/status group also has seven tools covering overlapping state, so an agent could easily select the wrong one despite helpful descriptions.
All tools share a wikijs_ snake_case prefix and many use verb_noun naming (create_page, get_page, delete_page, list_pages). However, conventions drift with tools like bulk_create_pages and smart_sync_file placing modifiers before the verb, and status tools like repository_status, workspace_status, and connection_status dropping the verb entirely.
At 22 tools, the server sits in the heavy range for a Wiki.js MCP and feels padded by redundant creation/sync/context variants. The core page operations could be served by roughly half this many tools, though 22 is not extreme.
The core Wiki.js page lifecycle is well covered with create, get, update, delete, list, and search operations. Gaps exist around auxiliary featuresācontext has no clear/delete tool and cross_repo_link has no read/delete counterpartābut these are minor and workaroundable.
Maintenance
Related MCP Connectors
MCP server for skill documentation, generated by doc2mcp.
MCP server for developer documentation, generated by doc2mcp.
MCP server for hub documentation, generated by doc2mcp.
A MCP server built for developers enabling Git based project management with project and personalā¦
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol (MCP) server for Wiki.js with hierarchical documentation & Docker setup51MIT
- 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 gradedqualityBmaintenanceMCP server for Wiki.js with full GraphQL API coverage, fine-grained permissions, multi-user support, and deployable on Vercel.Apache 2.0