Skip to main content
Glama

WikiJS MCP Server

by jaalbin24
README.md•6.44 kB
# šŸ“š WikiJS MCP Server **Connect Claude to your Wiki.js documentation!** This tool lets Claude read and update your Wiki.js pages directly. Think of it as giving Claude access to your team's knowledge base - perfect for keeping documentation up-to-date or finding information quickly. ## šŸŽÆ What This Does Once installed, you can ask Claude to: - šŸ” **Search** your wiki for specific topics - šŸ“– **Read** documentation pages - āœļø **Update** existing pages with new information - šŸ“ **Create** new documentation - šŸ—‚ļø **Organize** pages by moving them around - šŸ—‘ļø **Delete** outdated pages ## šŸš€ Installation Guide ### Prerequisites Before starting, make sure you have: - āœ… **Git** installed ([Download here](https://git-scm.com/downloads)) - āœ… **Python 3.8 or newer** ([Download here](https://www.python.org/downloads/)) - āœ… **Claude Code** installed ([Get it here](https://claude.ai/code)) - āœ… **Access to a Wiki.js site** (with an API key - we'll show you how to get one!) ### Step 1: Download the Code Open your terminal (Command Prompt on Windows, Terminal on Mac) and run: ```bash git clone https://github.com/your-username/wikijs-mcp.git cd wikijs-mcp ``` šŸ’” **Tip**: If you get a "command not found" error, make sure Git is installed! ### Step 2: Get Your Wiki.js API Key 1. **Log into your Wiki.js site** as an administrator 2. Navigate to **Administration** (usually in the top menu) 3. Click on **API Access** in the left sidebar 4. If the API is disabled, click the toggle to **Enable** it 5. Click **"+ New API Key"** 6. Give it a name like "Claude Integration" 7. Select these permissions: - āœ… Read Pages - āœ… Write Pages - āœ… Manage Pages (if you want Claude to create/delete pages) 8. Click **Create** and **copy the API key** - you'll need it next! āš ļø **Important**: Save this key somewhere safe - you won't be able to see it again! ### Step 3: Configure Your Connection 1. **Create the configuration file**: ```bash cp .env.example .env ``` 2. **Open the `.env` file** in any text editor (Notepad, TextEdit, VS Code, etc.) 3. **Replace the example values** with your actual information: ```env WIKIJS_URL=https://your-wiki-site.com WIKIJS_API_KEY=paste-your-api-key-here ``` šŸ“Œ **Example**: ```env WIKIJS_URL=https://docs.mycompany.com WIKIJS_API_KEY=ey1234567890abcdef... ``` ### Step 4: Install Python Dependencies Run this command to install what the tool needs: ```bash pip install -e . ``` šŸ’” **Troubleshooting**: - If you get "pip: command not found", try `pip3` instead - On Mac, you might need to use `python3 -m pip install -e .` ### Step 5: Test the Connection Let's make sure everything works! Run: ```bash python -m wikijs_mcp.server ``` You should see something like: ``` WikiJS MCP Server starting... Connected to Wiki.js at https://your-wiki-site.com Ready to accept connections! ``` Press `Ctrl+C` to stop it. ## šŸŽ‰ Using with Claude Code The best part - **Claude Code will automatically detect this MCP server!** The repository includes a special `.mcp.json` file that Claude Code reads automatically. Just: 1. **Open Claude Code** in the `wikijs-mcp` folder 2. Claude will automatically have access to your Wiki.js! ### Try These Commands Once connected, you can ask Claude things like: ``` "Search my wiki for information about deployment procedures" "Read the page at /docs/getting-started" "Update the troubleshooting guide with a new solution for login issues" "Create a new page at /docs/api/webhooks with webhook documentation" ``` ## šŸ”§ Manual Configuration (Advanced) If you're using a different MCP client or need custom settings, here's the configuration: ### For Standard Installation ```json { "mcpServers": { "wikijs": { "command": "python", "args": ["-m", "wikijs_mcp.server"], "env": { "WIKIJS_URL": "https://your-wiki-site.com", "WIKIJS_API_KEY": "your-api-key" } } } } ``` ### For Docker Users ```json { "mcpServers": { "wikijs": { "command": "docker", "args": ["compose", "run", "--rm", "-T", "wikijs-mcp-server", "python3", "-m", "wikijs_mcp.server"], "cwd": "/path/to/wikijs-mcp" } } } ``` ## šŸ†˜ Common Issues & Solutions ### "Connection refused" or "Cannot connect to Wiki.js" - āœ… Check your `WIKIJS_URL` doesn't have a trailing slash - āœ… Make sure your Wiki.js site is accessible from your computer - āœ… Verify the API is enabled in Wiki.js admin panel ### "Authentication failed" or "Invalid API key" - āœ… Double-check you copied the entire API key - āœ… Make sure there are no extra spaces before/after the key - āœ… Verify the API key has the right permissions ### "Module not found" errors - āœ… Make sure you ran `pip install -e .` in the wikijs-mcp folder - āœ… Try using `python3` instead of `python` ### Claude Code doesn't see the Wiki.js tools - āœ… Make sure you're running Claude Code from the wikijs-mcp folder - āœ… Check that the `.mcp.json` file exists - āœ… Try restarting Claude Code ## šŸ“š Available Tools Reference Here's what Claude can do once connected: | Tool | What it does | Example | |------|--------------|---------| | šŸ” **wiki_search** | Find pages by title or content | "Search for 'authentication'" | | šŸ“– **wiki_get_page** | Read a specific page | "Get page at path '/docs/api'" | | šŸ“‹ **wiki_list_pages** | See all pages | "List all wiki pages" | | 🌳 **wiki_get_tree** | View wiki structure | "Show wiki page tree" | | āœļø **wiki_create_page** | Make new pages | "Create page at '/guides/setup'" | | šŸ”„ **wiki_update_page** | Edit existing pages | "Update page ID 123" | | 🚚 **wiki_move_page** | Relocate pages | "Move page to '/archive/old'" | | šŸ—‘ļø **wiki_delete_page** | Remove pages | "Delete page ID 456" | ## šŸ› ļø For Developers ### Running Tests ```bash # Install dev dependencies pip install -e ".[dev]" # Run all tests pytest # Run with coverage pytest --cov=wikijs_mcp ``` ### Code Quality ```bash # Format code black wikijs_mcp/ tests/ # Type checking mypy wikijs_mcp/ ``` ## šŸ“„ License MIT License - feel free to use and modify! ## šŸ’¬ Need Help? - Check the [Common Issues](#-common-issues--solutions) section above - Look at the [Wiki.js documentation](https://docs.requarks.io/) - Open an issue on GitHub if you're stuck! --- **Happy documenting!** šŸŽ‰

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/jaalbin24/wikijs-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server