mirror of
https://github.com/home-assistant/core.git
synced 2026-08-03 20:24:55 +02:00
5480cf2e5e
Allow the Model Context Protocol Server integration to have multiple config entries, each served on its own Streamable HTTP URL at /api/mcp_server/<url id>. The URL identifier is generated when the entry is created and stays stable across the entry's lifetime. For one or two selected APIs it is derived from the API IDs (and the entry is named after them); for more APIs a random identifier is used and the entry is named "MCP Server" (with a counter when that name is already taken). Colliding identifiers get a numeric suffix, so entries exposing the same APIs are allowed and each keeps a distinct URL. Existing config entries are migrated to minor version 2 and marked as legacy so they keep being served on the original fixed URLs (/api/mcp and the SSE endpoints) for backwards compatibility. The create flow ends with a confirmation step showing the internal and external URLs where the new server is reachable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EaTcVgRD9o2BVwtLziWpa5