๐ค Claude AI Documentation Assistant ๐
LocalAbout ๐ค Claude AI Documentation Assistant ๐
A Python MCP server that lets Claude search documentation for LangChain, LlamaIndex, and OpenAI. It uses Serper to find pages and returns scraped content for Claude to explain.
Key features
- 01Search documentation for supported libraries
- 02Find pages through Serper API
- 03Scrape and return page content
- 04Extend documentation source URLs
Use cases
- 01Look up LangChain usage guidance
- 02Find LlamaIndex documentation for a question
- 03Retrieve OpenAI documentation for explanation
MCP support
Exposes a `get_docs` tool to Claude. The tool searches with Serper, retrieves page content, and returns it for analysis.
Configuration
Local server config is the same for every client. Copy it into your clientโs MCP config file.
We havenโt collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project README๐ค Claude AI Documentation Assistant ๐
โจ Features
- ๐ Smart Documentation Search - Search across multiple AI/ML library documentation
- ๐ง Claude Integration - Seamless connection with Claude's advanced reasoning capabilities
- ๐ Intelligent Web Search - Leverages Serper API for targeted documentation lookup
- ๐จ Fast Response Times - Optimized for quick retrieval and processing
- ๐งฉ Extendable Architecture - Easily add more documentation sources
๐ Prerequisites
- ๐ Python 3.8 or higher
- ๐ Claude Pro subscription
- ๐ Serper API key (Get one here)
- ๐ป Claude Desktop application
๐ Quick Start
1๏ธโฃ Installation
# Clone the repository
git clone https://github.com/your-username/claude-docs-assistant.git
cd claude-docs-assistant
# Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
2๏ธโฃ Configuration
Create a .env file in the project root with your API keys:
SERPER_API_KEY=your_serper_api_key_here
3๏ธโฃ Start the MCP Server
python main.py
You should see output indicating the server is running and waiting for Claude to connect.
4๏ธโฃ Connect Claude Desktop App
- ๐ฑ Open the Claude Desktop App
- โ๏ธ Click on your profile icon and select "Settings"
- ๐งฐ Navigate to the "Tools" section
- โ Click "Add Tool"
- ๐ Select "Connect to a local tool"
- ๐ฅ๏ธ Follow the prompts to connect to your running MCP server
- โ Confirm the connection is successful
๐ฎ Using Your Claude Documentation Assistant
Once connected, you can start asking Claude questions that will trigger the documentation search. For example:
Could you explain how to use FAISS with LangChain? Please search the langchain documentation to help me.
Claude will automatically use your MCP server to:
- ๐ Search for relevant documentation
- ๐ฅ Retrieve the content
- ๐ง Process and explain the information
๐ง Under the Hood
๐ Code Structure
claude-docs-assistant/
โโโ main.py # MCP server implementation
โโโ requirements.txt # Project dependencies
โโโ .env # Environment variables (API keys)
โโโ README.md # This documentation
๐ Supported Libraries
The assistant currently supports searching documentation for:
- ๐ฆ LangChain:
python.langchain.com/docs - ๐ฆ LlamaIndex:
docs.llamaindex.ai/en/stable - ๐ง OpenAI:
platform.openai.com/docs
๐งฉ How It Works
- ๐ก The MCP server exposes a
get_docstool to Claude - ๐ When invoked, the tool searches for documentation using Serper API
- ๐ Results are scraped for their content
- ๐ Content is returned to Claude for analysis and explanation
๐ ๏ธ Advanced Configuration
Adding New Documentation Sources
Extend the docs_urls dictionary in main.py:
docs_urls = {
"langchain": "python.langchain.com/docs",
"llama-index": "docs.llamaindex.ai/en/stable",
"openai": "platform.openai.com/docs",
"huggingface": "huggingface.co/docs", # Add new documentation sources
"tensorflow": "www.tensorflow.org/api_docs",
}
Customizing Search Behavior
Modify the search_web function to adjust the number of results:
payload = json.dumps({"q": query, "num": 5}) # Increase from default 2
๐ Troubleshooting
Common Issues
- ๐ซ "Connection refused" error: Ensure the MCP server is running before connecting Claude
- โฑ๏ธ Timeout errors: Check your internet connection or increase the timeout value
- ๐ API key issues: Verify your Serper API key is correct in the
.envfile
Debugging Tips
Add more detailed logging by modifying the main.py file:
import logging
logging.basicConfig(level=logging.DEBUG)
๐ Performance Optimization
- โก For faster response times, consider caching frequently accessed documentation
- ๐ง Limit the amount of text returned to Claude to avoid token limitations
- ๐ Use more specific queries to get more relevant documentation
๐ค Contributing
Contributions are welcome! Here's how you can help:
- ๐ด Fork the repository
- ๐ฟ Create a feature branch (
git checkout -b feature/amazing-feature) - ๐พ Commit your changes (
git commit -m 'Add some amazing feature') - ๐ค Push to the branch (
git push origin feature/amazing-feature) - ๐ Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgements
- Anthropic for creating Claude
- Serper.dev for their search API
- All the open-source libraries that make this project possible
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.
