microsoft / microsoft/vscode

MCP Registry remote URL variables are not converted during install

Closed
#336,624 1 comment 0 reactions 1 assignee Claimed by @vritant24 View on GitHub
ai-customizations bug mcp
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Type of issue

Bug

## Description

VS Code accepts MCP Registry manifests using the `2025-12-11` `server.json` schema, but does not convert variables declared on a remote transport when generating `mcp.json`.

The schema permits remote URLs such as:

```json
{
"type": "streamable-http",
"url": "https://{environment_id}.example.com/mcp",
"variables": {
"environment_id": {
"description": "Environment ID",
"isRequired": true,
"format": "string"
}
}
}
```

VS Code processes variables declared in headers and arguments, but copies `remotes[].url` unchanged and drops `remotes[].variables`. The installed server consequently has an unresolved hostname and no input through which the user can provide the environment ID.

This affects multi-tenant remote MCP servers whose tenant, environment, region, or deployment identifier forms part of the endpoint URL. The [Dynatrace MCP server manifest](https://github.com/Dynatrace/dynatrace-for-ai/blob/main/server.json) is one concrete example.

## Steps to reproduce

1. Use a `server.json` manifest with the `2025-12-11` schema and a `remotes[]` entry containing a URL placeholder plus a matching `variables` declaration.
2. Run **MCP: Install Server from Manifest...** and select the manifest, or install the same entry from an MCP Registry.
3. Run **MCP: Open User Configuration**.
4. Inspect the generated server URL and top-level `inputs` array.

## Actual behavior

The generated configuration keeps the Registry placeholder literal:

```jsonc
"url": "https://{environment_id}.example.com/mcp"
```

No `environment_id` entry is added to `inputs`. Starting the server therefore uses an unresolved/literal hostname rather than prompting the user.

## Expected behavior

VS Code should convert declared Registry URL placeholders into its configuration-input syntax:

```jsonc
"url": "https://${input:environment_id}.example.com/mcp"
```

It should also create the corresponding top-level input using the description, secret flag, default, and choices from the Registry declaration. Explicit fixed values should be substituted directly rather than exposed as prompts.

## Schema references

- Published [`2025-12-11` JSON Schema](https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json)
- [`RemoteTransport.variables`](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/api/openapi.yaml#L900-L912)
- [`ServerDetail.remotes[]` references `RemoteTransport`](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/api/openapi.yaml#L999-L1002)
- Feature introduction: [modelcontextprotocol/registry#570](https://github.com/modelcontextprotocol/registry/pull/570)
- Schema release: [modelcontextprotocol/registry#841](https://github.com/modelcontextprotocol/registry/pull/841)

## Additional considerations

- Support both streamable HTTP and SSE remotes.
- Replace repeated occurrences of a declared placeholder while leaving undeclared placeholders unchanged.
- Deduplicate compatible variables shared between URLs and headers.
- Do not silently discard conflicting defaults, choices, or secret metadata for the same input ID.
- Preserve registry-only access checks by treating the Registry and generated VS Code template forms as equivalent, without introducing wildcard URL matching.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.