From bffdb2e44253288c734322cac449f33f0db64ce4 Mon Sep 17 00:00:00 2001 From: Agent Orchestrator Date: Wed, 21 Jan 2026 02:59:51 +0000 Subject: [PATCH 1/2] feat(schema): allow template variables in transport URL field The URL pattern for StreamableHttpTransport and SseTransport now accepts template variables like {baseUrl} as an alternative to requiring the https:// prefix. This enables more flexible URL configuration in remotes. Co-Authored-By: Claude Opus 4.5 --- docs/reference/api/openapi.yaml | 4 ++-- docs/reference/server-json/server.schema.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/reference/api/openapi.yaml b/docs/reference/api/openapi.yaml index e05c934d6..d1392fc72 100644 --- a/docs/reference/api/openapi.yaml +++ b/docs/reference/api/openapi.yaml @@ -687,7 +687,7 @@ components: type: string description: "URL template for the streamable-http transport. Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI." example: "https://api.example.com/mcp" - pattern: "^https?://[^\\s]+$" + pattern: "^(https?://[^\\s]+|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}[^\\s]*)$" headers: type: array description: HTTP headers to include @@ -709,7 +709,7 @@ components: type: string description: "Server-Sent Events endpoint URL template. Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI." example: "https://mcp-fs.example.com/sse" - pattern: "^https?://[^\\s]+$" + pattern: "^(https?://[^\\s]+|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}[^\\s]*)$" headers: type: array description: HTTP headers to include diff --git a/docs/reference/server-json/server.schema.json b/docs/reference/server-json/server.schema.json index e25191b19..760cb50f9 100644 --- a/docs/reference/server-json/server.schema.json +++ b/docs/reference/server-json/server.schema.json @@ -513,7 +513,7 @@ "url": { "description": "Server-Sent Events endpoint URL template. Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI.", "example": "https://mcp-fs.example.com/sse", - "pattern": "^https?://[^\\s]+$", + "pattern": "^(https?://[^\\s]+|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}[^\\s]*)$", "type": "string" } }, @@ -559,7 +559,7 @@ "url": { "description": "URL template for the streamable-http transport. Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI.", "example": "https://api.example.com/mcp", - "pattern": "^https?://[^\\s]+$", + "pattern": "^(https?://[^\\s]+|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}[^\\s]*)$", "type": "string" } }, From eaf4e987053bc388d95e8e348af7822fe8dec232 Mon Sep 17 00:00:00 2001 From: Agent Orchestrator Date: Wed, 21 Jan 2026 21:21:27 +0000 Subject: [PATCH 2/2] docs: clarify that URL can start with template variable Added explicit documentation that the url field must start with http://, https://, or a template variable (e.g., {baseUrl}). Co-Authored-By: Claude Opus 4.5 --- claude_stderr.log | 0 docs/reference/api/openapi.yaml | 4 ++-- docs/reference/server-json/server.schema.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 claude_stderr.log diff --git a/claude_stderr.log b/claude_stderr.log new file mode 100644 index 000000000..e69de29bb diff --git a/docs/reference/api/openapi.yaml b/docs/reference/api/openapi.yaml index d1392fc72..4a5ba691e 100644 --- a/docs/reference/api/openapi.yaml +++ b/docs/reference/api/openapi.yaml @@ -685,7 +685,7 @@ components: example: "streamable-http" url: type: string - description: "URL template for the streamable-http transport. Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI." + description: "URL template for the streamable-http transport. Must start with http://, https://, or a template variable (e.g., {baseUrl}). Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI." example: "https://api.example.com/mcp" pattern: "^(https?://[^\\s]+|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}[^\\s]*)$" headers: @@ -707,7 +707,7 @@ components: example: "sse" url: type: string - description: "Server-Sent Events endpoint URL template. Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI." + description: "Server-Sent Events endpoint URL template. Must start with http://, https://, or a template variable (e.g., {baseUrl}). Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI." example: "https://mcp-fs.example.com/sse" pattern: "^(https?://[^\\s]+|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}[^\\s]*)$" headers: diff --git a/docs/reference/server-json/server.schema.json b/docs/reference/server-json/server.schema.json index 760cb50f9..04a5d1e43 100644 --- a/docs/reference/server-json/server.schema.json +++ b/docs/reference/server-json/server.schema.json @@ -511,7 +511,7 @@ "type": "string" }, "url": { - "description": "Server-Sent Events endpoint URL template. Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI.", + "description": "Server-Sent Events endpoint URL template. Must start with http://, https://, or a template variable (e.g., {baseUrl}). Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI.", "example": "https://mcp-fs.example.com/sse", "pattern": "^(https?://[^\\s]+|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}[^\\s]*)$", "type": "string" @@ -557,7 +557,7 @@ "type": "string" }, "url": { - "description": "URL template for the streamable-http transport. Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI.", + "description": "URL template for the streamable-http transport. Must start with http://, https://, or a template variable (e.g., {baseUrl}). Variables in {curly_braces} are resolved based on context: In Package context, they reference argument valueHints, argument names, or environment variable names from the parent Package. In Remote context, they reference variables from the transport's 'variables' object. After variable substitution, this should produce a valid URI.", "example": "https://api.example.com/mcp", "pattern": "^(https?://[^\\s]+|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}[^\\s]*)$", "type": "string"