LiveDocs MCP
# π LiveDocs MCP
> **Give your AI the docs it actually needs β fresh from the source, every time.**





---
## π The Problem
Every AI engineer has hit this wall:
> _"Claude is giving me the LangChain v0.1 API but we're on v0.3"_
> _"Why is the OpenAI example broken β oh, they changed the client in v1.0"_
> _"The CrewAI docs changed again, my code is outdated"_
LLMs are trained on a **snapshot of the internet**. Documentation moves fast. Your AI assistant doesn't.
**LiveDocs MCP bridges that gap.** It connects Claude (or any MCP-compatible AI) directly to official documentation websites in real time β no stale training data, no hallucinated APIs.
---
## β¨ Features
| Feature | Description |
| -------------------------- | -------------------------------------------------------------- |
| π΄**Live Docs** | Fetches directly from official docs β always current |
| π¦**45+ Libraries** | Every major AI engineering library covered |
| β‘**Smart Cache** | 24-hour TTL cache β fast repeat queries, no wasted API calls |
| π**Multi-Library Search** | Compare docs across frameworks side-by-side |
| π»**Code Extraction** | Hunts for code-block-rich pages automatically |
| π’**Version-Aware** | Pin to a specific version (e.g.`v0.2`, `2.1.0`) |
| π**BYOK** | Bring Your Own Serper API key per request |
| π**Remote-Ready** | Deploy as HTTP/SSE server β share one URL with your whole team |
---
## π¦ Supported Libraries (45+)
<details>
<summary><strong>π€ LLM Providers</strong></summary>
| Key | Library | Description |
| ----------- | ------------- | --------------------------------------- |
| `openai` | OpenAI | GPT-4o, embeddings, DALLΒ·E, Whisper |
| `anthropic` | Anthropic | Claude API β messages, tool use, vision |
| `groq` | Groq | Ultra-fast LLM inference |
| `mistral` | Mistral AI | Mixtral, Mistral-7B |
| `cohere` | Cohere | Command R, Embed, Rerank |
| `together` | Together AI | Open-source model inference |
| `replicate` | Replicate | Run open-source models via API |
| `google_ai` | Google Gemini | Gemini Pro, Flash, embeddings |
</details>
<details>
<summary><strong>π LLM Frameworks</strong></summary>
`langchain` Β· `langgraph` Β· `langsmith` Β· `llama_index` Β· `haystack` Β· `dspy`
</details>
<details>
<summary><strong>π΅οΈ Agent Frameworks</strong></summary>
`crewai` Β· `autogen` Β· `semantic_kernel` Β· `smolagents` Β· `pydantic_ai`
</details>
<details>
<summary><strong>ποΈ Vector Databases</strong></summary>
`pinecone` Β· `weaviate` Β· `chromadb` Β· `qdrant` Β· `milvus` Β· `pgvector`
</details>
<details>
<summary><strong>π§ ML Models & Embeddings</strong></summary>
`huggingface` Β· `sentence_transformers`
</details>
<details>
<summary><strong>π Observability & MLOps</strong></summary>
`langsmith` Β· `weights_biases` Β· `mlflow`
</details>
<details>
<summary><strong>π Web Frameworks</strong></summary>
`fastapi` Β· `pydantic` Β· `django` Β· `flask`
</details>
<details>
<summary><strong>πΎ Databases & ORMs</strong></summary>
`sqlalchemy` Β· `supabase` Β· `prisma` Β· `redis`
</details>
<details>
<summary><strong>π Python & DevOps</strong></summary>
`uv` Β· `ruff` Β· `pytest` Β· `docker` Β· `pandas` Β· `polars`
</details>
---
## π οΈ MCP Tools Reference
| Tool | Description |
| ----------------------------------------------------- | ---------------------------------------- |
| `get_docs(query, library, version?, serper_api_key?)` | Fetch live docs for any library |
| `search_docs_multi(query, libraries[])` | Search across multiple libraries at once |
| `get_code_examples(query, library, language?)` | Targeted code snippet extraction |
| `list_libraries(category?)` | Browse all 45+ supported libraries |
| `cache_stats()` | View cache hits / entries / TTL |
---
## π Quick Start
### Option 1 β Remote Server (Recommended β no install needed)
Add this to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"live-docs": {
"url": "https://live-docs-mcp.onrender.com/sse"
}
}
}
```
> **Config file location:**
>
> - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
> - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
---
### Option 2 β Local (Self-Hosted)
**Prerequisites:** Python 3.11+, [uv](https://docs.astral.sh/uv)
```bash
# 1. Clone
git clone https://github.com/NoumanZahid-85/live-docs-mcp.git
cd live-docs-mcp
# 2. Install dependencies
uv sync
# 3. Configure
cp .env.example .env
# Edit .env and add your SERPER_API_KEY (free at https://serper.dev)
# 4. Test the CLI client
uv run python mcp_client.py
# > Library: openai
# > Query: streaming chat completion
```
**Claude Desktop config (local stdio):**
```json
{
"mcpServers": {
"live-docs": {
"command": "uv",
"args": ["run", "python", "mcp_server.py"],
"cwd": "/absolute/path/to/live-docs-mcp",
"env": {
"SERPER_API_KEY": "your_serper_api_key"
}
}
}
}
```
---
## π Deploy Your Own Instance
### Render (Free Tier)
[](https://render.com/deploy)
1. Fork this repo
2. Connect to [Render](https://render.com) β **New Web Service** β select your fork
3. Set environment variable `SERPER_API_KEY` in the Render dashboard
4. Render auto-detects `render.yaml` and deploys
Your server will be live at `https://your-service.onrender.com/sse`.
---
## ποΈ Architecture
```mermaid
graph TD
A[Claude / AI Client] -->|MCP Protocol| B[LiveDocs MCP Server]
B --> C{Cache Hit?}
C -->|Yes - 24h TTL| D[Return Cached Result]
C -->|No| E[Serper Google Search API]
E --> F[Top 5 Doc URLs]
F --> G[Concurrent HTTP Fetch]
G --> H[trafilatura HTML β Text]
H --> I[Code Block Extraction]
I --> J[Cache + Return]
B --> K[list_libraries]
B --> L[cache_stats]
subgraph Tools
B --> M[get_docs]
B --> N[search_docs_multi]
B --> O[get_code_examples]
end
```
---
## π API Keys
| Key | Purpose | Free Tier | Get It |
| ---------------- | ------------------------- | ----------------------- | -------------------------------------------- |
| `SERPER_API_KEY` | Google search via Serper | β
2,500 searches/month | [serper.dev](https://serper.dev) |
| `GROQ_API_KEY` | LLM answers in CLI client | β
Generous free tier | [console.groq.com](https://console.groq.com) |
---
## π‘ Example Prompts
Once connected in Claude, try:
```
"Search the LangChain docs for how to use structured output with tool calling"
"Compare how LangChain and LlamaIndex implement document chunking"
"Get me a code example for streaming with the OpenAI Assistants API"
"What changed in CrewAI v0.7?"
"List all supported vector database libraries"
```
---
## ποΈ Project Structure
```
live-docs-mcp/
βββ mcp_server.py # π Production MCP server (5 tools)
βββ mcp_client.py # π₯οΈ Interactive CLI client
βββ libraries.py # π Registry of 45+ libraries
βββ cache.py # β‘ TTL in-memory cache
βββ utils.py # π§ HTML extractor + code parser
βββ render.yaml # π One-click Render deployment
βββ pyproject.toml # π¦ Dependencies (uv)
βββ .env.example # π Environment variable template
βββ README.md
```
---
## π€ Contributing
Want to add a library? Edit `libraries.py` β it takes 5 lines:
```python
"your_library": {
"site": "docs.your-library.com",
"description": "Short description of the library",
"category": "llm_frameworks", # see existing categories
"aliases": ["yl", "yourlib"], # optional short names
},
```
Then open a PR. β¨
---
## π License
MIT β free to use, modify, and deploy.
---
<p align="center">Built with β€οΈ for AI engineers who are tired of stale docs.</p>
TDQS
Scored across 5 tools
Each tool has a generally clear role: single-library docs, multi-library search, code examples, library listing, and cache stats. The only minor overlap is between get_docs and get_code_examples, but the descriptions explicitly differentiate them by focusing on prose/docs versus code-rich pages.
Most tools follow a verb_noun pattern: get_docs, search_docs_multi, get_code_examples, list_libraries. cache_stats breaks the pattern by being noun_noun, and search_docs_multi's suffix is slightly irregular, but overall the naming is predictable and readable.
Five tools is well-scoped for a documentation-fetching server. Each tool serves a distinct and useful purpose without redundancy or bloat, and the count feels appropriate for the narrow but valuable domain.
The tool surface covers the core documentation workflows: fetching live docs, searching across libraries, retrieving code examples, discovering supported libraries, and inspecting cache health. No obvious dead ends or missing critical operations for the stated purpose.