mcp-wiki
Enables contextual wiki lookups for GitHub Copilot within VS Code during development.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-wiki search wiki for deployment guide"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Wiki Explorer MCP Server
A generic MCP (Model Context Protocol) server that exposes any project wiki to AI assistants, enabling contextual wiki lookups during development sessions.
Features
Lazy loading — indexes headings once, loads content on-demand via byte positions
Auto-reload — watches the wiki file or markdown directory for changes with debouncing
Fuzzy search — handles typos and partial matches via levenshtein distance
Content search — searches within section content, not just headings
Custom anchors — use
{#anchor}syntax in headings for stable TOC linksDirectory mode — index entire markdown directory trees with file-prefixed keys
Legacy key support — backward-compatible lookup of heading-only keys
Heading hierarchy — tracks full breadcrumb path for nested sections
Batch fetch — retrieve multiple sections in one call (max 20)
Smart suggestions — returns similar keys when a section isn't found
Path safety — validates markdown sources and safe path resolution
Graceful shutdown — handles SIGINT/SIGTERM, cleans up watchers
Structured logging — configurable log levels for debugging
Related MCP server: WikiJS MCP Server
Setup
# 1. Install dependencies
npm install
# 2. Configure wiki path
cp .env.example .env
# 3. Run tests
npm test.env
WIKI_PATH=path/to/your/wiki-source # file (.md/.markdown) or directory
LOG_LEVEL=info # debug, info, warn, errorMCP Tools
Tool | Description | Parameters |
| List all available wiki sections | none |
| Browse sections by topic/parent |
|
| Search sections by keyword |
|
| Get a single section's content |
|
| Get multiple sections at once |
|
Connecting to AI Assistants
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"wiki-explorer": {
"command": "node",
"args": ["/path/to/wiki-explorer/index.js"],
"env": {
"WIKI_PATH": "/path/to/your/docs/wiki"
}
}
}
}Cursor
Add to Cursor MCP settings:
{
"mcpServers": {
"wiki-explorer": {
"command": "node",
"args": ["/path/to/wiki-explorer/index.js"],
"env": {
"WIKI_PATH": "/path/to/your/docs/wiki"
}
}
}
}VS Code (GitHub Copilot)
Add to .vscode/mcp.json:
{
"servers": {
"wiki-explorer": {
"command": "node",
"args": ["/path/to/wiki-explorer/index.js"],
"env": {
"WIKI_PATH": "/path/to/your/docs/wiki"
}
}
}
}Running
# Start MCP server (stdio transport)
npm start
# Debug mode
LOG_LEVEL=debug npm startArchitecture
index.js → MCP server + tool registration + signal handlers
utils.js → WikiParser class (indexing, search, content extraction)
logger.js → Structured logging with configurable levels
test.js → 67 assertions covering all functionality
.env → WIKI_PATH, LOG_LEVEL configurationWikiParser Class
Constructor — validates file/directory source, loads markdown docs, builds heading index with byte positions
search(query, { fuzzy, limit })— find sections by keywordfindSimilar(key)— get similar keys via levenshtein distancegetSection(key)— retrieve content for a single sectiongetSections(keys)— batch retrieve multiple sectionsreload()— re-read file and rebuild indexclose()— stop file watcher
Key Compatibility
Canonical keys in directory mode are prefixed by file slug (e.g.
user-wiki-approval-workflow-deep-dive)Legacy heading-only keys are still accepted in
getMeta/getSectionfor backward compatibilityAmbiguous legacy keys require suffixed form (
-1,-2) to resolve deterministicallySearch accepts legacy key queries but returns canonical keys
Custom Anchors
Headings can include a custom anchor using {#anchor-name} syntax at the end of the heading text:
## Backend Architecture {#portage-backend-architecture}This creates a stable anchor that can be used in table of contents or direct links. The anchor is stripped from the displayed title but registered as a legacy alias for lookup.
Content Search
Search matches both heading text and section content. Results are prioritized:
Header matches — exact or fuzzy match in heading text
Content matches — keyword found within section body
This ensures the most relevant sections appear first.
Security
Source validation (
.md/.markdownfile or directory)Safe path resolution via
path.resolve+ fs stat checksFile size cap (50MB default)
Key format validation (lowercase alphanumeric + hyphens)
Batch request limits (max 20 keys)
Graceful Shutdown
Handles SIGINT, SIGTERM, uncaughtException, and unhandledRejection. Cleans up file watchers and exits cleanly.
Testing
npm testCovers: initialization, path validation, directory mode, search (headers + content), fuzzy search, findSimilar, meta, sections, batch fetch, boundaries, reload, file watcher, key format validation, custom anchors, legacy key resolution, and cleanup.
CI/CD
GitHub Actions runs tests on Node 20 and 22 for every push/PR to main. See .github/workflows/ci.yml.
Available Tools
6 toolsbrowse_wikiARead-only
Browse wiki sections by topic/parent. Returns section keys and titles without full content. Use this to discover relevant sections before fetching content.
Inputs: topic. Returns: count, error, groups
get_wiki_infoARead-only
Get metadata about the connected wiki instance — path, mode (file/directory), and section count.
Inputs: no named parameters. Returns: mode, uptime, wikiPath, sectionCount, +1 more
get_wiki_sectionARead-only
Retrieve markdown content of a wiki section. Defaults to 8000 chars to save tokens. Set limit higher or use offset to read the full section.
Inputs: key (required), limit, offset. Returns: error, limit, title, offset, +9 more
get_wiki_sectionsARead-only
Retrieve multiple wiki sections at once. Each section is truncated to save tokens.
Inputs: keys (required). Returns: error, sections, errorCount, successCount
list_wikiARead-only
List all available wiki section keys. Use browse_wiki instead for topic-filtered results.
Inputs: no named parameters. Returns: count, error, sections
search_wikiARead-only
Search wiki section titles and content by keyword. Returns matching section keys with snippets. Header matches are prioritized over content matches.
Inputs: query (required), fuzzy, limit. Returns: count, error, results, suggestions
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clear distinct purposes: search, browse, get single, get multiple, and info are unambiguous. However, list_wiki and browse_wiki overlap significantly since both return section keys, though browse offers topic filtering.
All tool names follow a consistent verb_noun pattern in snake_case: list_, browse_, search_, get_wiki_section(s), get_wiki_info. The verbs are descriptive and predictable.
Six tools is well-scoped for a wiki server. Each tool covers a distinct aspect of reading wiki content, and the count feels neither sparse nor bloated.
The surface covers all read-related workflows: discovery (list/browse/search), retrieval (single/multiple sections), and metadata. Missing write operations (create/update/delete) but likely outside the apparent read-only scope.
Maintenance
Related MCP Connectors
Hosted markdown project wikis your team's AI assistants read, search, and update over MCP.
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
A cited wiki of your GitHub repo: search, read pages, find symbols and ask, with line citations.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to search and retrieve content from WikiJS knowledge bases, allowing integration with your Wiki through simple search and retrieval tools.423 npm6MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search, retrieve, and optionally edit pages in a WikiJS knowledge base via the Model Context Protocol.26 npm1MIT

@growi/mcp-serverofficial
AlicenseBqualityBmaintenanceConnects AI models to GROWI wikis for search and retrieval, enabling context-aware responses from an organization's knowledge base.31243 npm20MIT- AlicenseBqualityBmaintenanceEnables AI agents to read and write structured, human-verified wiki knowledge inside a project repo, providing reliable context without interfering with the AI's reasoning.27 npm1MIT