Expose MCP resources to Codex agents
Resolved 💬 6 comments Opened Oct 8, 2025 by CaliLuke Closed Oct 17, 2025
Summary
Codex’s MCP integration surfaces tool wrappers end-to-end, but resources announced during the MCP handshake never reach the CLI agent. The client layer only issues tools/list and tools/call, so resources are invisible to the runtime and UI. This gap prevents agents from reading MCP-provided configuration or documents automatically.
Proposed design
- Add resource helpers in the client. Extend
mcp-client/rmcp-clientwith typed calls forresources/list,resources/read,resources/subscribe, andresources/unsubscribe, mirroring the existing tool helpers and wiring notifications into the dispatcher. - Cache resources in the connection manager. Teach
McpConnectionManagerto fetch resources alongside tools during startup, maintain a per-server resource cache, and react to resource update notifications so the data stays current. - Expose resources via protocol & UI. Introduce new protocol messages (e.g.,
Op::ListMcpResources,EventMsg::McpListResourcesResponse) so front-ends can request and render resource listings. Update the TUI to display them and optionally add a convenience path for triggeringresources/read. - Agent runtime integration. Provide a higher-level API that lets plans fetch
resource://…URIs directly, similar to the existing tool wrappers, so agents can ingest resource content without manual intervention.
Acceptance criteria
- Agents can enumerate MCP resources from a running session and read their contents without leaving the CLI.
- Resource caches stay in sync when servers send
notifications/resources/*updates. - Documentation notes the new capability and how MCP authors should expect their resources to appear.
Happy to iterate if there’s a preferred rollout path.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗