Skip to main content
Glama

wiki-js-mcp

An MCP server for Wiki.js — lets AI agents create, read, update, search, list, and move wiki pages via the Wiki.js GraphQL API.

Tools

Tool

Description

wiki_get_page

Read a page's content and metadata by path

wiki_create_page

Create a new page with markdown content

wiki_update_page

Update content, metadata, or patch a named section

wiki_search_pages

Full-text search — returns title, path, description, tags

wiki_list_pages

List pages with an optional path-prefix filter

wiki_move_page

Rename or restructure a page path

All tools return {"success": bool, "error": str | null, ...} and never raise — the calling agent decides how to handle failures.

Section patching

wiki_update_page supports surgical updates to named sections without touching the rest of the page. Fence any block in your wiki content with HTML comments:

<!-- OSIA:AUTO:watchlist -->
Content managed by the AI agent goes here.
<!-- /OSIA:AUTO:watchlist -->

Then call:

wiki_update_page(
    path="desks/geopolitical-and-security",
    section="watchlist",
    section_content="- Benjamin Netanyahu (🔴 Critical)\n- ...",
)

The markers and surrounding content are left untouched.

Related MCP server: WikiJS MCP Server

Requirements

  • Python 3.11+

  • uv (recommended) or pip

  • A running Wiki.js 2.x instance with a valid API key

Installation

git clone https://github.com/osianet/wiki-js-mcp.git
cd wiki-js-mcp
uv sync

Copy .env.example to .env and fill in your values:

cp .env.example .env
WIKIJS_URL=http://localhost:3000/graphql
WIKIJS_API_KEY=your-api-key-here

Generate an API key at https://your-wiki/a/api-keys in the Wiki.js admin panel.

Usage

Standalone (stdio)

uv run wiki-mcp

With Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "wiki-js": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/wiki-js-mcp", "wiki-mcp"],
      "env": {
        "WIKIJS_URL": "http://localhost:3000/graphql",
        "WIKIJS_API_KEY": "your-api-key-here"
      }
    }
  }
}

With Claude Code

Add to your project's .claude/settings.json or ~/.claude/settings.json:

{
  "mcpServers": {
    "wiki-js": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/wiki-js-mcp", "wiki-mcp"]
    }
  }
}

Development

uv sync --extra dev

# Lint
uv run ruff check wiki_mcp.py

# Format
uv run ruff format wiki_mcp.py

# Type check
uv run pyright wiki_mcp.py

# Tests
uv run pytest

License

MIT — see LICENSE.

Available Tools

6 tools
wiki_create_pageB

Create a new wiki page at the given path with markdown content. Returns the new page id and path on success.

Inputs: path (required), title (required), content (required), description, +1 more.

wiki_get_pageA
Read a wiki page by its path (e.g. 'desks/geopolitical-and-security').
Returns id, title, description, tags, content, created_at, updated_at.

Inputs: path (required).

wiki_list_pagesA
List wiki pages, optionally filtered to those whose path starts with path_prefix.
Returns a list of pages with id, path, title, description, tags, updated_at.
Pass path_prefix='' to list all pages.

Inputs: path_prefix.

wiki_move_pageA
Move/rename a wiki page to a new path.
The page is looked up by its current path; new_path is the destination.
Returns old_path and new_path on success.

Inputs: path (required), new_path (required).

wiki_search_pagesC
Full-text search across all wiki pages.
Returns a list of results with id, title, path, description, and total_hits.

Inputs: query_str (required).

wiki_update_pageA
Update an existing wiki page by path.

Modes:
- Full replace: pass `content` to overwrite the entire page body.
- Section patch: pass `section` + `section_content` to update only the
  content between <!-- OSIA:AUTO:section --> ... <!-- /OSIA:AUTO:section -->
  markers, leaving the rest of the page untouched.
- Metadata only: pass `title`, `description`, or `tags` without `content`
  or `section` to update metadata without touching the body.

Returns id, path, updated_at on success.

Inputs: path (required), content, title, description, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: create, get, list, move, search, and update. The descriptions reinforce distinct operations (e.g., wiki_move_page for moving/renaming vs. wiki_update_page for content/metadata updates), making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent 'wiki_verb_noun' pattern (e.g., wiki_create_page, wiki_get_page). The naming is uniform with snake_case throughout, making it predictable and easy to understand at a glance.

    Tool Count5/5

    With 6 tools, the server is well-scoped for wiki management, covering core CRUD operations (create, get, update), listing, moving, and searching. Each tool earns its place without being overly sparse or bloated.

    Completeness5/5

    The toolset provides complete lifecycle coverage for wiki pages: create, read (get/list/search), update (with multiple modes), and move (effectively a rename/delete combination). There are no obvious gaps, as all essential operations for managing wiki content are included.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers