{"record":{"id":"1b09a0b501aa396a","repo":"HKUDS/Vibe-Trading","slug":"transport-mcp-servers-do-not-accept-command-args","errorCode":null,"errorMessage":"{transport} MCP servers do not accept command/args/env","messagePattern":"(.+?) MCP servers do not accept command/args/env","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"agent/src/config/schema.py","lineNumber":398,"sourceCode":"        Raises:\n            ValueError: If required fields are missing for the resolved\n                transport or conflicting fields are provided.\n        \"\"\"\n        transport = self.resolved_transport()\n\n        if transport == \"stdio\":\n            if not self.command.strip():\n                raise ValueError(\"stdio MCP servers require a command\")\n            if self.url.strip() or self.headers:\n                raise ValueError(\"stdio MCP servers do not accept url/headers\")\n            if self.auth is not None:\n                raise ValueError(\"stdio MCP servers do not accept auth (OAuth is HTTP-only)\")\n            return self\n\n        if not self.url.strip():\n            raise ValueError(f\"{transport} MCP servers require a url\")\n        if self.command.strip() or self.args or self.env:\n            raise ValueError(f\"{transport} MCP servers do not accept command/args/env\")\n\n        if self.auth is not None:\n            # The OAuth provider owns the runtime Authorization header; a\n            # hand-set static header alongside it is always a config error.\n            if self.headers:\n                raise ValueError(\n                    \"MCP servers using auth must not also set static headers \"\n                    \"(the OAuth provider owns the Authorization header)\"\n                )\n            # A refresh token must never traverse cleartext.\n            if not self.url.strip().lower().startswith(\"https://\"):\n                raise ValueError(\"OAuth MCP servers require an https url\")\n        return self\n\n\nclass MCPServerConfigOverride(ConfigBase):\n    \"\"\"Partial MCP server override used for runtime config layering.\"\"\"\n","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/config/schema.py#L380-L416","documentation":"Raised by validate_transport_config when an HTTP (sse/streamableHttp) server also defines command, args, or env. HTTP servers are not launched locally, so process-launch fields contradict the transport and are rejected.","triggerScenarios":"An entry with type: sse/streamableHttp plus command/args/env; converting a stdio server to HTTP without removing the process fields.","commonSituations":"Adding a url to an existing stdio entry and switching type, leaving command behind; config merge bringing in both sets of fields.","solutions":["Remove command, args, and env from the HTTP server entry.","If the process fields are what you want, remove url/type so it resolves to stdio."],"exampleFix":"# before\nmcp_servers:\n  remote:\n    type: sse\n    url: https://mcp.example.com/sse\n    command: npx\n\n# after\nmcp_servers:\n  remote:\n    type: sse\n    url: https://mcp.example.com/sse","handlingStrategy":"validation","validationCode":"PROCESS_FIELDS = ('command', 'args', 'env')\n\ndef http_entry_no_process_fields(entry: dict) -> bool:\n    if entry.get('type') in ('sse', 'streamableHttp'):\n        return not any(entry.get(k) for k in PROCESS_FIELDS)\n    return True","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When converting stdio to HTTP, delete command/args/env lines entirely","Use distinct named templates per transport kind"],"tags":["mcp","config","http-transport","validation"],"backgroundTag":"config-validation-failed","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}