Skip to main content
Glama
MCP Wiki Server

MCP Wiki Server

MCP Wiki Server

An MCP server that exposes a wiki / knowledge base to AI agents. Each top-level folder under the wiki root becomes its own tool, so the agent can see the available domains directly from the tool list and pull only what it needs into context.

wiki/sql/    -> tool  wiki_sql
wiki/python/ -> tool  wiki_python
wiki/git/    -> tool  wiki_git

Tool semantics

Every topic tool accepts the same two optional arguments:

call

returns

wiki_sql()

Table of contents for the topic (filename + summary)

wiki_sql(query="JOIN")

Matching lines across all pages with file:line

wiki_sql(page="joins.md")

Full page contents (truncated at 8 KB)

Related MCP server: wikikit

Configuration

The server reads its wiki source from environment variables.

Local folder (default)

WIKI_PATH=/absolute/path/to/wiki

If unset, defaults to ./wiki next to server.py (the bundled demo).

Remote git repo

WIKI_GIT_URL=https://github.com/<org>/<wiki-repo>
WIKI_GIT_BRANCH=main           # optional, defaults to "main"
WIKI_CACHE_DIR=/tmp/my-wiki    # optional, defaults to system tempdir

WIKI_GIT_URL takes precedence over WIKI_PATH. The repo is cloned shallowly on first run and refreshed with git pull --ff-only on every start after that, so a long-lived cache does not serve the wiki frozen at whenever it was first cloned. A failed refresh (offline, revoked credentials) is reported on stderr and the cached copy is served as-is; delete the cache dir to force a fresh clone.

Running

MCP Inspector (for testing)

# The <2 bound matches pyproject.toml — server.py uses the v1 FastMCP API,
# which mcp 2.x renamed. Without it, --with resolves to 2.x and the import fails.
uv run --with "mcp[cli]<2" mcp dev server.py

Open the printed URL → confirm wiki_sql, wiki_python, wiki_git appear and call them with the argument shapes above.

From Claude Code

Copy .mcp.json.example into your project as .mcp.json (or merge it into ~/.claude.json for global use), restart Claude Code, then run /mcp to verify the connection.

Relationship to the skills in this repo

None. The architecture and refactoring plugins used to embed this server over their skills' references/ folders; that wiring was removed because it only duplicated what an agent gets by reading those pages directly. The skills now rely on plain progressive disclosure, and this server stands on its own for wikis that live outside a skill.

The server follows directory symlinks, so topic folders under WIKI_PATH may themselves be links.

Adding your own content

Create a folder under your WIKI_PATH and drop Markdown files in it:

my-wiki/
  kubernetes/
    deployments.md
    services.md
  terraform/
    modules.md

Restart the server. New tools wiki_kubernetes and wiki_terraform will appear automatically. Folder names with non-identifier characters are sanitized: data-science/ becomes wiki_data_science.

Sanitizing maps every non-alphanumeric character to _, so sibling folders can collapse onto one tool name — sql-1/ and sql_1/ both become wiki_sql_1. The server registers the first and skips the rest, naming the collision on stderr; rename one of them.

Limits

  • Pages are truncated at 8000 characters per fetch.

  • Search returns at most 20 hits per call.

  • Path traversal via page=../... is blocked.

  • Only *.md files are indexed.

Available Tools

3 tools
wiki_gitA

Search or read the 'git' wiki topic. No args: list pages. query=: find matches. page=<filename.md>: full page.

Inputs: page, query. Returns: result

wiki_pythonA

Search or read the 'python' wiki topic. No args: list pages. query=: find matches. page=<filename.md>: full page.

Inputs: page, query. Returns: result

wiki_sqlA

Search or read the 'sql' wiki topic. No args: list pages. query=: find matches. page=<filename.md>: full page.

Inputs: page, query. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation4/5

    Tools are clearly separated by wiki topic (git, python, sql), so an agent can pick the right one when the topic is known. However, the identical interface and absence of a generic topic parameter or cross-topic search mean ambiguity arises when the topic is unspecified or spans multiple wikis.

    Naming Consistency5/5

    All tool names follow a consistent wiki_<topic> pattern (wiki_git, wiki_python, wiki_sql), making them predictable and easy to parse.

    Tool Count4/5

    Three tools map to three topics, which is a reasonable number for the stated scope, though a single parameterized tool would reduce duplication and scale better.

    Completeness3/5

    Read/list/search operations are covered per topic, but there is no write capability (create/edit/delete) and no way to discover or query other topics, leaving notable gaps for a wiki server.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to search, read, and traverse a local knowledge base of Markdown files using full-text search and relationship graph, reducing token usage.
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables any MCP-capable agent to write and maintain its own wiki of small linked markdown pages with a typed ontology, storing, indexing and retrieving them through keyword (BM25) search plus ontology-graph traversal, typed-relation management, page reads and writes, linting and listing. It also offers an optional vision tool that extracts objects and text from images so text-only models can learn from screenshots, charts and scans.
      MIT