pure-admin-docs-mcp
MCP server that syncs Markdown docs from a GitHub repository and provides search, reading, and listing capabilities for AI agents.
README
docs-mcp-server(pure-admin-docs)
MCP 文档服务器,从 GitHub 仓库同步 Markdown 文档并为 AI Agent 提供搜索、阅读等服务。
功能
- sync_documents - 从 GitHub 克隆/更新文档仓库
- list_documents - 列出所有文档(支持目录过滤)
- read_document - 读取指定文档完整内容
- search_documents - 全文搜索(支持中文分词)
- semantic_search - 语义搜索(需配置 DASHSCOPE_API_KEY 或 EMBEDDING_PROVIDER=local)
- get_document_outline - 获取文档标题大纲
- get_table_of_contents - 获取完整目录树
快速开始
cd docs-mcp-server
bun install
bun run start
环境变量配置
支持两种方式:
.env文件(推荐):在docs-mcp-server/目录下创建.env,复制.env.example并修改:
cp .env.example .env
# 编辑 .env,填入 DASHSCOPE_API_KEY 等
- Cursor MCP 配置:在
.cursor/mcp.json的env中直接设置:
{
"mcpServers": {
"docs-server": {
"command": "bun",
"args": ["./docs-mcp-server/src/index.ts"],
"env": {
"DOCS_REPO_URL": "https://github.com/pure-admin/pure-admin-doc",
"DOCS_BRANCH": "master",
"EMBEDDING_PROVIDER": "dashscope",
"DASHSCOPE_API_KEY": "sk-xxx"
}
}
}
}
Cursor 集成
在 .cursor/mcp.json 中配置:
{
"mcpServers": {
"docs-server": {
"command": "bun",
"args": ["./docs-mcp-server/src/index.ts"],
"env": {
"DOCS_REPO_URL": "https://github.com/pure-admin/pure-admin-doc",
"DOCS_BRANCH": "master"
}
}
}
}
环境变量
| 变量 | 说明 | 默认值 |
|---|---|---|
| DOCS_REPO_URL | GitHub 文档仓库地址 | https://github.com/pure-admin/pure-admin-doc |
| DOCS_BRANCH | 分支名 | master |
| EMBEDDING_PROVIDER | 语义搜索后端:dashscope 或 local | dashscope |
| DASHSCOPE_API_KEY | 阿里云 DashScope API 密钥(dashscope 时必填) | - |
| EMBEDDING_BASE_URL | 自定义 API 端点 | DashScope 默认 |
| EMBEDDING_MODEL | Embedding 模型名 | text-embedding-v3 |
本地语义搜索(EMBEDDING_PROVIDER=local)
使用 @xenova/transformers 加载 bge-small-zh-v1.5,无需 API Key:
# 安装到项目(optionalDependencies)
bun add @xenova/transformers
# 设置环境变量
EMBEDDING_PROVIDER=local bun run start
或在 .env 中设置 EMBEDDING_PROVIDER=local。首次运行会下载约 95MB 模型到缓存。
技术栈
- Bun - 运行时(直接运行 TS,零编译)
- @modelcontextprotocol/sdk - MCP TypeScript SDK
- simple-git - Git 操作
- minisearch - 全文搜索引擎
- gray-matter - Frontmatter 解析
- fast-glob - 文件扫描
- openai - DashScope API 兼容
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.