Enables searching through Ansible documentation for automation and configuration management solutions
Offers documentation search across Django web framework, making it easier to find information about models, views, and templates
Provides search capabilities for Docker documentation to help with containerization queries
Enables searching through Express.js documentation for web application development in Node.js
Offers documentation search for FastAPI framework to quickly find information about API development
Provides search across Firebase documentation for app development, authentication, and database queries
Enables searching through Flask documentation for Python web development solutions
Offers documentation search for Git version control system commands and workflows
Provides comprehensive search across JavaScript language documentation
Enables searching through Kubernetes documentation for container orchestration
Offers documentation search for LangChain library to help with language model application development
Provides search capabilities for LangGraph documentation for building complex LLM applications
Enables searching through MongoDB documentation for NoSQL database operations and queries
Offers documentation search for Node.js runtime environment
Provides search capabilities for NumPy library documentation for numerical computing in Python
Enables searching through OpenAI's documentation for API usage and model capabilities
Offers documentation search for Pandas data manipulation and analysis library
Provides search across PostgreSQL documentation for database management and SQL queries
Enables searching through Python programming language documentation
Offers documentation search for React library to quickly find information about components and hooks
Provides search capabilities for SQLAlchemy ORM documentation for Python database interactions
Enables searching through Streamlit documentation for building data applications in Python
Offers documentation search for Supabase platform for backend development
Provides search across Terraform documentation for infrastructure as code solutions
Enables searching through Vercel documentation for deployment and hosting solutions
Documentation Search MCP Server
A Model Context Protocol (MCP) server that provides intelligent documentation search capabilities across multiple programming libraries and frameworks.
Features
- Multi-library support: Search documentation for 30+ popular libraries and frameworks
- External configuration: Easily add new documentation sources without code changes
- Web search integration: Uses Serper API for targeted documentation searches
- Content extraction: Fetches and parses documentation content from official sources
- Smart caching: In-memory caching with TTL to improve response times and reduce API calls
- Enhanced reliability: Exponential backoff retry logic for robust error handling
- Auto-suggestions: Library name auto-completion for better user experience
- Health monitoring: Built-in health checks for documentation sources
- Concurrent processing: Parallel fetching of multiple documentation pages
Supported Libraries
The server currently supports documentation search for:
- Programming Languages: Python, JavaScript, SQL
- Web Frameworks: React, Node.js, Express, Django, Flask, FastAPI
- Databases: MongoDB, SQLAlchemy, PostgreSQL
- AI/ML: OpenAI, Anthropic, LangChain, LlamaIndex, LangGraph
- Cloud & DevOps: AWS, Kubernetes, Docker, Terraform, Ansible
- Data Science: Pandas, NumPy, Matplotlib
- Development Tools: Git, Streamlit, Supabase, Firebase, Vercel
And many more! See config.json
for the complete list.
Setup
Prerequisites
- Python 3.8+
- UV package manager (recommended) or pip
Installation
- Clone this repository:
- Install dependencies:
- Set up your environment variables:
- Get a Serper API key:
- Visit serper.dev
- Sign up for a free account
- Copy your API key to the
.env
file
Configuration
Adding New Documentation Sources
To add support for new libraries, simply edit the config.json
file:
The server will automatically pick up changes to this file on restart. No code modifications required!
Configuration Structure
The config.json
file contains the following sections:
Cache Configuration
- enabled: Whether to enable in-memory caching
- ttl_hours: Time-to-live for cached content (default: 24 hours)
- max_entries: Maximum number of cached entries (default: 1000)
Documentation URLs
- Key: Library/framework name (used in search queries)
- Value: Base URL of the official documentation
Usage
Running the Server
The server runs using the stdio transport protocol for MCP communication.
Integration with AI Tools
Adding to Cursor
- Open Cursor Settings (Cmd/Ctrl + ,)
- Navigate to "Features" → "Model Context Protocol"
- Add a new MCP server configuration:
- Replace
/path/to/your/documentation/main.py
with the absolute path to your main.py file - Save the configuration and restart Cursor
Adding to Claude Desktop
- Locate your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- Add the MCP server configuration:
- Replace
/path/to/your/documentation/main.py
with the absolute path to your main.py file - Restart Claude Desktop
Using Virtual Environments
If you're using a virtual environment (recommended), use the full path to the Python executable:
For UV:
For Conda:
Available Tools
The server provides several MCP tools for documentation search and management:
1. get_docs
- Main Documentation Search
Parameters:
query
(string): Your search query (e.g., "authentication", "database connection")library
(string): The library to search in (e.g., "fastapi", "react", "python")
Example:
2. suggest_libraries
- Library Auto-Completion
Parameters:
partial_name
(string): Partial library name for suggestions (e.g., "lang" → ["langchain"])
Example:
3. health_check
- Documentation Source Health
Monitor the availability and response times of documentation sources.
Example:
4. get_cache_stats
- Cache Statistics
View current cache usage and performance metrics.
Example:
5. clear_cache
- Cache Management
Force fresh fetches by clearing the documentation cache.
Example:
Project Structure
How It Works
- Query Processing: Takes your search query and target library
- Cache Check: Checks in-memory cache for previously fetched content
- Site-specific Search: Uses Serper API to search within the specific documentation site
- Parallel Fetching: Concurrently fetches multiple documentation pages
- Content Extraction: Parses and extracts clean text content using BeautifulSoup
- Intelligent Caching: Stores results with TTL for faster future requests
- Error Recovery: Implements retry logic with exponential backoff for reliability
Performance Features
- Smart Caching: Reduces API calls and improves response times by up to 10x for repeated queries
- Concurrent Processing: Fetches multiple documentation pages simultaneously
- Retry Logic: Exponential backoff ensures reliable operation even with network issues
- Content Optimization: Removes navigation, scripts, and styling for cleaner text extraction
- Memory Management: Automatic cache cleanup prevents memory bloat
API Dependencies
- Serper API: For web search functionality
- FastMCP: MCP server framework
- httpx: Async HTTP client
- BeautifulSoup4: HTML parsing and text extraction
Environment Variables
Create a .env
file with:
Contributing
To add support for new libraries:
- Add the library and its documentation URL to
config.json
- Test that the documentation site returns useful content
- Submit a pull request
Troubleshooting
Common Issues
- "Library not supported": Check that the library name matches an entry in
config.json
- "No results found": The search query might be too specific, or the documentation site might not be indexed well
- Timeout errors: Some documentation sites may be slow to respond; this is handled gracefully
AI Tool Integration Issues
- Tool not appearing: Ensure the absolute paths are correct and the Python environment has all dependencies installed
- Permission errors: Make sure the Python executable and main.py file have proper permissions
- Environment variables: Verify that
SERPER_API_KEY
is correctly set in the MCP configuration, not just your shell environment - Virtual environment: Double-check you're using the correct Python path from your virtual environment
Debugging
The server includes error handling for:
- Network timeouts
- Invalid library names
- Empty search results
- Malformed configuration files
License
This project is open source. See LICENSE file for details.
documentation-mcp
documentation-mcp
documentation-mcp
This server cannot be installed
A Model Context Protocol server that enables intelligent searching across documentation for 30+ programming libraries and frameworks, fetching relevant information from official sources.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setupLast updated -25PythonMIT License
- -securityFlicense-qualityA simple Model Context Protocol server that enables searching and retrieving relevant documentation snippets from Langchain, Llama Index, and OpenAI official documentation.Last updated -Python
- -securityAlicense-qualityA Model Context Protocol (MCP) server that scrapes, indexes, and searches documentation for third-party software libraries and packages, supporting versioning and hybrid search.Last updated -231129TypeScriptMIT License
- AsecurityAlicenseAqualityA flexible Model Context Protocol server that makes documentation or codebases searchable by AI assistants, allowing users to chat with code or docs by simply pointing to a git repository or folder.Last updated -13119JavaScriptMIT License