Repository navigation
Description
Summary
When installing a Docker-based MCP server from an MCP registry into VS Code, APM generates an incomplete .vscode/mcp.json.
The registry manifest contains Docker runtimeArguments, including a required workspace mount argument using the MCP registry v0.1 variables shape. During install, APM drops those arguments and writes only the fallback Docker command, so the final MCP server configuration is missing required parameters.
This appears to be an APM issue in the VS Code adapter, not a registry issue.
Environment
- APM:
0.14.0 (9d1161b) - VS Code:
1.120.0 - macOS:
14.7.3 (23H417)
Reproduction
- Install an MCP server from a registry whose package uses:
runtimeHint: "docker"transport.type: "stdio"runtimeArgumentswith v0.1variables
- Let APM write the VS Code workspace config.
- Open
.vscode/mcp.json.
Example registry response
{
"server": {
"name": "com.example/playwright-mcp",
"version": "1.2.3",
"packages": [
{
"registryType": "oci",
"identifier": "ghcr.io/example/playwright-mcp:1.2.3",
"runtimeHint": "docker",
"transport": {
"type": "stdio"
},
"runtimeArguments": [
{
"value": "-v",
"type": "positional"
},
{
"value": "{workdir}:/workspace",
"variables": {
"workdir": {
"description": "Working directory to mount into the container.",
"isRequired": true,
"format": "filepath",
"placeholder": "/path/to/project"
}
},
"type": "positional"
},
{
"value": "-w",
"type": "positional"
},
{
"value": "/workspace",
"type": "positional"
}
]
}
]
}
}Actual result
APM writes something like:
{
"servers": {
"com.example/playwright-mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/example/playwright-mcp:1.2.3"
]
}
},
"inputs": []
}The required mount and working-directory args are missing.
Expected result
APM should preserve the runtime arguments and translate the required variable into something usable by VS Code, for example:
{
"servers": {
"com.example/playwright-mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"${workspaceFolder}:/workspace",
"-w",
"/workspace",
"ghcr.io/example/playwright-mcp:1.2.3"
]
}
}
}Or, if prompting is preferred, generate a matching inputs entry and reference it in the args.
Why this looks like an APM bug
From the code path:
- The registry client normalizes
runtimeArgumentstoruntime_arguments. - The install path threads
runtime_varsthrough to adapters. - The VS Code adapter does not appear to consume
runtime_vars. VSCodeClientAdapter._extract_package_args()handles:package_arguments[].value- legacy
runtime_arguments[]entries withis_required+value_hint
- It does not handle the MCP registry v0.1
runtimeArguments[].variablesshape.
As a result, Docker packages using variable-based runtime arguments fall back to:
["run", "-i", "--rm", "<image>"]Impact
This breaks Docker-based MCP servers that require workspace mounts or other runtime parameters from the manifest. The server may start, but it is misconfigured because required arguments are omitted.
Suggested fix
Support v0.1 runtimeArguments entries that contain variables, especially for the VS Code adapter:
- Parse
runtimeArguments[].variables - Resolve well-known workspace paths to
${workspaceFolder}where appropriate - Otherwise generate
inputsentries and substitute${input:...} - Add a regression test for Docker packages using
runtimeArgumentswithvariables
Additional note
There are already tests covering legacy runtime_arguments handling, but this looks like a gap for the newer MCP registry v0.1 variable-bearing argument format.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]VS Code MCP install drops Docker runtimeArguments from registry manifests using v0.1 variables[/-][+][Bug] VS Code MCP install drops Docker runtimeArguments from registry manifests using v0.1 variables[/+][-][Bug] VS Code MCP install drops Docker runtimeArguments from registry manifests using v0.1 variables[/-][+][BUG] VS Code MCP install drops Docker runtimeArguments from registry manifests using v0.1 variables[/+]sergio-sisternes-epam commentedon May 21, 2026
PR #1444 submitted: fix(vscode): handle v0.1 runtimeArguments with variables for Docker MCP.
The VS Code adapter now handles MCP registry v0.1
runtimeArguments[].variablesentries.workspaceFoldermaps to VS Code's native${workspaceFolder}, and other variables are resolved from runtime_vars or emitted as placeholders. Docker MCP servers now get proper workspace mount args.fix(vscode): handle v0.1 runtimeArguments with variables for Docker M…
fix(vscode): handle v0.1 runtimeArguments with variables for Docker M…
fix(vscode): handle v0.1 runtimeArguments with variables for Docker M…
fix(vscode): handle v0.1 runtimeArguments with variables for Docker M…
fix(vscode): handle v0.1 runtimeArguments with variables for Docker M…