Skip to content

[codex] Prototype Codex Apps as virtual HTTP MCP servers#30000

Draft
aibrahim-oai wants to merge 1 commit into
mainfrom
codex/apps-virtual-mcp-prototype
Draft

[codex] Prototype Codex Apps as virtual HTTP MCP servers#30000
aibrahim-oai wants to merge 1 commit into
mainfrom
codex/apps-virtual-mcp-prototype

Conversation

@aibrahim-oai

@aibrahim-oai aibrahim-oai commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a codex-apps crate that snapshots the shared Apps upstream and serves one authenticated loopback streamable-HTTP MCP endpoint per connector
  • return ordinary configured HTTP MCP registrations; MCP manager and core receive no Apps-specific launch branch
  • add a generic validated, redacted runtime bearer facility for non-persisted HTTP credentials
  • centralize connector naming and collision behavior, and protect loopback HTTP traffic from ambient proxies and unsafe redirects

Why

Codex Apps are currently special-cased across MCP management. This prototype tests a cleaner boundary: Apps owns connector inventory, virtual servers, local authentication, and lifecycle; MCP management uses the ordinary configured streamable-HTTP path.

This remains intentionally unwired. The legacy production path stays intact. A production cutover still requires moving connector policy and trust, auth elicitation, file handling, approval metadata, cache and refresh behavior, progress and server notifications, long-name compatibility, and upstream lifecycle behind shared Apps-owned APIs.

Security and lifecycle

  • bind to 127.0.0.1:0
  • use per-connector 256-bit bearer capabilities held in redacted, non-serializable runtime state
  • reject browser Origin requests while retaining RMCP Host validation
  • bypass proxies only for literal loopback endpoints and constrain redirects to loopback with a 10-hop maximum
  • use stateless JSON RMCP plus consuming, cancelable shutdown

Validation

  • just test -p codex-apps (4 tests)
  • just test -p codex-mcp (94 tests)
  • just test -p codex-connectors (32 tests)
  • just test -p codex-utils-string (19 tests)
  • just test -p codex-exec-server reqwest_http_client (4 focused tests)
  • just fix -p for all five affected crates
  • just fmt
  • just bazel-lock-update
  • just bazel-lock-check
  • git diff --check

@aibrahim-oai aibrahim-oai force-pushed the codex/apps-virtual-mcp-prototype branch from 11b6cb0 to d0a8930 Compare June 25, 2026 06:44
@aibrahim-oai aibrahim-oai changed the title [codex] Prototype Codex Apps as virtual MCP servers [codex] Prototype Codex Apps as virtual HTTP MCP servers Jun 25, 2026
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