docs-mcp
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., "@docs-mcpsearch the docs for authentication"
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.
@devista/docs-mcp
A generic MCP server that gives AI agents (Claude Code, Cursor, etc.) full-text search over any Markdown/MDX documentation folder. Point it at your docs and your AI assistant can search, browse, and read your project documentation during development.
How It Works
The server runs as a local process communicating over stdio (the standard MCP transport). When it starts:
Freshness check — compares modification times of your doc files against the last-built index
Auto-rebuild — if any file changed (or the index doesn't exist yet), it parses all Markdown/MDX files, strips MDX syntax (imports, JSX component tags), extracts frontmatter, and builds a Flexsearch full-text search index
Serve — exposes three MCP tools (
search_docs,get_page,list_sections) that agents can call to query your documentationCached — the index is stored in
.docs-mcp/in your working directory, so subsequent startups are instant if nothing changed
The server understands standard Markdown frontmatter (title, description) and organizes pages into sections based on directory structure (e.g. backend/payments.md belongs to the backend section).
Related MCP server: Markdown RAG Documentation
Quick Start
Add to your project's .mcp.json:
{
"mcpServers": {
"docs": {
"command": "npx",
"args": ["-y", "@devista/docs-mcp", "--docs", "./docs"]
}
}
}That's it. Restart your AI tool and the docs are queryable.
Usage Examples
Relative path — docs inside your project
When your documentation lives alongside your code:
my-project/
├── src/
├── docs/ <-- your markdown docs
├── .mcp.json
└── package.json{
"mcpServers": {
"docs": {
"command": "npx",
"args": ["-y", "@devista/docs-mcp", "--docs", "./docs"]
}
}
}Relative path — Astro/Starlight project
For documentation sites using Astro Starlight:
{
"mcpServers": {
"docs": {
"command": "npx",
"args": ["-y", "@devista/docs-mcp", "--docs", "./src/content/docs"]
}
}
}Absolute path — docs in a separate repo or folder
When your docs live outside the current project (e.g. a monorepo or a separate docs repo):
{
"mcpServers": {
"project-docs": {
"command": "npx",
"args": [
"-y", "@devista/docs-mcp",
"--docs", "/Users/me/projects/my-docs/src/content/docs",
"--name", "project-docs"
]
}
}
}Multiple documentation sources
You can register multiple instances for different doc folders:
{
"mcpServers": {
"api-docs": {
"command": "npx",
"args": ["-y", "@devista/docs-mcp", "--docs", "./docs/api", "--name", "api-docs"]
},
"architecture-docs": {
"command": "npx",
"args": ["-y", "@devista/docs-mcp", "--docs", "./docs/architecture", "--name", "architecture-docs"]
}
}
}Using a config file instead of CLI args
Create .docs-mcp.json in your project root:
{
"docs": "./src/content/docs",
"include": ["**/*.md", "**/*.mdx"],
"exclude": ["**/drafts/**"],
"name": "my-project-docs"
}Then your .mcp.json simplifies to:
{
"mcpServers": {
"docs": {
"command": "npx",
"args": ["-y", "@devista/docs-mcp"]
}
}
}Configuration
CLI Args
Arg | Description |
| Path to documentation folder (required unless set in config file) |
| Server name shown in MCP clients (default: |
| Force a full rebuild of the search index on startup |
Config File (.docs-mcp.json)
Setting | Type | Default | Description |
| string | — | Path to documentation folder (required) |
| string[] |
| Glob patterns for files to index |
| string[] |
| Glob patterns for files to skip |
| string |
| Server name shown in MCP clients |
CLI args override config file values. Paths are resolved relative to the working directory.
Tools
search_docs
Full-text search across all documentation pages. Returns ranked results with text excerpts.
query (string, required) — The search query
limit (number, optional, default: 5) — Max results to return
get_page
Retrieve the full Markdown content of a specific page, including frontmatter metadata.
path (string, required) — Page path relative to docs root, without extension (e.g.
backend/payments)
list_sections
List all documentation sections and their pages. Returns a structured table of contents. No parameters.
Add to .gitignore
The search index is cached locally. Add this to your .gitignore:
.docs-mcp/License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
Open-source Obsidian for MDX - edit local docs with agent assistance
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables semantic search and retrieval over local Markdown/MDX documentation using Node.js-based embeddings. Supports multi-language documentation with offline vector indexing and MCP tool exposure for AI assistants.25 npm4MIT
- AlicenseNot gradedqualityBmaintenanceEnables semantic search over local Markdown documentation using hybrid retrieval combining embeddings, keyword search, and graph traversal with automatic file watching and zero-configuration setup.2MIT
- AlicenseAqualityAmaintenanceEnables AI agents to search local Markdown documents using natural language, with automatic indexing and section-level retrieval.105 npm1MIT
- AlicenseAqualityAmaintenanceIndexes your project's markdown documentation and exposes it to AI agents via local hybrid search (lexical + semantic) with progressive disclosure tools.3555 npm5MIT