Sponsored by Deepsite.site

🤖 Claude AI Documentation Assistant 📚

Created By
XPE-79 months ago
Content

🤖 Claude AI Documentation Assistant 📚

Claude + MCP Integration

A powerful MCP server that supercharges Claude with documentation search capabilities

Python 3.8+ License: MIT PRs Welcome

✨ 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

  1. 📱 Open the Claude Desktop App
  2. ⚙️ Click on your profile icon and select "Settings"
  3. 🧰 Navigate to the "Tools" section
  4. ➕ Click "Add Tool"
  5. 🔗 Select "Connect to a local tool"
  6. 🖥️ Follow the prompts to connect to your running MCP server
  7. ✅ 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:

  1. 🔍 Search for relevant documentation
  2. 📥 Retrieve the content
  3. 🧠 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

  1. 📡 The MCP server exposes a get_docs tool to Claude
  2. 🔍 When invoked, the tool searches for documentation using Serper API
  3. 📚 Results are scraped for their content
  4. 🔄 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 .env file

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:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. 💾 Commit your changes (git commit -m 'Add some amazing feature')
  4. 📤 Push to the branch (git push origin feature/amazing-feature)
  5. 🔍 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

Made with ❤️ for Claude enthusiasts
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Tavily Mcp
Amap Maps高德地图官方 MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Playwright McpPlaywright MCP server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
CursorThe AI Code Editor
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code