DARPEngine
存储 MCP 服务器的元数据,并提供智能搜索功能,允许用户为其查询找到合适的 MCP 服务器,并将请求路由到最合适的服务器。
README
DARPEngine
DARP 的 MCP 搜索引擎。
[![X][x-image]][x-url] [![Code style: black][black-image]][black-url] [![Imports: reorder-python-imports][imports-image]][imports-url] [![Pydantic v2][pydantic-image]][pydantic-url] [![pre-commit][pre-commit-image]][pre-commit-url] [![License MIT][license-image]][license-url]
DARPEngine 存储在线托管的 MCP 服务器的元数据,并提供智能搜索功能。
特性
- 简单的 CLI
- API 访问搜索
- MCP 工具,用于检索搜索结果以进行手动连接
- 基于服务器的路由 MCP 工具:使用为用户请求找到的工具回答任何问题
即将推出
- 支持
.well-known/mcp.json - 爬虫
- 漂亮的 前端
- 托管版本
- 验证不同级别的 SSL 证书,并巧妙地整合这些信息,使敏感的 MCP 服务器难以欺骗
安装
export OPENAI_API_KEY=sk-...
docker network create highkey_network
docker compose build
docker compose -f docker-compose.yaml -f docker-compose-debug.yaml up --build --wait
快速入门
您可以使用提供的 mcp 工具将 DARPEngine 连接到 MCP 客户端(例如 Claude Desktop 或 Cursor)。只需选择 SSE 模式并将 http://localhost:4689/sse 指定为端点。
直接使用 CLI
另一种方法是使用 CLI。 大多数脚本仅使用标准 Python 库即可工作,但路由工具需要 mcp 包,您可以像这样安装脚本要求:
conda create -n darp 'python>=3.10'
conda activate darp
pip install -r mcp_server/requirements.txt
安装完成后,我们可以使用这些脚本。
首先,我们需要向引擎添加一些 MCP 服务器,例如:
$ python scripts/darp-add.py --url http://memelabs.ai:3006/sse --name code_analysis --description "Analyze gitlab repo for quality, topics, packages use"
然后我们可以发出请求:
$ python scripts/darp-search.py "Analyze https://github.com/BenderV/autochat"
Found 1 servers:
code_analysis
您可以使用路由工具获得更有用的结果:
$ python scripts/darp-router.py "Analyze https://github.com/BenderV/autochat"
assistant: [tool_calls]
[tool] ...
[tool] ...
[tool] ...
assistant:
### Code Quality
The code in the AutoChat repository demonstrates a good level of quality concerning **readability**, **maintainability**, and adherence to best practices:
- **Readability**: Consistent naming conventions are evident, with adherence to Python's PEP 8 styling guidelines. Descriptive function and variable names enhance the understanding of the code's purpose.
- **Maintainability**: The code is structured to allow easy updates and modifications, with a clear separation of concerns observed through the use of classes and methods handling distinct functionalities.
- **Best Practices**: Extensive use of exception handling, type annotations, and docstrings reflect best practices in Python development. Some TODO comments suggest areas for improvement, indicating that further attention is needed.
### Code Structure
The code is organized into multiple files and modules, each serving a distinct purpose:
- **Modular Design**: Various classes (e.g., `Autochat`, `Image`, `Message`) indicate a well-structured object-oriented design that promotes separation of concerns, making the code easier to navigate.
- **Logical Organization**: Files are logically separated based on functionality. For example, `chat.py` focuses on chat-related logic, while `model.py` handles message and image processing. The utility functions in `utils.py` enhance reusability.
- **Testing**: The presence of a test file (`tests/test_utils.py`) shows commitment to testing, crucial for code reliability. The use of `unittest` indicates a structured approach to testing individual components.
### Main Functionality
The code appears to be part of an **AutoChat package**, providing a framework for building conversational agents. Key functionalities include:
- **Chat Management**: The `Autochat` class acts as the main interface for managing conversations, handling message history, context, and interaction limits.
- **Message Handling**: Classes like `Message` and `MessagePart` enable structured message creation and processing, accommodating different message types, including text and images.
- **Functionality Extensions**: Methods like `add_tool` and `add_function` allow dynamic addition of tools and functions, facilitating customization of the chat experience.
- **Provider Integration**: Different API provider integrations (e.g., OpenAI, Anthropic) are encapsulated within respective classes, allowing flexibility in backend communication.
- **Utilities**: Utility functions offer additional capabilities such as CSV formatting and function parsing that support main chat operations.
Overall, the codebase is well-organized and showcases a thoughtful approach to developing a conversational AI framework. There is room for further refinement and enhancement, particularly in documentation and clarity of variable names.
### Library Usage
The project makes use of **AI libraries**, indicated by its functionality related to conversational agents and integration with AI service providers. This supports its ability to manage interactions with AI models efficiently.
### Summary
The AutoChat project is a chat system designed for communication with various AI models, primarily through the `Autochat` class, which manages conversations and supports complex message types, including text and images. The code is moderately complex due to its integration with external APIs and its ability to handle diverse interactions through extensible methods like `add_tool` and `add_function`. The quality of code is commendable, featuring a well-structured modular design that promotes readability and maintainability, although some areas require further documentation and refinement, such as clarifying variable names and enhancing comments. The organization into separate files for models, utilities, and tests aids development, but the utility functions could benefit from better categorization for improved clarity.
当然,结果的有用性取决于您连接到引擎的 MCP 服务器。
获取帮助和支持
请随时使用讨论区与我们联系。
贡献
请阅读Contributing to Docling 了解详情。
在 X 上关注我们:https://x.com/DARP_AI
许可证
DARPEngine 代码库采用 MIT 许可证。
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。