mirror of
https://github.com/coder/coder.git
synced 2026-10-31 02:43:21 +08:00
feat: remove task management MCP tools (#28354)
Removes the six task-management tools from the MCP tool surface in `codersdk/toolsdk`: - `coder_create_task` - `coder_delete_task` - `coder_list_tasks` - `coder_get_task_status` - `coder_send_task_input` - `coder_get_task_logs` Both the coderd-hosted MCP server (`coderd/mcp`) and the CLI `coder exp mcp server` derive their tool list from `toolsdk.All`, so removing the registry entries removes the tools from both servers with no server-side changes. The MCP server documentation (`docs/ai-coder/mcp-server.md`) is updated to drop the task-management entry from the tool overview. ## What stays - `coder_report_task` is intentionally kept: it is the agent-side status-reporting mechanism (`WithTaskReporter`), already excluded from the hosted MCP server, and required by `coder exp mcp server`, Claude Code configuration, and scaletest. - The `codersdk` Task SDK methods (`CreateTask`, `DeleteTask`, `Tasks`, `TaskLogs`, etc.) and the Tasks feature (CLI, UI, API) are untouched; this PR only removes MCP tool registration. - The task-only `taskIDDescription` helper is deleted; `userDescription` stays (used by `coder_create_workspace`). The code change is deletion-only: 970 removed lines across `toolsdk.go` and its test file, no added behavior. ## Validation - `go build ./...`, `go test ./coderd/mcp/`, and targeted `golangci-lint` pass. `go test ./codersdk/toolsdk/` passes all tests; the package-level goleak failure (agentssh goroutines) reproduces identically on unmodified `main` and is unrelated to this diff. - `pnpm run lint-docs` passes on the docs change. - Remote dogfood UAT ran against the toolsdk change and passed: `tools/list` on both the hosted MCP endpoint and `coder exp mcp server` confirms the six tools are absent and the remaining surface is intact (34 hosted tools; CLI adds `search`/`fetch`), a `tools/call` of `coder_get_authenticated_user` succeeds, and calling a removed tool returns `-32602 unknown tool`. `coder_report_task` still registers in the CLI server when `CODER_MCP_APP_STATUS_SLUG` is set. - The failing `Pixel / Review` commit status is unrelated: this PR contains no `site/` changes, and the same status fails on the last 8 `main` commits including this PR's merge base (`676b9bb06bf`). > Mux acted on Mike's behalf to create this pull request.
This commit is contained in:
@@ -94,8 +94,8 @@ through `2026-07-28`, does not issue `Mcp-Session-Id` headers, and answers
|
||||
`GET` and `DELETE` with `405 Method Not Allowed` (there is no standalone
|
||||
server-event stream or explicit session termination, both permitted by the
|
||||
specification). The server exposes tools only; MCP resources, prompts,
|
||||
structured tool output, elicitation, and the MCP Tasks extension (which is
|
||||
unrelated to Coder's task tools) are not implemented.
|
||||
structured tool output, elicitation, and the MCP Tasks extension are not
|
||||
implemented.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
@@ -198,7 +198,6 @@ The MCP server exposes tools across several areas:
|
||||
- **Template operations**: list, inspect, create, and manage templates and versions
|
||||
- **File operations**: read, write, and edit files in a workspace
|
||||
- **Workspace interaction**: run commands, forward ports, list apps, and read logs
|
||||
- **Task management**: create, list, inspect, and control tasks
|
||||
- **Coder Agents chats**: create chats, send messages, read transcripts and status, interrupt, archive, and list available models
|
||||
- **User and system**: authenticated user details, tar uploads, and task reporting
|
||||
|
||||
|
||||
Reference in New Issue
Block a user