feat: expand and harden Remote MCP tools - #62
Merged
Conversation
levkohimins
approved these changes
Sep 13, 2026
This was referenced Sep 13, 2026
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.
Summary
Implements the evidence-driven Compact v2 Remote MCP surface for Coder without making model A/B evals a release gate.
The design is based on two inputs:
Curated MCP surface
The developer catalog is now 34 tools including
recent_activity.New semantic tools:
remote_hostscopy_pathremove_pathhttp_fetchhttp_requestgit_querygit_mutatecode_querycode_renameRemote transport is a
hostparameter on existing file/search/exec/process/semantic tools instead of a duplicatedremote_*tool family.Remote safety model
remote_hostsexposes only exact SSH aliases explicitly configured in the workspace user's SSH config.user@hosttargets are rejected at the Agent transport boundary.identity_file; SSH credentials stay in workspace SSH config.copy_pathvalidates both endpoints before constructing its transfer pipeline.Semantic safety boundaries
GET/HEAD) are exposed ashttp_fetch; mutations (POST/PUT/PATCH/DELETE) are isolated inhttp_request.git_query; local mutations are isolated ingit_mutate. Network Git (fetch/pull/push) intentionally remains inexecbecause it crosses a credential/open-world boundary.code_query; semantic rename is a separate mutatingcode_renametool.remote_hosts,http_fetch,git_query, andcode_query, and excludes all corresponding mutating tools.Durable execution / MCP observation
CODER_MCP_TOOL_TIMEOUT_MAX, default 4m40s) while durable Agent processes continue independently.exec/bashcan return the existing durableprocess_idwhen observation ends instead of killing/restarting work.Activity/history hygiene
Validation
All of the following passed before creating this PR:
go test ./codersdk/toolsdk(full suite, including real Agent/DB integration cases)go test ./coderd/mcp(full MCP E2E/toolset/activity/transport suite)go test ./agent/sshconfig ./agent/agentfiles ./agent/agentproc ./codersdk/workspacesdk ./codersdkgo test ./agent -run '^$'go test ./coderd -run '^$'go build ./cmd/codergolangci-lint run --new-from-rev origin/custom/v2.35.3 ./agent/sshconfig ./agent/agentfiles ./agent/agentproc ./codersdk/toolsdk ./codersdk/workspacesdk ./coderd/mcpGOOS=windows GOARCH=amd64 go test -c) foragentproc,agentfiles, andtoolsdkgit diff --cached --checkFor DB-backed suites, an isolated local PostgreSQL 16 instance was used inside the workspace; production DB was not touched.
The repository-wide pre-commit generator was also run. It completed generation/format passes and then surfaced pre-existing stale generated API/docs output from older custom Activity/Volume Copy work. Those unrelated multi-megabyte generated diffs were intentionally not folded into this PR; the new
mcpToolTimeoutMaxserver-config golden and generated TypeScript deployment type are included.No deployment is performed by this PR.