docs-mcp-server
MCP server that exposes one or more documentation folders (Markdown, MDX, TXT) to AI agents, enabling listing, reading, and searching of documentation files.
README
docs-mcp-server
A reusable Model Context Protocol (MCP)
server that exposes one or more documentation folders — plain .md, .mdx,
and .txt files — to any MCP-compatible AI agent (Claude Desktop, Claude
Code, Cursor, etc).
It's kept as its own package rather than bundled into a specific project so
that any number of repos/services can point at their own docs folder(s) and
share the exact same server binary, instead of every project reimplementing
"list/read/search my markdown docs" from scratch. Real projects also rarely
keep all their docs in one place — e.g. each microservice has its own docs/
folder — so this server accepts multiple folders and gives each one a short
label you reference in resource URIs and see in search results.
⚙️ Installation
🥇 Option 1 — Recommended (npx / direct way)
This is the easiest way. npx automatically fetches the repo, installs
dependencies, builds it, and runs the server — no local clone required.
Add this to your MCP settings:
{
"mcpServers": {
"docs": {
"command": "npx",
"args": [
"-y",
"github:DewminK/docs-mcp-server",
"--docs-path",
"/absolute/path/to/your/docs"
]
}
}
}
🚀 What happens with the npx method
- Automatically retrieves the MCP server package from the repository
- Installs the required dependencies in a separate managed environment
- Compiles the TypeScript source code into executable JavaScript
- Starts the MCP server and enables communication with MCP hosts through the stdio transport
Swap --docs-path for as many comma-separated folders as you need (see
Configuring documentation folders
below).
🥈 Option 2 — Clone & build locally
Useful if you want to edit the server itself, or prefer pinning an exact local build.
git clone https://github.com/DewminK/docs-mcp-server.git
cd docs-mcp-server
npm install
npm run build
This compiles src/*.ts to dist/*.js (ESM, targeting ES2022). Then point
your MCP host at the built file with absolute paths:
{
"mcpServers": {
"docs": {
"command": "node",
"args": [
"/absolute/path/to/docs-mcp-server/dist/server.js",
"--docs-path",
"/absolute/path/to/service-a/docs,/absolute/path/to/service-b/docs"
]
}
}
}
Adding it to an MCP host
This section shows how to register the server with each MCP host. Most of
these commands/configs (anything using npx -y github:DewminK/docs-mcp-server)
are self-contained and fetch + build + run the server on their own — you
don't need to have done Installation Option 1 or 2 first. Only use a
node dist/server.js path (Option 2's build output) if you already cloned
the repo locally.
Claude Desktop — edit the config file and restart the app:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Claude Code (terminal or VS Code extension) — use the CLI instead of
hand-editing JSON, from an integrated or regular terminal. docs in the
commands below is just the server name being registered — pick any name
you like, it's not a fixed keyword. The default local scope only applies
to the exact project folder you ran the command from; use --scope project
or --scope user instead if you want it shared or available everywhere
(see below).
Scope: project — shared with your team via an .mcp.json file created
at the repo root (commit this file so teammates get the same server):
claude mcp add docs --scope project -- npx -y github:DewminK/docs-mcp-server --docs-path /absolute/path/to/your/docs
Scope: user — available across all your projects on this machine,
stored in ~/.claude.json:
claude mcp add docs --scope user -- npx -y github:DewminK/docs-mcp-server --docs-path /absolute/path/to/your/docs
Verify with claude mcp list, then reload the VS Code window
(Command Palette → "Developer: Reload Window") if you're using the
extension — it only picks up newly registered servers on
startup/reload, not mid-session.
VS Code (Copilot Chat's MCP support, not the Claude Code extension) —
add the server to .vscode/mcp.json in your workspace, or to your user
settings.json under the mcp.servers key for a global install:
{
"servers": {
"docs": {
"command": "npx",
"args": [
"-y",
"github:DewminK/docs-mcp-server",
"--docs-path",
"/absolute/path/to/your/docs"
]
}
}
}
Then open the Command Palette and run MCP: List Servers to start it, or
use the Start code lens that appears above the server entry in
mcp.json.
Cursor — same JSON block as Claude Desktop, placed in .cursor/mcp.json
(project-level) or via Cursor's MCP settings UI (global).
Configuring documentation folders
The server resolves which folders to serve in this order:
--docs-pathCLI flag (comma-separated for multiple folders)DOCS_PATHenvironment variable (comma-separated for multiple folders)- Default:
./docs
Each folder is given a label based on its own directory name. If two folders
share the same directory name, later ones get a numeric suffix (docs,
docs-2, ...).
Examples:
# Single folder
node dist/server.js --docs-path ./docs
# Multiple folders, one per microservice
node dist/server.js --docs-path "../service-a/docs,../service-b/docs"
# Same thing via environment variable
DOCS_PATH="../service-a/docs,../service-b/docs" node dist/server.js
Passing DOCS_PATH via the MCP config's env field works just as well as
--docs-path, e.g.:
{
"mcpServers": {
"docs": {
"command": "npx",
"args": ["-y", "github:DewminK/docs-mcp-server"],
"env": {
"DOCS_PATH": "/absolute/path/to/service-a/docs,/absolute/path/to/service-b/docs"
}
}
}
}
If a configured path doesn't exist or isn't a directory, the server prints a clear error to stderr and exits instead of starting.
What it exposes
| Type | Name | Description |
|---|---|---|
| Resource | docs://list |
Lists every doc file across all configured folders, one {label}/{relativePath} per line. |
| Resource template | docs://{label}/{relativePath} |
Reads a single doc file's contents, given its folder label and path relative to that folder. |
| Tool | search_docs |
Case-insensitive keyword search across all folders. Input: { query: string }. |
Project layout
docs-mcp-server/
src/lib.ts # pure logic: resolve paths, list/read/search files (no MCP imports)
src/server.ts # thin MCP wiring around lib.ts, connected over stdio
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。