Add /:org/mcp and /:org/:workspace/mcp context routes#514
Draft
RhysSullivan wants to merge 1 commit intors/cloud-workspaces-06-web-orgfrom
Draft
Add /:org/mcp and /:org/:workspace/mcp context routes#514RhysSullivan wants to merge 1 commit intors/cloud-workspaces-06-web-orgfrom
RhysSullivan wants to merge 1 commit intors/cloud-workspaces-06-web-orgfrom
Conversation
The plan moves cloud's "active org/workspace" off hidden state and onto the URL. This wires that into the MCP edge: - `/:org/mcp` and `/:org/:workspace/mcp` are first-class MCP routes. `/mcp` stays as a compatibility fallback that resolves to the user's first org membership (oldest by created_at). No "last active workspace" fallback, per the plan. - The MCP session DO is now keyed off the URL-resolved (org, workspace?) pair rather than the JWT's `org_id` claim. The JWT proves identity; the URL is the truth. `validateSessionOwner` checks workspace id too, so a session opened against one workspace can't be reused against another (or against no workspace). - `/.well-known/oauth-protected-resource/:org/mcp` and the workspace variant are published, with the `resource` field pointing at the matching public MCP URL. - `oauthCallbackUrl` mirrors the page's org/workspace prefix into the redirect URI so OAuth callbacks land in the same scope-stack context the source/connection lives in. - Test worker gets a `/__test__/seed-workspace` endpoint and a test-only `McpUrlContextResolver` that auto-mirrors org rows from the bearer for the fallback path (we can't reach WorkOS from the test isolate).
This was referenced May 4, 2026
Owner
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/storage-core
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-google-discovery
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | b1cb75c | Commit Preview URL Branch Preview URL |
May 04 2026, 05:16 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | b1cb75c | May 04 2026, 05:16 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The plan moves cloud's "active org/workspace" off hidden state and onto
the URL. This wires that into the MCP edge:
/:org/mcpand/:org/:workspace/mcpare first-class MCP routes./mcpstays as a compatibility fallback that resolves to the user'sfirst org membership (oldest by created_at). No "last active workspace"
fallback, per the plan.
The MCP session DO is now keyed off the URL-resolved (org, workspace?)
pair rather than the JWT's
org_idclaim. The JWT proves identity;the URL is the truth.
validateSessionOwnerchecks workspace id too,so a session opened against one workspace can't be reused against
another (or against no workspace).
/.well-known/oauth-protected-resource/:org/mcpand the workspacevariant are published, with the
resourcefield pointing at thematching public MCP URL.
oauthCallbackUrlmirrors the page's org/workspace prefix into theredirect URI so OAuth callbacks land in the same scope-stack context
the source/connection lives in.
Test worker gets a
/__test__/seed-workspaceendpoint and a test-onlyMcpUrlContextResolverthat auto-mirrors org rows from the bearer forthe fallback path (we can't reach WorkOS from the test isolate).