Supports deployment of Wiki.js using Docker with one-command setup, persistent storage configuration, and health monitoring for production environments.
Leverages Wiki.js's GraphQL API with optimized queries, efficient data fetching, comprehensive error handling, and automatic retry logic for reliable API interactions.
Integrates with PostgreSQL as the database backend for Wiki.js, with configuration options for database connection and credentials management.
Provides comprehensive integration with Wiki.js, enabling hierarchical documentation management with features for creating, updating, searching, and organizing documentation pages. Includes tools for repository structure creation, nested page management, file-to-documentation mapping, and bulk operations for enterprise-scale documentation.
Wiki.js MCP Server
A comprehensive Model Context Protocol (MCP) server for Wiki.js integration with hierarchical documentation support and Docker deployment. Perfect for organizations managing multiple repositories and large-scale documentation.
🚀 Quick Start
1. Environment Setup
First, clone this repository and set up environment variables:
2. Docker Deployment (Recommended)
Wiki.js will be available at http://localhost:3000
Complete the initial setup in the web interface
3. Setup MCP Server
4. Configure Cursor MCP
Add to your ~/.cursor/mcp.json
:
🎯 Enhanced Cursor Integration
Global Rules for Documentation-First Development
Add these Global Rules in Cursor to automatically leverage documentation before coding:
These rules ensure that your AI assistant will:
- ✅ Check documentation before suggesting implementations
- ✅ Follow existing patterns and conventions
- ✅ Maintain up-to-date documentation automatically
- ✅ Create structured documentation for new features
- ✅ Avoid duplicating existing functionality
Usage Tips for Cursor
🚀 Key Features
📁 Hierarchical Documentation
- Repository-level organization: Create structured docs for multiple repos
- Nested page creation: Automatic parent-child relationships
- Auto-organization: Smart categorization by file type (components, API, utils, etc.)
- Enterprise scalability: Handle hundreds of repos and thousands of files
🔧 Core Functionality
- GraphQL API integration: Full Wiki.js v2+ compatibility
- File-to-page mapping: Automatic linking between source code and documentation
- Code structure analysis: Extract classes, functions, and dependencies
- Bulk operations: Update multiple pages simultaneously
- Change tracking: Monitor file modifications and sync docs
🐳 Docker Setup
- One-command deployment: Complete Wiki.js setup with PostgreSQL
- Persistent storage: Data survives container restarts
- Health checks: Automatic service monitoring
- Production-ready: Optimized for development and deployment
🔍 Smart Features
- Repository context detection: Auto-detect Git repositories
- Content generation: Auto-create documentation from code structure
- Search integration: Full-text search across hierarchical content
- Health monitoring: Connection status and error handling
📊 MCP Tools (21 Total)
🏗️ Hierarchical Documentation Tools
wikijs_create_repo_structure
- Create complete repository documentation structurewikijs_create_nested_page
- Create pages with hierarchical pathswikijs_get_page_children
- Navigate parent-child page relationshipswikijs_create_documentation_hierarchy
- Auto-organize project files into docs
📝 Core Page Management
wikijs_create_page
- Create new pages (now with parent support)wikijs_update_page
- Update existing pageswikijs_get_page
- Retrieve page content and metadatawikijs_search_pages
- Search pages by text (fixed GraphQL issues)
🗑️ Deletion & Cleanup Tools
wikijs_delete_page
- Delete specific pages by ID or pathwikijs_batch_delete_pages
- Batch delete with pattern matching and safety checkswikijs_delete_hierarchy
- Delete entire page hierarchies with multiple modeswikijs_cleanup_orphaned_mappings
- Clean up orphaned file-to-page mappings
🗂️ Organization & Structure
wikijs_list_spaces
- List top-level documentation spaceswikijs_create_space
- Create new documentation spaceswikijs_manage_collections
- Manage page collections
🔗 File Integration
wikijs_link_file_to_page
- Link source files to documentation pageswikijs_sync_file_docs
- Sync code changes to documentationwikijs_generate_file_overview
- Auto-generate file documentation
🚀 Bulk Operations
wikijs_bulk_update_project_docs
- Batch update multiple pages
🔧 System Tools
wikijs_connection_status
- Check API connection healthwikijs_repository_context
- Show repository mappings and context
🏢 Enterprise Use Cases
Multi-Repository Documentation
Automatic Organization
The system intelligently categorizes files:
- 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
📚 Usage Examples
Create Repository Documentation
Documentation Management
⚙️ Configuration
Environment Variables
Authentication Options
- JWT Token (Recommended): Use API key from Wiki.js admin panel
- Username/Password: Traditional login credentials
🔧 Technical Architecture
GraphQL Integration
- Full GraphQL API support: Native Wiki.js v2+ compatibility
- Optimized queries: Efficient data fetching and mutations
- Error handling: Comprehensive GraphQL error management
- Retry logic: Automatic retry with exponential backoff
Database Layer
- SQLite storage: Local file-to-page mappings
- Repository context: Git repository detection and tracking
- Change tracking: File hash monitoring for sync detection
- Relationship management: Parent-child page hierarchies
Code Analysis
- AST parsing: Extract Python classes, functions, imports
- Structure detection: Identify code patterns and organization
- Documentation generation: Auto-create comprehensive overviews
- Dependency mapping: Track imports and relationships
📈 Performance & Scalability
- Async operations: Non-blocking I/O for all API calls
- Bulk processing: Efficient batch operations for large projects
- Caching: Smart caching of page relationships and metadata
- Connection pooling: Optimized HTTP client management
🛠️ Development
Project Structure
Dependencies
- FastMCP: Official Python MCP SDK
- httpx: Async HTTP client for GraphQL
- SQLAlchemy: Database ORM for mappings
- Pydantic: Configuration and validation
- tenacity: Retry logic for reliability
🔍 Troubleshooting
Docker Issues
Connection Issues
Common Problems
- Port conflicts: Change port 3000 in
docker.yml
if needed - Database issues: Remove
postgres_data/
and restart - API permissions: Ensure API key has admin privileges
- Python dependencies: Run
./setup.sh
to reinstall
📚 Documentation
- Hierarchical Features Guide - Complete guide to enterprise documentation
- Deletion Tools Guide - Comprehensive deletion and cleanup tools
- Configuration Examples - Environment setup
🤝 Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Wiki.js Team: For the excellent documentation platform
- MCP Protocol: For the standardized AI integration framework
- FastMCP: For the Python MCP SDK
Ready to scale your documentation? 🚀 Start with wikijs_create_repo_structure
and build enterprise-grade documentation hierarchies! Use the Cursor global rules to ensure documentation-first development! 📚✨
This server cannot be installed
wiki-js-mcp
Related MCP Servers
- -securityFlicense-qualityA Node.js server that implements Model Context Protocol (MCP) for controlling HWP (Korean word processor) documents, allowing AI assistants like Claude to create and manipulate Hangul documents.Last updated -27Python
- -securityFlicense-qualityA Node.js module that provides an MCP Server connecting to MCP Bone online service, allowing users to register other MCP Servers, obtain function calling tools in JSON or XML format, and parse completion text into tool calls.Last updated -46JavaScript
- PythonMIT License
- TypeScriptMIT License