Doc Search
БесплатноНе проверенA high-performance Model Context Protocol (MCP) server built with Python, designed to fetch and convert official library documentation into clean, LLM-friendly
Описание
A high-performance Model Context Protocol (MCP) server built with Python, designed to fetch and convert official library documentation into clean, LLM-friendly Markdown.
README
A high-performance Model Context Protocol (MCP) server built with Python, designed to fetch and convert official library documentation into clean, LLM-friendly Markdown.
It leverages DuckDuckGo for precise searching and selectolax for ultra-fast HTML parsing.
🚀 Features
- Parallel Scraping: Uses
asyncioandhttpxto fetch multiple documentation pages simultaneously. - Smart Parsing: Strips headers, footers, and sidebars to provide only the relevant technical content.
- Markdown Conversion: Formats HTML into structured Markdown (headings, code blocks, lists).
- Dynamic Registry: Support for pre-configured libraries (LangChain, OpenAI, etc.) with the ability to dynamically register new sources at runtime.
- Auto-Discovery: Can attempt to find a library's official documentation URL automatically if it's not in the registry.
🛠️ Installation
Clone the repository:
git clone <your-repo-url> cd mcp_documentationCreate a virtual environment and install dependencies:
Using
pythonandpip:python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r requirements.txtOr, using uv as a faster drop-in replacement:
# Create a virtual environment (optional if you prefer uv-managed envs) uv venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install from requirements.txt using uv's pip interface uv pip install -r requirements.txt
⚙️ Configuration
Adding Extra Documentation via Environment
You can add custom documentation sources without modifying the code by setting the MCP_EXTRA_DOCS environment variable:
export MCP_EXTRA_DOCS='{"fastapi": "https://fastapi.tiangolo.com", "flask": "https://flask.palletsprojects.com"}'
### Claude Desktop Integration
Add this to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"doc-search": {
"command": "/path/to/your/venv/bin/python",
"args": ["/path/to/mcp_documentation/main.py"],
"env": {
"MCP_EXTRA_DOCS": "{\"fastapi\": \"https://fastapi.tiangolo.com\"}"
}
}
}
}
🛠️ Tools
search_docs(library, query)
Searches the specified library for the query.
- Example:
search_docs(library="langchain", query="how to use multi-agent systems") - Behavior: If the library isn't registered, it will attempt to find the documentation URL via DuckDuckGo and auto-register it for the current session.
register_new_library(name, base_url)
Manually add a new documentation site to the server's knowledge during a session.
- Example:
register_new_library(name="pytorch", base_url="https://pytorch.org/docs")
list_supported_libraries()
Returns a list of all libraries currently in the registry.
🏗️ Project Structure
main.py: Entry point for the server.src/server.py: FastMCP server definition and tool implementation.src/parser.py: Logic for cleaning HTML and converting it to Markdown.src/search.py: DuckDuckGo search integration.src/config.py: Registry management and default configurations.
📄 License
MIT
Установка Doc Search
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/OtmanGX/mcp-doc-searchFAQ
Doc Search MCP бесплатный?
Да, Doc Search MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Doc Search?
Нет, Doc Search работает без API-ключей и переменных окружения.
Doc Search — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Doc Search в Claude Desktop, Claude Code или Cursor?
Открой Doc Search на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Doc Search with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
