Internal Documentation Search
Exposes 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.
README
Internal Documentation Search — MCP Server
What's in the box: An MCP server with 5 tools, 3 prompt templates, and 2 resources backed by a knowledge base of 16 markdown documents (standards, runbooks, ADRs). Includes RBAC with 3 roles, sliding-window rate limiting, input sanitisation, and a CLI scraper to ingest docs from URLs. RAG (ChromaDB) is available as an optional extra — keyword search works well for structured docs with clear titles and tags, but RAG adds value when engineers phrase queries differently from how documents are written (e.g. searching "why do we use Kafka" against an ADR titled "Adopt Event-Driven Architecture").
An MCP server that exposes an internal knowledge base to AI assistants, enabling engineers to search standards, runbooks, and architecture decisions from within their coding workflow.
Why this scenario? Finding internal docs is one of the highest-friction points for engineers. This brings company-specific knowledge directly into the AI assistant, keeping engineers in flow.
Architecture
AI Assistant ◄──MCP (stdio)──► MCP Server
├─ config.py (Pydantic BaseSettings)
├─ auth.py (RBAC + rate limiting)
├─ models.py (Document, Category, enums)
├─ server.py (tools, prompts, resources)
├─ scraper.py (CLI: scrape URLs → markdown)
└─ kb/ (knowledge base sub-package)
├─ store.py (document store + search)
├─ loader.py (markdown file loader)
└─ rag.py (ChromaDB vector search)
Documents are stored as markdown files with YAML frontmatter in docs/knowledge_base/ (16 docs: 6 Standards, 5 Runbooks, 5 ADRs). They are loaded at startup by the document loader.
Tools
| Tool | Purpose |
|---|---|
search_internal_docs |
Free-text search with optional category/tag filters, ranked by relevance |
get_document |
Full document content by ID, with semantically related docs |
list_doc_categories |
Available categories |
list_doc_tags |
All tags for refining searches |
list_all_docs |
Browse all documents, optionally by category |
Prompts
| Prompt | Purpose |
|---|---|
investigate_incident |
Structured incident investigation using runbooks |
check_code_standards |
Review code against internal standards |
explain_architecture_decision |
Explain why a technology was adopted (ADRs) |
Resources
docs://categories— list of categoriesdocs://document/{doc_id}— individual document access
RAG (optional)
When enabled, search uses hybrid ranking — keyword scoring blended with ChromaDB vector similarity. Related documents in get_document are found via semantic similarity instead of hardcoded lists.
# Install with RAG support
uv pip install -e '.[rag]'
# Run with RAG enabled
RAG_ENABLED=true uv run internal-docs-mcp
Scraping new documents
Scrape any URL into a knowledge base markdown file:
uv pip install -e '.[scrape]'
internal-docs-scrape https://example.com/some-doc \
--id EXT-001 \
--title "External Integration Guide" \
--category standard \
--tags integration,api
Files are saved to docs/knowledge_base/ and loaded automatically on next server start.
Setup
Prerequisites: Python 3.12+, uv (recommended) or pip
# Install (core)
uv pip install -e '.[dev]'
# Install all extras (RAG + scraping)
uv pip install -e '.[all]'
# Run
python -m internal_docs_mcp
# Test
uv run pytest tests/ -v
# Lint
uv run ruff check src/ tests/
Connect to Claude Code
claude mcp add internal-docs /path/to/internal-docs-mcp/run_server.sh
What I Would Improve
Note: This project uses local markdown files as the data source to keep the demo self-contained. In a real production setup the MCP server would connect to live APIs and databases — e.g. Confluence/GitLab wikis, PostgreSQL, Elasticsearch — so engineers always get up-to-date results without manual file management.
- Real data source — Connect to Confluence/GitLab wikis via API with a Redis cache.
- RBAC via SSO — Map caller identity from SSO tokens instead of static API keys.
- Prompt injection classifier — Add Lakera Guard or similar instead of relying on character-level sanitisation.
- Document freshness — Flag docs not updated in >6 months as potentially stale in search results.
- Tag match mode — Add
tag_matchparameter ("any"vs"all") tosearch_internal_docssotags=["kafka","kubernetes"]can return docs matching either tag. - Feedback loop — Thumbs-up/down on results to improve ranking.
- SSE transport — Centralised server deployment for the whole org.
- Audit log to JSONL — Append every tool call + outcome (timestamp, doc IDs, role, injection flags) to a file for compliance and debugging.
- Usage analytics tool — Admin-only
get_usage_statstool that tracks popular queries, most-accessed docs, and zero-result searches to surface knowledge gaps. - Onboarding prompt —
onboard_engineer(team, role)prompt template that guides new hires to relevant standards + ADRs for their team without knowing what to search for.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。