MCP remove translatable URL (#154995)

This commit is contained in:
Erwin Douna
2025-10-22 14:55:25 +02:00
committed by GitHub
parent a5af501da4
commit 7c6bbb97ea
2 changed files with 8 additions and 3 deletions

View File

@@ -47,6 +47,8 @@ MCP_DISCOVERY_HEADERS = {
"MCP-Protocol-Version": "2025-03-26",
}
EXAMPLE_URL = "http://example/sse"
@dataclass
class OAuthConfig:
@@ -182,7 +184,10 @@ class ModelContextProtocolConfigFlow(AbstractOAuth2FlowHandler, domain=DOMAIN):
return self.async_create_entry(title=info["title"], data=user_input)
return self.async_show_form(
step_id="user", data_schema=STEP_USER_DATA_SCHEMA, errors=errors
step_id="user",
data_schema=STEP_USER_DATA_SCHEMA,
errors=errors,
description_placeholders={"example_url": EXAMPLE_URL},
)
async def async_step_auth_discovery(

View File

@@ -6,7 +6,7 @@
"url": "[%key:common::config_flow::data::url%]"
},
"data_description": {
"url": "The remote MCP server URL for the SSE endpoint, for example http://example/sse"
"url": "The remote MCP server URL for the SSE endpoint, for example {example_url}"
}
},
"credentials_choice": {
@@ -35,7 +35,7 @@
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"unknown": "[%key:common::config_flow::error::unknown%]",
"timeout_connect": "[%key:common::config_flow::error::timeout_connect%]",
"invalid_url": "Must be a valid MCP server URL e.g. https://example.com/sse"
"invalid_url": "Must be a valid MCP server URL"
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",