|
|
1 年之前 | |
|---|---|---|
| .github | 1 年之前 | |
| src | 1 年之前 | |
| .eslintrc.json | 1 年之前 | |
| .gitignore | 1 年之前 | |
| .npmignore | 1 年之前 | |
| CLAUDE.md | 1 年之前 | |
| LICENSE | 1 年之前 | |
| Makefile | 1 年之前 | |
| README.md | 1 年之前 | |
| codegen.yml | 1 年之前 | |
| docker-compose.yml | 1 年之前 | |
| env.example | 1 年之前 | |
| jest.config.mjs | 1 年之前 | |
| package-lock.json | 1 年之前 | |
| package.json | 1 年之前 | |
| tsconfig.json | 1 年之前 |
A Model Context Protocol (MCP) server that provides integration with WikiJS, allowing AI assistants to search and retrieve content from your WikiJS knowledge base.
This MCP server enables AI assistants to interact with WikiJS instances by providing tools to:
npx @cahaseler/wikijs-mcp
The binary will be available as wikijs-mcp-edit to avoid conflicts with the original package.
git clone https://github.com/cahaseler/wikijs-mcp.git
cd wikijs-mcp
npm install
npm run build
# Add as a user-scoped server (available across all projects)
claude mcp add wikijs \
-e WIKIJS_URL=https://your-wiki.example.com \
-e WIKIJS_API_KEY=your-api-key \
-- npx @cahaseler/wikijs-mcp
# Or with edit functionality enabled
claude mcp add wikijs \
-e WIKIJS_URL=https://your-wiki.example.com \
-e WIKIJS_API_KEY=your-api-key \
-e WIKIJS_ENABLE_EDIT=true \
-- npx @cahaseler/wikijs-mcp
Create a .mcp.json file in your project root:
{
"mcpServers": {
"wikijs": {
"command": "npx",
"args": ["@cahaseler/wikijs-mcp"],
"env": {
"WIKIJS_URL": "https://your-wiki.example.com",
"WIKIJS_API_KEY": "your-api-key",
"WIKIJS_ENABLE_EDIT": "false"
}
}
}
}
Add to your Cursor settings (.cursor/settings.json):
{
"mcpServers": {
"wikijs-mcp": {
"command": "npx",
"args": ["@cahaseler/wikijs-mcp"],
"env": {
"WIKIJS_URL": "https://your-wiki.example.com",
"WIKIJS_API_KEY": "your-api-key",
"WIKIJS_ENABLE_EDIT": "false"
}
}
}
}
Add to your Claude Desktop configuration:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"wikijs-mcp": {
"command": "npx",
"args": ["@cahaseler/wikijs-mcp"],
"env": {
"WIKIJS_URL": "https://your-wiki.example.com",
"WIKIJS_API_KEY": "your-api-key",
"WIKIJS_ENABLE_EDIT": "false"
}
}
}
}
| Variable | Description | Required | Default |
|---|---|---|---|
WIKIJS_URL |
URL of your WikiJS instance | Yes | - |
WIKIJS_API_KEY |
WikiJS API key | Yes | - |
WIKIJS_ENABLE_EDIT |
Enable page editing functionality | No | false |
Once configured, the following tools will be available:
search_pages - Search for pages by query string
query (required), path (optional), locale (optional)
get_page_by_id - Retrieve a specific page by its ID
id (required)
get_page_by_path - Retrieve a page by its path and locale
path (required), locale (required)
get_all_pages - List all pages with optional filters
limit (optional), locale (optional), tags (optional)
create_page - Create a new WikiJS page (only when WIKIJS_ENABLE_EDIT=true)
title (required), content (required), description (required), path (required), editor (optional), isPublished (optional), isPrivate (optional), locale (optional), tags (optional)
edit_page - Edit a WikiJS page (only when WIKIJS_ENABLE_EDIT=true)
id (required), title, content, description, editor, isPublished, isPrivate, locale, tags, pathClone the repository:
git clone https://github.com/cahaseler/wikijs-mcp.git
cd wikijs-mcp
bash
npm install
Copy the environment template:
cp env.example .env
.env with your WikiJS credentialsTo run a local WikiJS instance for testing:
# Start WikiJS and PostgreSQL
docker-compose up -d
# The instance will be available at http://localhost:3000
# Follow the setup wizard to create an admin account
# Using npm
npm run build
# Using make
make build
# Run the built server
node build/index.js
# Or use the make command
make run
Ensure your environment variables are properly configured. Check your .env file or the environment variables in your MCP client configuration.
Your API key may be expired or lack the necessary permissions. Create a new API key with appropriate permissions.
If you modify the GraphQL queries, regenerate the types:
npm run codegen
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.