Skip to content

Route MCP reader tools from initialize roots#231

Open
ScriptedAlchemy wants to merge 4 commits into
masterfrom
codex/mcp-connection-root-routing
Open

Route MCP reader tools from initialize roots#231
ScriptedAlchemy wants to merge 4 commits into
masterfrom
codex/mcp-connection-root-routing

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • record MCP initialize roots as connection-local route state
  • resolve those roots through the client project registry
  • use the resolved root as an implicit project_path only for registered read-only reader tools when the call has no explicit selector
  • share the existing serve root URI decoder so startup and connection routing parse roots consistently

Verification

  • RED: CARGO_TARGET_DIR=target cargo test --features test-transport --test mcp_suite initialize_roots_route_registered_reader_tools_without_explicit_selector -- --nocapture failed with tracedecay_files returning src/active.rs
  • GREEN: CARGO_TARGET_DIR=target cargo test --features test-transport --test mcp_suite initialize_roots_route_registered_reader_tools_without_explicit_selector -- --nocapture
  • cargo fmt --check
  • CARGO_TARGET_DIR=target cargo test --features test-transport --test mcp_suite mcp_server_test:: -- --test-threads=1 currently has 2 baseline failures: test_error_tracking and test_tools_call_plain_text_failure_sets_is_error; both reproduce unchanged on /home/zack/projects/tracedecay

@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ab93776

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy changed the base branch from feat/dashboard-ux-improvements to master July 2, 2026 09:13
@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/mcp-connection-root-routing branch from 6c63237 to 6fed1d5 Compare July 2, 2026 09:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c6323715a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/mcp/server.rs
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