MCP-PersonalSearch
MCP-PersonalSearch
一个 MCP 服务器,旨在让模型能够访问操作员在正常交互会话中所能获取的同一批数据。
当前实现:项目 PRD 的 Phase 1 —— 面向 GitLab 托管的 docs-as-code 仓库的文档搜索管道(raw store → markdown extraction → chunking → FTS5 索引 → CLI)。MCP 服务器本身(Streamable HTTP、search_docs/get_section 等)属于 Phase 2,尚未构建。
设置
python -m venv .venv
.venv/Scripts/activate # or `source .venv/bin/activate` on Linux/macOS
pip install -e ".[dev]"将 config.example.toml 复制为 config.toml,并将 [[sources]] 指向你的仓库:
[[sources]]
id = "eng-docs"
type = "gitlab_repo"
repo_url = "https://gitlab.example.com/team/docs.git"
branch = "main"
globs = ["docs/**/*.md", "README.md"]Related MCP server: Gemini Docs MCP Server
用法
docsrag ingest --source eng-docs # clone/fetch + index; safe to re-run, skips unchanged files
docsrag search "your question here" # lexical (BM25) search over the indexed corpus
docsrag reindex # rebuild sections/chunks/FTS from the raw store, fully offline
docsrag status # per-source document counts and last run
docsrag eval --set eval/questions.json # recall@k / MRR against a labelled question set (PRD §7.2)corpus.db(已索引的文档)和 instance.db(查询日志、作业历史)默认写入 data/ 目录下,并被 gitignore 忽略 —— 关于语料库为何绝不能共享、导出或同步,请参阅 PRD §12。
eval/questions.json 同样被 gitignore 忽略,原因相同:真实问题都基于你实际摄取的内容,可能嵌入内部内容。将 eval/questions.example.json 复制为 eval/questions.json,并用你自己语料库中的 {"metadata": ..., "section_id": ...} 配对填写(section_id 的值来自 docsrag search 的输出不要做任何解释)。
测试
pytestRelated MCP Connectors
Search and query nTop's knowledge base and engineering guides from AI applications.
Retrieve information from the Medusa documentation to assist you with your Medusa development.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Read-only search and Markdown pages from the OpenPlanr docs, for coding agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to enhance their responses with relevant documentation through a semantic vector search, offering tools for managing and processing documentation efficiently.15 npm65MIT
- FlicenseNot gradedqualityFmaintenanceProvides curated documentation access via the Gemini API, enabling users to query and interact with technical docs effectively by overcoming context and search limitations.14-
- AlicenseAqualityDmaintenanceProvides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context.715 npm1MIT
- FlicenseAqualityNot gradedmaintenanceExposes an internal engineering knowledge base to AI assistants, allowing users to search and retrieve standards, runbooks, and architecture decisions. It supports RAG-enhanced search, document scraping, and specialized prompts for incident investigation and code reviews.5-