{"record":{"id":"f50e303cd06b4476","repo":"can1357/oh-my-pi","slug":"unsupported-mcp-server-transport-server-type","errorCode":null,"errorMessage":"Unsupported MCP server transport: ${server.type}","messagePattern":"Unsupported MCP server transport: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/modes/acp/acp-agent.ts","lineNumber":2714,"sourceCode":"\t\t\t};\n\t\t}\n\t\tif (server.type === \"http\") {\n\t\t\treturn {\n\t\t\t\ttype: \"http\",\n\t\t\t\turl: server.url,\n\t\t\t\theaders: this.#toNameValueMap(server.headers),\n\t\t\t};\n\t\t}\n\t\tif (server.type === \"sse\") {\n\t\t\treturn {\n\t\t\t\ttype: \"sse\",\n\t\t\t\turl: server.url,\n\t\t\t\theaders: this.#toNameValueMap(server.headers),\n\t\t\t};\n\t\t}\n\t\t// The experimental ACP-channel transport (`type: \"acp\"`) is not advertised in\n\t\t// `mcpCapabilities`, so a spec-compliant client never sends it; reject defensively.\n\t\tthrow new Error(`Unsupported MCP server transport: ${server.type}`);\n\t}\n\n\t#toNameValueMap(values: Array<{ name: string; value: string }>): { [name: string]: string } {\n\t\tconst mapped: { [name: string]: string } = {};\n\t\tfor (const value of values) {\n\t\t\tmapped[value.name] = value.value;\n\t\t}\n\t\treturn mapped;\n\t}\n\n\tasync #closeManagedSession(sessionId: string, record: ManagedSessionRecord): Promise<void> {\n\t\trecord.closedError ??= this.#createPromptLifecycleError(\"ACP session closed before queued prompt could run\");\n\t\tthis.#sessions.delete(sessionId);\n\t\tawait this.#cancelPromptForClose(record);\n\t\tawait this.#disposeSessionRecord(record);\n\t}\n\n\tasync #cancelPromptForClose(record: ManagedSessionRecord): Promise<void> {","sourceCodeStart":2696,"sourceCodeEnd":2732,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/modes/acp/acp-agent.ts#L2696-L2732","documentation":"When translating ACP MCP server configs into internal server configs, #toInternalConfig handles the supported transports (stdio, and the http/sse style with url+headers). A server entry with type \"acp\" — an experimental internal-only channel that is deliberately not advertised in mcpCapabilities — reaches this throw as a defensive rejection. Spec-compliant ACP clients can never legitimately send it.","triggerScenarios":"Sending an ACP MCP-config request containing a server whose type is \"acp\" (or any type not handled by the preceding branches of #toInternalConfig).","commonSituations":"Copy-pasting an internal/ompi config that uses the experimental acp transport into an ACP client's settings; a non-standard client forwarding internal server definitions verbatim.","solutions":["Remove servers with type \"acp\" from the ACP client's MCP config — that transport is internal-only and not available over ACP.","Reconfigure that server over a supported transport (stdio command, or HTTP/SSE url+headers).","Upgrade/fix the client so it filters server types to those advertised in mcpCapabilities before sending."],"exampleFix":"// before\n{ \"name\": \"memory\", \"type\": \"acp\" }\n// after\n{ \"name\": \"memory\", \"type\": \"http\", \"url\": \"http://localhost:3000/mcp\", \"headers\": [] }","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set([\"stdio\", \"http\", \"sse\"]);\nconst filtered = servers.filter(s => SUPPORTED.has(s.type));\nif (filtered.length !== servers.length) logger.warn(\"dropped unsupported MCP transports\", { dropped: servers.length - filtered.length });","typeGuard":"function isSupportedTransport(t: string): boolean {\n  return t === \"stdio\" || t === \"http\" || t === \"sse\";\n}","tryCatchPattern":"try {\n  await configureMcpServers(servers);\n} catch (err) {\n  if (err.message.startsWith(\"Unsupported MCP server transport\")) {\n    const ok = servers.filter(s => isSupportedTransport(s.type));\n    await configureMcpServers(ok);\n  } else throw err;\n}","preventionTips":["Only send server types advertised in the ACP mcpCapabilities.","Keep internal-only transports (type \"acp\") out of client-facing configs.","Validate the transport field when importing configs from other tools."],"tags":["mcp","acp","transport"],"backgroundTag":"unsupported-transport-type","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}