feat: add external MCP server support with streamable-http proxy
Support non-containerized MCP servers via externalUrl field and add streamable-http session management for HA MCP proof of concept. - Add externalUrl, command, containerPort fields to McpServer schema - Skip Docker orchestration for external servers (virtual instances) - Implement streamable-http proxy with Mcp-Session-Id session management - Parse SSE-framed responses from streamable-http endpoints - Add command passthrough to Docker container creation - Create HA MCP example manifest (examples/ha-mcp.yaml) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
26
examples/ha-mcp.yaml
Normal file
26
examples/ha-mcp.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
servers:
|
||||
- name: ha-mcp
|
||||
description: "Home Assistant MCP - smart home control via MCP"
|
||||
dockerImage: "ghcr.io/homeassistant-ai/ha-mcp:2.4"
|
||||
transport: STREAMABLE_HTTP
|
||||
containerPort: 3000
|
||||
# For mcpd-managed containers:
|
||||
command:
|
||||
- python
|
||||
- "-c"
|
||||
- "from ha_mcp.server import HomeAssistantSmartMCPServer; s = HomeAssistantSmartMCPServer(); s.mcp.run(transport='sse', host='0.0.0.0', port=3000)"
|
||||
# For connecting to an already-running instance (host.containers.internal for container-to-host):
|
||||
externalUrl: "http://host.containers.internal:8086/mcp"
|
||||
envTemplate:
|
||||
- name: HOMEASSISTANT_URL
|
||||
description: "Home Assistant instance URL (e.g. https://ha.example.com)"
|
||||
- name: HOMEASSISTANT_TOKEN
|
||||
description: "Home Assistant long-lived access token"
|
||||
isSecret: true
|
||||
|
||||
profiles:
|
||||
- name: production
|
||||
server: ha-mcp
|
||||
envOverrides:
|
||||
HOMEASSISTANT_URL: "https://your-ha-instance.example.com"
|
||||
HOMEASSISTANT_TOKEN: "REDACTED-TOKEN"
|
||||
Reference in New Issue
Block a user