Skip to main content
Glama
fabiandistler

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: agentwikis-mcp

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden; it discloses the mode-dependent behavior (listing vs. searching vs. reading), which is more than the schema gives. However, it never states that the tool is read-only with no side effects, nor how it behaves if both query and page are supplied, nor any pagination or result-size limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact clauses, front-loaded with the tool's purpose, each clause carrying distinct invocation information with zero filler. Well-sized for a simple two-parameter lookup tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return structure need not be explained, and the description covers all three call patterns. The only gap is the absence of guidance for the ambiguous case where both optional parameters are provided simultaneously.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does for the core semantics: query is a search term producing matches, page is a filename.md producing a full page, and the omitted case lists all pages. It does not clarify mutual exclusivity of the two optional params or the required file extension format.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb-plus-resource ('Search or read the git wiki topic') and implicitly separates itself from the sibling topics (wiki_python, wiki_sql) by naming its scope. An agent can immediately tell what it retrieves and which of the three topic tools to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly enumerates the three invocation modes and the condition that selects each: no args lists pages, query=<term> finds matches, page=<filename.md> fetches a full page. This is a complete decision rule for how to call the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

wiki_pythonA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations absent, the description carries the full burden, and it does disclose the three behavioral modes, which is genuinely useful. However, it says nothing about whether this is a safe read-only operation (it is implied but not stated), nor about result ordering, size limits, or what happens on an unknown topic/term. Adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight fragments, front-loaded with the overall purpose before the mode-specific rules. The '<term>' and '<filename.md>' shorthand is slightly cryptic but readable, and no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is a low-complexity read-only lookup with two optional parameters, and an output schema already exists so return values need no explanation. All three call modes are documented, leaving only minor unstated details like error behavior for a missing page.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: query is defined as a search term and page as a filename.md, with the default null/absent state mapped to a page listing. The only gap is format detail, e.g. whether page accepts a path or only a bare filename.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb set (search/read) and a specific resource (the 'python' wiki topic), and the topic name is what separates it from siblings wiki_git and wiki_sql. The three operating modes are spelled out, so an agent knows exactly what the tool does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly maps each calling mode to its trigger: no args to list, query=<term> to find matches, page=<filename.md> to fetch a full page. This is clear when-to-use guidance for each variant. It stops short of a 5 because it never states when not to use it or contrasts against the sibling topic tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

wiki_sqlA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the disclosure burden, and it does disclose the non-obvious default that calling with zero arguments returns a page listing. It implies read-only behavior via 'search or read' but does not cover pagination, result limits, or how large pages are handled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact clauses, front-loaded with the tool's identity followed by the mode rules; no filler sentences. The telegraphic 'arg: behavior' style trades a little readability for density, which is acceptable but not maximally clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, zero-required tool with an output schema covering return values, the description covers both modes and the default behavior. It lacks detail on match semantics (substring vs. fuzzy) and what happens when query and page are combined, which are minor for this tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: query is mapped to term matching and page to a filename.md for full-page retrieval, adding semantics the bare string type does not convey. The one gap is precedence when both parameters are supplied simultaneously.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb pair (search/read) and a concrete resource (the 'sql' wiki topic), and the topic name cleanly separates it from the wiki_git and wiki_python siblings. An agent can identify what this tool does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit mode-selection rules: no args lists pages, query=<term> finds matches, page=<filename.md> returns a full page. What it does not do is state when to prefer this topic tool over the git/python siblings, though the topic suffix makes that largely self-evident.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 3 tool updatesv0.1.0
    • First observedwiki_git
    • First observedwiki_python
    • First observedwiki_sql

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

ActivityActive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to search, deep-read, and build knowledge bases from Markdown, PDF, DOCX, and PPTX documents via MCP tools for retrieval, document navigation, and ingestion.
    16
    631
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides read-only access to curated, agent-readable knowledge bases from Agent Wikis, with tools for listing, searching, and reading documents, including a confidence flag for reliable information retrieval.
    29
    13
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides a durable, Obsidian-compatible knowledge base for agents using markdown notes and wikilinks. Enables agents to store, retrieve, and interlink knowledge persistently, with tools for writing, searching, and managing a graph of notes.
    1
    MIT
  • 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