Skip to content

Make MCP resource read threadless#18292

Merged
mzeng-openai merged 4 commits into
mainfrom
dev/mzeng/make-resource-read-threadless
Apr 21, 2026
Merged

Make MCP resource read threadless#18292
mzeng-openai merged 4 commits into
mainfrom
dev/mzeng/make-resource-read-threadless

Conversation

@mzeng-openai
Copy link
Copy Markdown
Collaborator

@mzeng-openai mzeng-openai commented Apr 17, 2026

Summary

Making thread id optional so that we can better cache resources for MCPs for connectors since their resource templates is universal and not particular to projects.

  • Make mcpServer/resource/read accept an optional threadId
  • Read resources from the current MCP config when no thread is supplied
  • Keep the existing thread-scoped path when threadId is present
  • Update the generated schemas, README, and integration coverage

Testing

  • just write-app-server-schema
  • just fmt
  • cargo test -p codex-app-server-protocol
  • cargo test -p codex-mcp
  • cargo test -p codex-app-server --test all mcp_resource
  • just fix -p codex-mcp
  • just fix -p codex-app-server-protocol
  • just fix -p codex-app-server
…source-read-threadless

# Conflicts:
#	codex-rs/app-server/tests/suite/v2/mcp_resource.rs
@mzeng-openai mzeng-openai marked this pull request as ready for review April 17, 2026 07:40
Copy link
Copy Markdown
Collaborator

@shijie-oai shijie-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was resource/read used for? Just want to make sure I understand.

@mzeng-openai
Copy link
Copy Markdown
Collaborator Author

What was resource/read used for? Just want to make sure I understand.

The app-server clients (Codex App) need to read UI widgets from MCP servers.

@mzeng-openai mzeng-openai requested a review from shijie-oai April 21, 2026 00:01
@mzeng-openai mzeng-openai merged commit 1132ef8 into main Apr 21, 2026
25 checks passed
@mzeng-openai mzeng-openai deleted the dev/mzeng/make-resource-read-threadless branch April 21, 2026 02:59
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants