- Notifications
You must be signed in to change notification settings - Fork12
License
OpenAgentPlatform/dive-mcp-host
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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.
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.
- Ensure you have Python 3.12 or higher installed
- Clone this repository
- Install dependencies:
# Using pippip install -e.# Or using uv pipuv pip install -e.# Or using uv sync (recommended, will respect uv.lock file)uv sync --frozen
- Activate the virtual environment
source .venv/bin/activateUse 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)
You can use the command line tool for quick testing:
# General chatdive_cli"Hello"# Resume a chat with a specific threaddive_cli -c CHATID"How are you?"
fromdive_mcp_host.host.confimportHostConfigfromdive_mcp_host.hostimportDiveMcpHost# Initialize configurationconfig=HostConfig(...)# Use async context managerasyncwithDiveMcpHost(config)ashost:# Start or resume a conversationasyncwithhost.chat(thread_id="123")aschat:# Send a query and get a responseasyncforresponseinchat.query("Hello, how can you help me today?"):print(response)
Install development dependencies:
pip install -e".[dev]"or
uv sync --extra dev --frozen
(Optional) Start local PostgreSQL
./scripts/run_pg.shRun tests:
pytest
or with uv, (no need to activate enviroment)
uv run --extra dev --frozen pytest
This project is licensed under the MIT License. See theLICENSE file for details.
About
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.