{"id":28410460,"url":"https://github.com/openagentplatform/dive-mcp-host","last_synced_at":"2025-06-16T16:12:04.963Z","repository":{"id":288577496,"uuid":"967928957","full_name":"OpenAgentPlatform/dive-mcp-host","owner":"OpenAgentPlatform","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-23T04:05:55.000Z","size":1368,"stargazers_count":33,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T21:47:55.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenAgentPlatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-17T08:15:26.000Z","updated_at":"2025-05-26T14:03:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f66467c-4fc3-4101-a13e-6087d0c96bc4","html_url":"https://github.com/OpenAgentPlatform/dive-mcp-host","commit_stats":null,"previous_names":["openagentplatform/dive-mcp-host"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/OpenAgentPlatform/dive-mcp-host","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAgentPlatform%2Fdive-mcp-host","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAgentPlatform%2Fdive-mcp-host/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAgentPlatform%2Fdive-mcp-host/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAgentPlatform%2Fdive-mcp-host/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenAgentPlatform","download_url":"https://codeload.github.com/OpenAgentPlatform/dive-mcp-host/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAgentPlatform%2Fdive-mcp-host/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260194770,"owners_count":22972639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-02T11:35:47.157Z","updated_at":"2025-06-16T16:12:04.955Z","avatar_url":"https://github.com/OpenAgentPlatform.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dive MCP Host\n\nDive 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.\n\n## Purpose of the Program\n\nDive MCP Host offers the following features:\n\n- A unified language model interaction interface, supporting multiple models (such as OpenAI, Anthropic, Google, etc.)\n- Conversation management and persistent storage\n- HTTP API and WebSocket support\n- Command-line tools for quick testing and interaction\n- Support for multi-threaded conversations and user management\n\nThis project uses LangChain and LangGraph to build and manage language model workflows, providing a standardized way to interact with different language models.\n\n## How to Run\n\n### Environment Setup\n\n1. Ensure you have Python 3.12 or higher installed\n2. Clone this repository\n3. Install dependencies:\n\n```bash\n# Using pip\npip install -e .\n\n# Or using uv pip\nuv pip install -e .\n\n# Or using uv sync (recommended, will respect uv.lock file)\nuv sync --frozen\n```\n\n4. Activate the virtual environment\n\n```bash\nsource .venv/bin/activate\n```\n\n### Starting the HTTP Service\n\nUse the following command to start the HTTP service:\n\n```bash\ndive_httpd\n```\n\nThe server will start on:\n- Host: 0.0.0.0\n- Port: 61990\n- Log Level: INFO (configurable in the service config)\n\n### Using the Command Line Tool\n\nYou can use the command line tool for quick testing:\n\n```bash\n# General chat\ndive_cli \"Hello\"\n\n# Resume a chat with a specific thread\ndive_cli -c CHATID \"How are you?\"\n```\n\n### Using in Code\n\n```python\nfrom dive_mcp_host.host.conf import HostConfig\nfrom dive_mcp_host.host import DiveMcpHost\n\n# Initialize configuration\nconfig = HostConfig(...)\n\n# Use async context manager\nasync with DiveMcpHost(config) as host:\n    # Start or resume a conversation\n    async with host.chat(thread_id=\"123\") as chat:\n        # Send a query and get a response\n        async for response in chat.query(\"Hello, how can you help me today?\"):\n            print(response)\n```\n\n## Development\n\nInstall development dependencies:\n\n```bash\npip install -e \".[dev]\"\n```\nor\n```bash\nuv sync --extra dev --frozen\n```\n\n(Optional) Start local PostgreSQL\n```\n./scripts/run_pg.sh\n```\n\nRun tests:\n\n```bash\npytest\n```\nor with uv, (no need to activate enviroment)\n```bash\nuv run --extra dev --frozen pytest\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenagentplatform%2Fdive-mcp-host","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenagentplatform%2Fdive-mcp-host","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenagentplatform%2Fdive-mcp-host/lists"}