Expose MCP resources to Codex agents

Resolved 💬 6 comments Opened Oct 8, 2025 by CaliLuke Closed Oct 17, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

  1. Add resource helpers in the client. Extend mcp-client/rmcp-client with typed calls for resources/list, resources/read, resources/subscribe, and resources/unsubscribe, mirroring the existing tool helpers and wiring notifications into the dispatcher.
  2. Cache resources in the connection manager. Teach McpConnectionManager to fetch resources alongside tools during startup, maintain a per-server resource cache, and react to resource update notifications so the data stays current.
  3. 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 triggering resources/read.
  4. 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.

View original on GitHub ↗

6 Comments

github-actions[bot] contributor · 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #4952

Powered by Codex Action

CaliLuke · 10 months ago

closed the other one, this is better worded and more detailed.

gpeal contributor · 10 months ago

Noted, we're making some improvements to MCPs and this may make the cutline.

Which MCPs do you use that you get the most value from resources from?

CaliLuke · 10 months ago

well I'm developing my own and I use resources to avoid polluting the tool namespace to provide read only calls to give the AI access to things like lists and counters, they are less error prone when called compared to tools. Github MCP also provides resources in a way that makes them more useful than you would think at first. But ultimately the fundamental reason I would like Codex CLI to support them is that without it I can't ensure that everything works when I'm testing so I need to rely on a different extension that supports resources like RooCode or Cline.

gpeal contributor · 10 months ago

Noted, thanks!

miklschmidt · 10 months ago

Just wanted to give this an updoot.

I've run into problems with this twice, and this time i can't work around with it tool calls as it's a third party MCP server - specifically backlog.md, where resources are fairly critical to the workflow.