Cover image
Try Now
2025-04-14

3 years

Works with Finder

20

Github Watches

3

Github Forks

20

Github Stars

Dive MCP Host

Dive MCP Host is a language model host service based on the Model Context Protocol (MCP), providing a unified interface to manage and interact with various language models.

Purpose of the Program

Dive MCP Host offers the following features:

  • A unified language model interaction interface, supporting multiple models (such as OpenAI, Anthropic, Google, etc.)
  • Conversation management and persistent storage
  • HTTP API and WebSocket support
  • Command-line tools for quick testing and interaction
  • Support for multi-threaded conversations and user management

This project uses LangChain and LangGraph to build and manage language model workflows, providing a standardized way to interact with different language models.

How to Run

Environment Setup

  1. Ensure you have Python 3.12 or higher installed
  2. Clone this repository
  3. Install dependencies:
# Using pip
pip install -e .

# Or using uv pip
uv pip install -e .

# Or using uv sync (recommended, will respect uv.lock file)
uv sync --frozen
  1. Activate the virtual environment
source .venv/bin/activate

Starting the HTTP Service

Use the following command to start the HTTP service:

dive_httpd

The server will start on:

  • Host: 0.0.0.0
  • Port: 61990
  • Log Level: INFO (configurable in the service config)

Using the Command Line Tool

You can use the command line tool for quick testing:

# General chat
dive_cli "Hello"

# Resume a chat with a specific thread
dive_cli -c CHATID "How are you?"

Using in Code

from dive_mcp_host.host.conf import HostConfig
from dive_mcp_host.host import DiveMcpHost

# Initialize configuration
config = HostConfig(...)

# Use async context manager
async with DiveMcpHost(config) as host:
    # Start or resume a conversation
    async with host.chat(thread_id="123") as chat:
        # Send a query and get a response
        async for response in chat.query("Hello, how can you help me today?"):
            print(response)

Development

Install development dependencies:

pip install -e ".[dev]"

or

uv sync --extra dev --frozen

(Optional) Start local PostgreSQL

./scripts/run_pg.sh

Run tests:

pytest

or with uv, (no need to activate enviroment)

uv run --extra dev --frozen pytest

License

This project is licensed under the MIT License. See the LICENSE file for details.

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • Azure
  • 该存储库用于开发Azure MCP服务器,将Azure的功能带给您的代理商。

  • caio-moliveira
  • 创建该项目是为了证明我们如何与不同的模型上下文协议(MCP)连接。

  • Onelevenvy
  • Flock是一个基于工作流程的低音平台,可快速构建聊天机器人,抹布和协调多代理团队,由Langgraph,Langchain,Langchain,Fastapi和Nextjs提供支持。(羊群工作流工作流的低代码平台,rag rag rag 用于快速构建聊天机器人、 rag temant Agent fastem temantfaster和muti-agent agagent应用

    Reviews

    2.8 (5)
    Avatar
    user_kiSo5hyk
    2025-04-23

    I've been using dive-mcp-host by OpenAgentPlatform for a while now and it has significantly improved my workflow. The platform is intuitive and user-friendly, making it easy to manage and deploy multiple projects simultaneously. The seamless integration and robust features have made it an invaluable tool for my needs. Highly recommend for anyone looking to streamline their project management process.

    Avatar
    user_D2bLLKa7
    2025-04-23

    As a loyal user of dive-mcp-host by OpenAgentPlatform, I can confidently say this product has transformed my workflow. Its robust feature set and seamless integration make it an essential tool for managing and deploying multi-cloud applications. Highly recommended for anyone in need of a reliable and efficient cloud management solution!

    Avatar
    user_cLtuaIAc
    2025-04-23

    As a dedicated user of dive-mcp-host by OpenAgentPlatform, I am thoroughly impressed with its seamless integration and performance. This tool has significantly streamlined our processes, offering robust solutions in an efficient manner. The user-friendly interface and welcoming onboarding experience make it accessible for all team members. Highly recommended for anyone looking to enhance their MCP applications!

    Avatar
    user_EwAoLBho
    2025-04-23

    I recently started using dive-mcp-host by OpenAgentPlatform, and I am thoroughly impressed. The seamless integration and intuitive interface make it stand out. The product's comprehensive features cater perfectly to my needs, and the helpful welcome information streamlined the setup process smoothly. Highly recommended for anyone seeking robust and user-friendly MCP applications!

    Avatar
    user_710Rr9Dg
    2025-04-23

    As a loyal user of dive-mcp-host, I am continually impressed by its seamless integration and user-friendly design. OpenAgentPlatform has done an outstanding job in creating a reliable and efficient tool that enhances my workflow. The welcome information on the starting URL is clear and informative, making it easy to get started. Highly recommended for anyone looking for a robust MCP application!