improvement(api): share the API key workspace policy messages and align MCP discover - #6439
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview
Reviewed by Cursor Bugbot for commit ebeb600. Configure here. |
Greptile SummaryThe PR centralizes workspace API-key policy messages and aligns MCP discovery with MCP serve authorization.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported discovery mismatch is fixed because public servers remain visible while only private servers denied by the workspace personal-key policy are filtered.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/mcp/discover/route.ts | The server-level visibility predicate now matches MCP serve authorization for public and private servers accessed with personal API keys. |
| apps/sim/app/api/mcp/discover/route.test.ts | Adds regression coverage for blocked private servers, public-server preservation, sessions, and workspace keys. |
| apps/sim/app/api/mcp/serve/[serverId]/route.ts | Replaces the inline personal-key denial message without changing authorization behavior. |
| apps/sim/lib/api-key/policy-messages.ts | Defines the two shared API-key workspace-policy messages used consistently by affected routes. |
Reviews (2): Last reviewed commit: "fix(mcp): keep public servers listed for..." | Re-trigger Greptile
4dc2d39 to
ebeb600
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ebeb600. Configure here.
Summary
lib/api-key/policy-messages.tsand adopts them across the routes and tests that previously inlined the same strings/api/mcp/discovernow lists only workspaces whose setting permits the presented key type, so a listed server URL is always one that credential can actually useType of Change
Testing
Unit tests added for discover; MCP, workflows, v1, jobs and api-key suites pass
Checklist