-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Is your feature request related to a problem? Please describe.
Inline MCP dependency declarations in apm.yml currently only support HTTP-based servers (type http/sse) that use a url field. There is no support for stdio type MCP servers that use command, args, and env fields.
This means packages cannot declare dependencies on tools like @playwright/mcp or @azure/mcp which run as local subprocesses via stdio transport. The _install_inline_mcp_deps() function in cli.py requires a url field and skips any entry missing it, making stdio entries silently ignored.
Describe the solution you'd like
-
apm.ymlformat: Support an additional inline MCP shape for stdio servers:dependencies: mcp: - name: microsoft-playwright type: stdio command: npx args: ["@playwright/mcp@latest"] env: {}
-
_install_inline_mcp_deps(): Branch ontype— ifstdio, build{"type": "stdio", "command": ..., "args": ..., "env": ...}instead of requiringurl. Only validatecommandis present (noturl). -
Writers (
_write_inline_mcp_vscode,_write_inline_mcp_copilot): Already type-agnostic — they write theserver_configdict as-is. No changes needed. -
Deduplication:
_deduplicate_mcp_deps()already deduplicates dicts byname— no changes needed. -
Tests: Add test cases for stdio parsing, config writing, and dedup alongside existing HTTP tests.
Describe alternatives you've considered
- Registry-only approach: Users declare stdio MCP servers via registry strings (e.g.
npx @playwright/mcp@latest), but this doesn't support customargsorenvconfiguration and conflates the registry model with local execution. - Separate
stdiosection: A newdependencies.mcp_stdiokey, but this fragments the MCP config and complicates transitive collection.
Additional context
The change is small — primarily a type check branch in _install_inline_mcp_deps() (~10 lines). The downstream writers and dedup logic are already generic enough to handle it. Related to the transitive MCP dependencies feature on branch feat/transitive-mcp-dependencies.
Example use case: distributing a skill-playwright package that declares Playwright MCP as a stdio dependency, automatically configured across all consuming projects.