Title: fix(mcp): stop refusing tool results authored by another workspace member by waleedlatif1 · Pull Request #6610 · simstudioai/sim · GitHub
Open Graph Title: fix(mcp): stop refusing tool results authored by another workspace member by waleedlatif1 · Pull Request #6610 · simstudioai/sim
X Title: fix(mcp): stop refusing tool results authored by another workspace member by waleedlatif1 · Pull Request #6610 · simstudioai/sim
Description: Summary tools/call on an MCP server returned HTTP 500 / JSON-RPC -32603 whenever the caller was not the person who authored the workflow behind the tool. The provenance precondition in apps/sim/app/api/mcp/serve/[serverId]/route.ts compared provenance.scope?.userId !== scope.userId, but the executor stamps provenance with the workflow AUTHOR (personalEnvUserId, falling back to metadata.workflowUserId on this non-session path) while scope here is the ACTING caller. Owner != actor is the ordinary team configuration, so the check refused normal traffic. The refusal happened AFTER the workflow had already executed and been billed, and MCP clients retry 500s — so every retry re-ran and re-charged the workflow while still failing. Public servers amplified this: the actor is pinned to server.createdBy, so any server whose creator differs from a tool's workflow author was permanently broken for every caller, including anonymous ones. Fix drops only the userId arm and keeps the workspaceId arm, so cross-tenant provenance is still refused. A TSDoc records why userId is deliberately not compared, so the check is not "restored" later as hardening. Anonymization still protects the author: ResolvedSecretTraceRegistry compares both scope fields itself and marks every entry imported from another user anonymous, so a non-author sees [REDACTED_SECRET] rather than the author's secret name. That is covered by a test. Type of Change Bug fix Testing bunx vitest run "app/api/mcp/serve/[serverId]/route.test.ts" — 41/41 pass. Reverting only route.ts to staging makes exactly 3 fail (both non-author paths plus the anonymization projection), so the tests provably fail without the fix. bun run type-check in apps/sim is clean; biome is clean. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary tools/call on an MCP server returned HTTP 500 / JSON-RPC -32603 whenever the caller was not the person who authored the workflow behind the tool. The provenance precondition in apps/sim/ap...
X Description: Summary tools/call on an MCP server returned HTTP 500 / JSON-RPC -32603 whenever the caller was not the person who authored the workflow behind the tool. The provenance precondition in apps/sim/ap...
Opengraph URL: https://github.com/simstudioai/sim/pull/6610
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5c385ec6-9aa5-27cb-66d7-fba0415a78d9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C4C6:FD97C:264001:3583DA:6AFB523E |
| html-safe-nonce | 251cfcb8707325ceda4f64cc70bee377e7928e3204b8bfeadf323c0a45f6fe5d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEM2OkZEOTdDOjI2NDAwMTozNTgzREE6NkFGQjUyM0UiLCJ2aXNpdG9yX2lkIjoiODkxOTI0OTQxNTkxOTMyNTc1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 762c8b59bde445a99c259d3cb6bb70b6ca7fc29ce9bfc9306f8a08925557fcae |
| hovercard-subject-tag | pull_request:4260557756 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6610/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary tools/call on an MCP server returned HTTP 500 / JSON-RPC -32603 whenever the caller was not the person who authored the workflow behind the tool. The provenance precondition in apps/sim/ap... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cbf66c024bb6d10e6955baa7413c54cf13a201bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width