Repository navigation
Show a moved org's v2 MCP URL - #2282
Draft
RhysSullivan wants to merge 3 commits into
Draft
RhysSullivan wants to merge 3 commits into
RhysSullivan wants to merge 3 commits into
Conversation
RhysSullivan
added this pull request to stack #2284
October 12, 2026 22:17
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 0ff77f9 | Oct 12 2026, 11:30 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 0ff77f9 | Commit Preview URL Branch Preview URL |
Oct 12 2026, 11:27 PM |
Contributor
Cloudflare preview
Sign-in is Cloudflare Access (one-time PIN to an allowed email). The preview has its own database and encryption key; it is destroyed when this PR closes. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
…slugs A session's initialize result is the only place it gets the move notice, so a session initialized without it is ended (404) on its next request once the org has moved, unless it holds a paused execution or a running request. The session's client then starts a new one and gets the notice.
This branch has not been deployed
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.
When an org has moved to v2, tell its users and agents where its MCP server is now, and which organization to choose when signing in.
GET /api/auth/v2-importreturnsmoved.v2McpUrl(<V2_MCP_ORIGIN>/mcp, for examplehttps://mcp.executor.sh/mcp). This is a new var, set tohttps://mcp.executor.shinwrangler.jsonc. If the var is unset, the field is omitted and nothing is shown. It is only in the moved answer, so it only appears for moved orgs./mcpand not/org/<slug>/mcp: an OAuth client hitting the org path without sign-in gets a 401 pointing at v2's protected resource, which is<origin>/mcp. The MCP SDK refuses that resource mismatch, and v2 only grants OAuth for/mcp; the organization is chosen on the consent screen. The org path only works with personal access tokens. So every surface names the v2 org (v2Slug) to choose at sign-in./setup-mcpshow the v2 URL andnpx add-mcpcommand first, with "Choose when you sign in." below them. The v1 URL stays below, labelled "Old v1 URL" with the note "Won't receive changes made in Executor v2." The shared card reads the move from a context that the cloud shell provides.initializeinstructions: "This organization moved to Executor v2 on . Its MCP server is now ; ask the user to reconnect their agent there and choose the organization when signing in. Changes made through this server won't reach v2." The read happens once per session build, runs in parallel with the stack build, and is capped at 1s. If the read fails, the session gets no instructions. Tools don't change.initialize, so a session whose client initialized without the current notice (it connected before the move) is ended on its next request: the session DO's owner check answersterminated, the worker returns HTTP 404, and the Streamable HTTP client starts a new session, whoseinitializecarries the notice. The notice a client got is recorded when its liveinitializearrives (setInitializeRequest, which a cold restore never calls). A restored session reuses the read its rebuild makes; a resident one re-reads WorkOS at most once every 5 minutes, never per request. A session holding a paused execution (an open approval or elicitation) or a running request is kept until that work settles. Tool results and descriptions don't change.Tests are in the PR above.