Skip to content

fix: make MCP attachment and scope rotation reliable - #12

Merged
haasonsaas merged 3 commits into
mainfrom
feat/mcp-elicitations
Jul 15, 2026
Merged

fix: make MCP attachment and scope rotation reliable#12
haasonsaas merged 3 commits into
mainfrom
feat/mcp-elicitations

Conversation

@haasonsaas

Copy link
Copy Markdown
Collaborator

Summary

Room now appears as a native MCP server in newly created Codex tasks, so typed form and URL elicitations render in the Codex UI instead of depending on a GUI process inheriting a bearer-token environment variable. A local stdio entrypoint reads the credential from a private token file and uses it only for authenticated Room API calls.

Credential scope expansion is now an explicit control-plane workflow rather than an unaudited token reissue. An authenticated human administrator must enter the exact workspace, repository, and agent scope plus APPROVE; Room rotates the token and records the actor, subject, old scope, new scope, action, and timestamp atomically. Wildcards, automation identities, local-auth principals, and duplicate bootstrap issuance are rejected.

The change was manually exercised from a fresh Codex task: all four Room tools were discovered through the plugin-backed stdio server and room_analyze_plan opened a native typed elicitation.

Validation

  • go test ./...
  • go test -race ./...
  • go vet ./...
  • buf lint
  • git diff --check
  • Room diff analysis: allow, analyzer status complete (audit 2de42186f2ff97f8370dc2b4d79a52f4)

New concepts

The stdio MCP process is a local credential boundary: Codex starts it directly, while the process reads the Room token from a mode-restricted file and applies it only to upstream Room requests. This keeps MCP discovery and elicitation capabilities inside the native client/server session without requiring the desktop app to inherit secret environment state.

Use this pattern for trusted local MCP clients that need native protocol features and private upstream credentials. A remotely shared MCP service should continue to use transport-level authentication and centralized credential management instead.

@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: 9f04710b60

ℹ️ 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 cmd/room-mcp-stdio/main.go Outdated
- make the stdio entrypoint load its token exclusively from ROOM_TOKEN_FILE
- cover inherited ROOM_TOKEN precedence with a regression test
@haasonsaas

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 7fbfed216b

ℹ️ 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 cmd/room-mcp-stdio/main.go Outdated
- separate stdio control-plane validation from HTTP deadline checks
- preserve the HTTP MCP timeout contract with regression coverage
@haasonsaas

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: c4af66d903

ℹ️ 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".

@haasonsaas
haasonsaas merged commit 514aaec into main Jul 15, 2026
3 checks passed
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