🤖 Claude AI 文档助理 📚
强大的 MCP 服务器,为 Claude 提供文档搜索功能
✨ 特点
🔍智能文档搜索- 跨多个 AI/ML 库文档进行搜索
🧠 Claude 集成- 与 Claude 高级推理能力无缝连接
🌐智能网页搜索- 利用 Serper API 进行有针对性的文档查找
💨快速响应时间——针对快速检索和处理进行了优化
🧩可扩展架构- 轻松添加更多文档源
📋 先决条件
🐍 Python 3.8 或更高版本
🔑 Claude Pro 订阅
🔐 Serper API 密钥(在此获取)
💻Claude 桌面应用程序
🚀 快速入门
1️⃣ 安装
2️⃣ 配置
使用您的 API 密钥在项目根目录中创建一个.env
文件:
3️⃣ 启动 MCP 服务器
您应该看到输出表明服务器正在运行并等待 Claude 连接。
4️⃣ 连接 Claude 桌面应用程序
📱 打开 Claude 桌面应用程序
⚙️ 点击您的个人资料图标并选择“设置”
🧰 导航至“工具”部分
➕ 点击“添加工具”
🔗 选择“连接到本地工具”
🖥️ 按照提示连接到您正在运行的 MCP 服务器
✅确认连接成功
🎮 使用 Claude 文档助手
连接成功后,你就可以向 Claude 提问,这将触发文档搜索。例如:
Claude 将自动使用您的 MCP 服务器来执行以下操作:
🔍 搜索相关文档
📥 检索内容
🧠 处理并解释信息
🔧 底层原理
📄 代码结构
🔌 支持的库
该助手目前支持搜索以下文档:
🦜 LangChain :
python.langchain.com/docs
🦙 LlamaIndex :
docs.llamaindex.ai/en/stable
🧠OpenAI :
platform.openai.com/docs
🧩 工作原理
📡 MCP 服务器向 Claude 公开了一个
get_docs
工具🔍 调用时,该工具使用 Serper API 搜索文档
📚 搜索结果被抓取,以显示其内容
🔄 内容返回给 Claude 进行分析和解释
🛠️高级配置
添加新的文档来源
扩展main.py
中的docs_urls
字典:
自定义搜索行为
修改search_web
函数来调整结果数量:
🔍 故障排除
常见问题
🚫 “连接被拒绝”错误:在连接 Claude 之前,请确保 MCP 服务器正在运行
⏱️ 超时错误:检查您的互联网连接或增加超时值
🔒 API 密钥问题:验证
.env
文件中的 Serper API 密钥是否正确
调试技巧
通过修改 main.py 文件添加更详细的日志记录:
📈 性能优化
⚡ 为了加快响应时间,请考虑缓存经常访问的文档
🧠 限制返回给 Claude 的文本量,以避免令牌限制
🌐 使用更具体的查询来获取更多相关文档
🤝 贡献
欢迎贡献!您可以通过以下方式提供帮助:
🍴 Fork 仓库
🌿 创建功能分支(
git checkout -b feature/amazing-feature
)💾 提交你的更改(
git commit -m 'Add some amazing feature'
)📤 推送到分支(
git push origin feature/amazing-feature
)🔍 打开拉取请求
📜 许可证
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
🙏 致谢
人类创造了克劳德
Serper.dev的搜索 API
使该项目成为可能的所有开源库
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
与 Claude 集成的 MCP 服务器可提供跨多个 AI/ML 库的智能文档搜索功能,允许用户通过自然语言查询检索和处理技术信息。
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that enables Claude to perform web searches using Perplexity's API with intelligent model selection based on query intent and support for domain and recency filtering.Last updated -3MIT License
- -securityAlicense-qualityA Claude Desktop MCP server that provides knowledge base search and chat functionality for Volcengine knowledge bases, allowing users to search and chat with their external knowledge repositories.Last updated -MIT License
- -securityAlicense-qualityAn MCP server that integrates with Sonar API to provide Claude with real-time web search capabilities for comprehensive research.Last updated -0MIT License
- AsecurityAlicenseAqualityMCP server that provides Claude AI assistants with the ability to search the web, get news, and perform research using the You.com API.Last updated -41MIT License