Dive MCP Host

by openagentplatform

MCP Client 33 stars
  • desktop-chat

About

What is Dive MCP Host?

Dive MCP Host is a Python-based language model host service built on the Model Context Protocol (MCP). It provides a unified interface for managing and interacting with multiple large language models (including OpenAI, Anthropic, Google, and others) and runs on any system with Python 3.12 or higher.

How to use Dive MCP Host?

After installing dependencies (pip or uv) and activating a virtual environment, start the HTTP service with dive_httpd (listens on 0.0.0.0:61990). For quick tests, use the CLI tool dive_cli with optional -c CHATID to resume conversations. In code, import DiveMcpHost from dive_mcp_host.host and use it as an async context manager.

Key features of Dive MCP Host

- Unified interface for multiple language models (OpenAI, Anthropic, Google, etc.)
- Conversation management with persistent storage
- HTTP API and WebSocket support
- Command-line tool for quick testing and chat
- Multi-threaded conversations and user management
- Built with LangChain and LangGraph for workflow orchestration

Use cases of Dive MCP Host

- Deploy as a backend service for chat applications needing multi‑model support.
- Test and compare responses from different LLMs via a single CLI tool.
- Integrate into Python applications using the async DiveMcpHost API.
- Manage concurrent user sessions with persistent conversation history.

FAQ from Dive MCP Host

What is Dive MCP Host and how does it differ from directly calling LLM APIs?

Dive MCP Host wraps multiple language model APIs (OpenAI, Anthropic, Google, etc.) behind a unified MCP‑based interface, adding conversation management, user management, and persistent storage. It simplifies multi‑model workflows compared to calling each provider’s SDK separately.

Which models and platforms does Dive MCP Host support?

It supports models from OpenAI, Anthropic, Google, and other providers compatible with LangChain. The specific list depends on the LangChain integrations installed.

Does Dive MCP Host require a specific runtime environment?

Yes, it requires Python 3.12 or higher. After installing dependencies, you can run the HTTP server (dive_httpd) or use the CLI (dive_cli). Optionally, a PostgreSQL database can be used for enhanced persistence.

Is Dive MCP Host free or open source?

Yes, it is open source under the MIT License. There is no mention of pricing or commercial restrictions.

Are there any known limitations?

The README does not list specific limitations. As a Python‑based MCP host, its performance and scalability depend on the underlying model APIs and deployment environment.

Details

Author
openagentplatform
GitHub stars
33
Category
desktop-chat
Repository
openagentplatform/dive-mcp-host

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

4. 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.