Repository navigation
Conversation
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.
Closes #1218, closes VSC-62
Stacked on #1213; review only the last commit.
Offers the deployment's hosted MCP server (
/api/experimental/mcp/http) to chat and the Agents window. VS Code signs in to it with its own OAuth flow, so the definition carries no credentials. The server is offered only when the deployment enables themcp-server-httpexperiment and the OAuth2 provider (checked through/api/v2/experimentsand the OAuth protected resource metadata), and is re-checked on sign-in, sign-out and deployment switch.coder.mcpServer.enabledturns it off; editors without the MCP API skip it.The extension now activates
onStartupFinished: the Agents window never activatesonMcpCollection, so without it the server never shows up there. Because of that, the "Remote SSH extension not found" warning is shown once per install instead of on every activation.Verified live on dogfood with VS Code Insiders 1.148: in the Agents window the server went from
needs-authtoconnectedafter the OAuth consent. Not verified:pnpm test:scopesfor the newgetExperimentsprobe (needs a scope test deployment).Plan and decision log
MCP server (phase 3 of the Agents window plan; the rest is in #1213)
Phase 3: MCP server (commit
0f162b1, stacked PR)coder exp mcp serverover stdio was dropped: the Agents window runs extension stdio servers on the workspace (see MCP findings).chatSkillsfor common Coder workflows.Decisions
<url>/api/experimental/mcp/http) with VS Code's own OAuth; no credentials in the definition. A stdio CLI definition fails because the Agents window runs it on the workspace.GET /api/v2/experimentslistsmcp-server-httpandGET /.well-known/oauth-protected-resource/api/experimental/mcp/httpreturns 200. An unauthenticated probe of the endpoint can't tell, because coderd authenticates before checking the gates. Re-checked on sign-in, sign-out and deployment switch.coder.mcpServer.enabled(default on,applicationscope); sign-in hint only in docs (CHANGELOG, setting description). Forks without the MCP API skip registration.onStartupFinished. VS Code activatesonMcpCollection:coderonly when a server from the collection starts, and the Agents window never asks, so without it the server never appears there (verified live both ways). Also added to the Microsoft issue draft in feat: support the VS Code Agents window #1213.coder.remoteSshMissingShown), logged on later activations. Showing it only on the open path was rejected because the Remote SSH-provided API (vscodeProposed) is also used by login dialogs, workspace actions, the Tasks panel, CLI prompts, the URI handler andenv.remoteAuthorityreads.MCP findings (verified live, dogfood, Insiders 1.148)
~/.vscode-server-insiders, cwd = workspace folder).envis not applied andresolveMcpServerDefinitionis not called. A stdiocoder exp mcp serverdefinition therefore cannot use the extension's local CLI or session.POST <url>/api/experimental/mcp/httpwith anMcpHttpServerDefinitionand no token: agent host reportsneeds-auth; MCP Servers view shows "Sign in"; clicking it runs VS Code's OAuth (DCR client "Visual Studio Code - Insiders", PKCE, loopback redirect); after the Coder consent page the server reportsconnected. Tokens are held in memory by the agent host.coderd/coderd.go): the route requires themcp-server-httpexperiment and the OAuth2 provider (RequireOAuth2Provider). Without them it is not available, so most deployments do not serve it today.Coder MCP server available. Agents window withoutonStartupFinished: extension never activates, "Coder" not listed. With it: activates, agent host reportsMCP server 'Coder' needs-auth.