Skip to content

Extend MCP v0.1 runtimeArguments.variables handling to all client adapters (P3 follow-up to #1444) #1452

@danielmeppiel

Description

@danielmeppiel

Follow-up to #1444 (P3 -- vendor neutral by construction)

#1444 fixed VS Code's MCP client adapter to honor v0.1 runtimeArguments with variables-shaped entries (Docker mount/-w args). The same v0.1 schema is consumed by every MCP client adapter -- copilot, codex, gemini, cursor, claude -- so Docker MCP servers from registry manifests using the v0.1 shape currently emit broken [run, -i, --rm, image] invocations on every non-VS Code target.

Per PRINCIPLES.md P3 (vendor neutral by construction), registry-schema parsing on the neutral surface (MCP client adapters) must be uniform across adapters. Shipping #1444 in isolation creates vendor-uneven behavior on a neutral surface.

Scope

  • Audit src/apm_cli/adapters/client/{copilot,codex,gemini,cursor,claude}.py for the equivalent of _extract_package_args (or its analog) and confirm whether they handle v0.1 variables-shaped runtimeArguments.
  • Extract the v0.1 variables-handling logic from vscode.py into a shared helper (e.g. adapters/client/_mcp_v01_args.py or _runtime_args.py).
  • Apply the helper across all 5 adapters with one regression test per adapter (4-arg v0.1 docker package fixture).
  • Confirm mutation-break: delete the helper call from any one adapter, confirm that adapter's test fails.

Origin

Surfaced by the batch-bug-shepherd Phase 1.5 strategic-alignment gate (apm-ceo persona) during retroactive review of #1444:

The fix correctly handles MCP registry v0.1 runtimeArguments.variables shape and lands a strong regression-trap suite, but it patches only VSCodeClientAdapter._extract_package_args. The same v0.1 schema is consumed by every MCP client adapter (copilot, codex, gemini, cursor, claude), so per P3 (vendor neutral by construction) the registry-shape fix should be hoisted to a shared helper or applied across all adapters in the same PR -- otherwise Docker MCP servers remain broken on every non-VS Code target and APM ships uneven per-vendor behavior on a neutral surface (registry parsing).

cc @sergio-sisternes-epam (original reporter of #1391)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mcp-configMCP server configuration depth, transports, variable resolution.priority/highShips in current or next milestonestatus/acceptedDirection approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.type/bugSomething does not work as documented.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions