Skip to content

feat: support MCP-over-ACP in the Codex adapter - #771

Merged
benbrandt merged 1 commit into
mainfrom
feat/mcp-over-acp
Nov 17, 2026
Merged

benbrandt merged 1 commit into
mainfrom
feat/mcp-over-acp

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Summary

Support MCP-over-ACP on ACP v1 and v2. Clients can declare a type: "acp" server at session setup and serve tools on their existing connection. Codex accepts MCP URLs, not ACP registrations, so the adapter uses the ACP SDK's authenticated loopback HTTP bridge. Its listener and credentials belong to the ACP connection, not an individual session. The adapter redacts the bearer header from its outgoing app-server trace.

Compatibility

  • Advertise the transport only if the running Codex binary lists mcp_2026_07_28. Enable that feature only for threads that actually use a bridged server: the bridge requires modern discovery and does not accept the legacy initialize handshake.
  • Existing stdio and HTTP servers can coexist with ACP registrations. Discovery mode is thread-wide, so legacy HTTP servers may see server/discover before Codex falls back to initialize.
  • Preserve servers from CODEX_CONFIG when adding registrations. Resolve name conflicts before opening endpoints, including when a server URL uses a dotted config key.

Verification

  • npm run typecheck and npm run build
  • npm test — 2,532 passed, 39 skipped
  • npm run test:integration — 21 passed. Real bundled Codex 0.166.0 discovers and calls a client tool in a session with legacy HTTP and stdio servers, on both ACP versions. The tests also check request-scoped progress, MCP errors, bearer authentication, and listener lifetime.
  • npm run bundle:all — all six platform binaries built

No live model or API key is required by the new tests. The separate live-model E2E suite was not run.

@benbrandt
benbrandt merged commit b9503ae into main Nov 17, 2026
6 checks passed
@benbrandt
benbrandt deleted the feat/mcp-over-acp branch November 17, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant