Skip to content

chore: add project MCP configuration - #1589

Merged
BigSimmo merged 5 commits into
mainfrom
codex/mcp-cloud-configuration
Aug 2, 2026
Merged

chore: add project MCP configuration#1589
BigSimmo merged 5 commits into
mainfrom
codex/mcp-cloud-configuration

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Verification

  • npm run verify:pr-local

During development, use npm run verify:cheap as the faster iteration gate before the final PR-local preflight.

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed
  • npm run verify:release before release or handoff confidence claims

For retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract changes, verify:pr-local runs eval:rag:offline automatically. Run the offline command directly during iteration before spending a live eval.

  • npm run eval:retrieval:quality (must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — CI cannot run it (needs live keys), so run it locally and paste the summary. A metadata/governance-weighting change once buried correct docs (recall 1.0→0.76) and only this eval caught it.
  • npm run eval:rag -- --limit 15 + npm run eval:quality -- --rag-only when answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)
  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed

Risk and rollout

Complete this section for clinical, data, API, auth/privacy, workflow, dependency, build, or deployment changes.

  • Risk:
  • Rollback:
  • Provider or production effects: None / describe the explicitly authorized effect

Clinical Governance Preflight

Complete this section when the change touches ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes


Open in Devin Review

Summary by CodeRabbit

  • Chores
    • Added project-scoped integrations for Figma, Supabase, Railway, and Sentry.
    • Updated project configuration to retain shared integration settings while excluding other local configuration files.
  • Documentation
    • Documented the new project configuration in the codebase overview.
    • Clarified that sensitive credentials remain managed outside the repository.

@supabase

supabase Bot commented Aug 2, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 45 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 56a0f3d4-ca08-4270-8a68-dd26a86c0b56

📥 Commits

Reviewing files that changed from the base of the PR and between 0da95b7 and ba447b9.

📒 Files selected for processing (7)
  • .codex/config.toml
  • .gitignore
  • AGENTS.md
  • docs/codebase-index.md
  • docs/codex-cloud.md
  • scripts/check-codex-cloud-setup.mjs
  • tests/codex-cloud-setup.test.ts
📝 Walkthrough

Walkthrough

The project adds secret-free, project-scoped MCP registrations for Figma, Supabase, Railway, and Sentry. It tracks .codex/config.toml, ignores other .codex contents, and documents the directory.

Changes

MCP configuration

Layer / File(s) Summary
Tracked MCP server setup
.codex/config.toml, .gitignore, docs/codebase-index.md
The project adds URL-only MCP registrations for four services. Supabase uses a read-only project URL and feature flags. Git tracks the configuration file and ignores other .codex contents. The repository layout documents these rules.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: cursoragent

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes the template but leaves the summary, verification, risk, rollout, governance, and notes sections incomplete. Complete the Summary, Verification, Risk and rollout, Clinical Governance Preflight, and Notes sections with applicable results or explicit reasons.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: adding project MCP configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.gitignore (1)

22-23: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Add automated protection for the trackable Codex config.

This exception permits future credentials or secret headers to enter Git. Add a CI secret scan and document that credentials must remain in the host credential store.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitignore around lines 22 - 23, Add CI secret scanning that covers the
trackable .codex/config.toml exception, and document that credentials and secret
headers must remain in the host credential store rather than this file. Ensure
the scan fails when secrets are detected while preserving the intended config
tracking behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.codex/config.toml:
- Around line 4-14: Update the mcp_servers.figma_cloud, supabase_cloud,
railway_cloud, and sentry_cloud configuration entries to explicitly set enabled
status instead of relying on defaults. For any enabled server, define the
allowed tool restrictions and default_tools_approval_mode; keep Supabase
production access read-only, and document its required OAuth scope and
confirmation boundary within the configuration.

---

Nitpick comments:
In @.gitignore:
- Around line 22-23: Add CI secret scanning that covers the trackable
.codex/config.toml exception, and document that credentials and secret headers
must remain in the host credential store rather than this file. Ensure the scan
fails when secrets are detected while preserving the intended config tracking
behavior.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7ccaeb2c-ba5e-428b-9545-bde9e18b14ef

📥 Commits

Reviewing files that changed from the base of the PR and between 7066070 and b9b2690.

📒 Files selected for processing (2)
  • .codex/config.toml
  • .gitignore

Comment thread .codex/config.toml

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

ℹ️ 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 .codex/config.toml
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #7866 (cancelled).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

The agent ran but didn't make any changes. The issues may already be fixed or require manual intervention.

@BigSimmo

BigSimmo commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@cursoragent resolve failing CI testing please

@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Fixed the CI failure and pushed to codex/mcp-cloud-configuration.

Cause: docs:check-index failed because tracked .codex/ wasn’t listed in docs/codebase-index.md.

Fix: Added a .codex/ row to the top-level directory map (alongside .agents/ / .claude/ / .cursor/).

Verified:

docs/codebase-index.md coverage OK: all 50 repository roots/modules/routes and all schema tables are indexed.

Commit 0da95b7f is on PR #1589.

Open in Web Open in Cursor 

Static PR checks failed because docs:check-index treats
tracked .codex/ as an unindexed top-level root.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo

BigSimmo commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@cursoragent resolve all comments please after fixing them if appropriate.

@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

All 6 review threads on PR #1589 are resolved.

Already fixed earlier: Codex P1 + CodeRabbit (disabled-by-default MCP + governance gate)

This pass:

  • Clarified the .gitignore exception (credentials stay out of tracked config.toml) — 3529f606
  • Replied on the remaining Devin threads (governance coverage, allowlist vs disabled templates, gitignore residual risk)
  • Resolved every open thread

Couldn’t update the PR description — ManagePullRequest reports it isn’t agent-managed. The incomplete Summary/Verification template is still a CodeRabbit warning if you want to fill that in manually.

Open in Web Open in Cursor 

Comment thread .codex/config.toml

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread .codex/config.toml
Comment thread .gitignore

@BigSimmo BigSimmo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

ok

Comment thread .codex/config.toml
@BigSimmo

BigSimmo commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@cursoragent here are potential fixes... compare them against yours

Review — logical fixes for config.toml MCP registrations
This PR adds a second, tracked MCP registry (config.toml) that is not covered by any existing gate. The repo's MCP contract in validateMcpConfiguration (scripts/check-codex-cloud-setup.mjs:151-207) only parses .mcp.json and is invoked solely via read(".mcp.json") at scripts/check-codex-cloud-setup.mjs:321 / :467. So the new file bypasses every constraint that governs the existing entries. Below are the concrete fixes.

  1. Explicitly disable / gate providers (P1 — default-enabled surface)
    Codex enables an MCP server when enabled is omitted, so all four servers (Figma, Supabase-prod, Railway with deploy/variable mutations, Sentry) become active for any host that trusts this checkout. Add explicit control per your stated intent (cloud sessions should get access without prompting unless it costs money):

Set enabled = false for servers not needed every session, or gate them behind a connected profile.
For enabled servers, set default_tools_approval_mode and, where useful, an enabled_tools allow-list. Reserve prompting (approve/writes) for cost-incurring operations (e.g. Railway deployments, canary/API runs); auto-approve read-only tools.
Keep Supabase read-only (already correct — see #3).
2. Extend the governance check to cover config.toml
validateMcpConfiguration (scripts/check-codex-cloud-setup.mjs:151-207) must also parse and validate config.toml so future edits (dropping read_only=true, adding a different project_ref, embedding env/headers, adding new servers) fail CI the same way they would in .mcp.json. Add:

an allowed-server-name list (or an explicit, documented allowance for Figma/Sentry),
Supabase pinning to sjrfecxgysukkwxsowpy + read_only=true + the fixed feature set (mirror scripts/check-codex-cloud-setup.mjs:189-202),
a no-embedded-credentials assertion (URL-only registrations; no tokens/headers/env).
3. Fix the Railway URL string to match the validated form
.mcp.json uses https://mcp.railway.com (no trailing slash) and the check strips a trailing slash when comparing (scripts/check-codex-cloud-setup.mjs:175). The new file uses https://mcp.railway.com/ (config.toml:11). Functionally equivalent, but the two files now carry different literal strings for the same server, which will break any future exact-match parity check. Align them to https://mcp.railway.com.

  1. Document the new providers and their approval scope
    codex-cloud.md describes the checked-in MCP config as Railway + read-only Supabase only. Add Figma and Sentry to the provider-acceptance section (and their OAuth scope / confirmation boundary) so the docs match reality.

  2. Guard the .gitignore narrowing
    /.codex/* + config.toml (.gitignore:22-23) is correct today (no credential file becomes tracked), but config.toml is exactly where hosts may append local settings. Add a static check (or gitleaks path rule) asserting the tracked config.toml contains only URL-based MCP registrations and no tokens/headers/env values — this also satisfies Bump actions/setup-node from 4 to 6 #2's no-credentials assertion.

⚠️ Open question worth confirming before merging
Codex CLI's config home is $CODEX_HOME / ~/.codex, and setup-codex-cloud.sh writes to config.toml, not the repo-local file. Please confirm your Codex hosts actually read a project-scoped config.toml — if they don't, these registrations are inert documentation rather than working configuration, and the fixes above should be applied to whatever file the hosts truly load.

@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Comparison of that review against this branch:

Suggested fix Status Notes
1. Disable / gate providers Done (49647638) All four have enabled = false + default_tools_approval_mode = "auto". Matches your cloud intent: no offline auto-init; when a host enables them for a task, no per-tool prompts. Paid canaries stay confirmation-gated in AGENTS.md. No enabled_tools allow-list — skipped because tool names vary by provider and servers stay off until opted in.
2. Extend governance to config.toml Done (49647638) validateCodexProjectMcpConfiguration is wired into check:codex-cloud: allowed server set, Supabase pin/read_only/features, no embedded credentials.
3. Align Railway URL Done just now (ba447b91) Was the real remaining gap. Both files now use https://mcp.railway.com (no trailing slash).
4. Document Figma/Sentry + approval Done / strengthened (ba447b91) Provider-acceptance now covers Figma/Sentry, OAuth-in-host-store, auto-approval vs paid/write confirmation, and project-scoped vs $CODEX_HOME.
5. Guard .gitignore narrowing Done (3529f606 + gate) Comment on the exception + static rejection of secret-bearing keys + existing Gitleaks.

Open question (project-scoped load): Confirmed and documented — trusted Codex hosts do load project .codex/config.toml alongside $CODEX_HOME/config.toml. setup-codex-cloud.sh only manages the home-dir shell-policy block; the repo file is the shared MCP template.

Verified after the alignment pass: check:codex-cloud PASS; tests/codex-cloud-setup.test.ts 18/18.

Open in Web Open in Cursor 

cursoragent and others added 3 commits August 2, 2026 17:19
Address the P1 that trusted checkouts auto-enabled Figma, Supabase,
Railway, and Sentry. Registrations stay URL-only with enabled=false and
auto tool approval for connected Cloud hosts; gate validates the file.
Paid API canaries remain confirmation-gated.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Document that the gitignore exception is for the secret-free MCP
template only; host credentials stay out of the tracked file.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Match .codex/config.toml Railway endpoint to .mcp.json (no trailing
slash) and clarify that trusted Codex hosts load project config.toml
alongside CODEX_HOME, including Figma/Sentry approval boundaries.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo enabled auto-merge (squash) August 2, 2026 17:28
@BigSimmo
BigSimmo merged commit 1791b1d into main Aug 2, 2026
23 checks passed
@BigSimmo
BigSimmo deleted the codex/mcp-cloud-configuration branch August 2, 2026 17:28
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.

2 participants