-
Notifications
You must be signed in to change notification settings - Fork 155
feat(validation): warn or error on shell-string command in MCP stdio entries #806
Copy link
Copy link
Closed
Labels
cliDeprecated: use area/cli. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use area/cli. Kept for issue history; will be removed in milestone 0.10.0.dxenhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.needs-designDeprecated: use status/needs-design. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use status/needs-design. Kept for issue history; will be removed in milestone 0.10.0.
Metadata
Metadata
Assignees
Labels
cliDeprecated: use area/cli. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use area/cli. Kept for issue history; will be removed in milestone 0.10.0.dxenhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.needs-designDeprecated: use status/needs-design. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use status/needs-design. Kept for issue history; will be removed in milestone 0.10.0.
Context: Surfaced via #122 and the followup conversation with @lirantal -- users sometimes write
command: "npx mcp-server-foo"(single shell-string) instead of the canonicalcommand: npx, args: ["mcp-server-foo"]. The current loose acceptance is a UX trap: it either silently mis-parses or silently relies on whitespace-splitting somewhere downstream, both of which are wrong per the schema.Problem
Per
manifest-schema.md, for self-defined stdio MCP entries:commandMUST be a single binary path (no whitespace, no args)argsis the list of argumentsToday APM accepts the shell-string shape with no warning, hiding the mistake until something breaks.
Proposed change
Parse-time validation that detects:
transport == "stdio", ANDcommandis a string containing whitespace, ANDargsis empty or missingThen emit a structured warning with a concrete fix-it suggestion:
Scope
src/apm_cli/deps/aggregator.pynear_install_inline_mcp_depsor wherever the inline MCP shape is normalized)[!]STATUS_SYMBOLOpen question for the panel (apm-review-panel skill activates on this): warn vs. error in v1. Maintainer steer is "move fast, breaking changes OK if they make sense, adoption base small enough." Likely outcome: error in v1 with a clear fix-it message, since the loose shape was never specified and silently mis-parsing user input is worse than hard-failing.
Workstream: Part of #122 followup, alongside docs consolidation and
apm install --mcpCLI extension.