Michael Suchacz
8d4d0b35dd
feat: add Coder Agents chat tools to the MCP toolsdk ( #28025 )
...
Exposes the experimental Coder Agents chats API through the MCP tool
registry, so MCP clients (the hosted `/api/experimental/mcp/http` server
and `coder exp mcp server`) can start and drive server-side coding
agents.
New tools in `codersdk/toolsdk`, all thin wrappers over existing
`codersdk.ExperimentalClient` methods:
| Tool | Wraps |
|---|---|
| `coder_create_chat` | `CreateChat` (prompt, optional org, model
config, labels) |
| `coder_get_chat` | `GetChat` (status, last error, last turn summary,
workspace, files) |
| `coder_get_chat_messages` | `GetChatMessages` (user-facing parts,
chronological, cursor pagination, queued prompts) |
| `coder_send_chat_message` | `CreateChatMessage` (queue or interrupt
busy behavior) |
| `coder_interrupt_chat` | `InterruptChat` |
| `coder_archive_chat` | `UpdateChat` with `archived: true` |
| `coder_list_chat_model_configs` | `ListChatModelConfigs` (enabled
configs with default flag) |
Both MCP servers register tools from `toolsdk.All`, so no additional
wiring is needed. Responses are trimmed to what an MCP caller needs (IDs
as strings, user-facing transcripts) rather than full SDK payloads. No
new endpoints and no database changes.
Also adds MCP
[prompts](https://modelcontextprotocol.io/specification/2026-07-28/server/prompts )
for the chat workflows, defined once in `codersdk/toolsdk` and
registered by both servers:
| Prompt | Purpose |
|---|---|
| `coder_agents_delegate` | delegate a task to a Coder Agents chat and
monitor it to completion |
| `coder_agents_check` | check the status and recent activity of an
existing chat |
Each prompt declares the tools its workflow needs; the stdio server
skips prompts whose tools are excluded by `--allowed-tools`.
Tests run the tools against a chat-enabled coderdtest instance (fake
OpenAI-compatible provider plus in-process AI bridge), covering the full
lifecycle, an interrupt against a blocked turn, pagination cursors,
permission-dependent model config filtering, and argument validation.
Prompt coverage spans SDK rendering, the hosted
`prompts/list`/`prompts/get` round trip, and the stdio server including
allowlist gating.
> Mux created this PR on Mike's behalf.
2026-08-13 18:32:47 +02:00
..
2026-06-05 14:33:15 +03:00
2026-06-03 15:30:37 -04:00
2026-06-03 15:30:37 -04:00
2025-06-24 11:16:31 +02:00
2024-02-26 10:03:49 -06:00
2026-01-08 15:24:11 +04:00
2026-03-12 13:39:24 -06:00
2026-03-11 15:19:56 +02:00
2023-09-04 21:42:45 +03:00
2026-08-12 16:02:15 -05:00
2025-06-20 13:16:55 -06:00
2026-06-02 10:46:40 +00:00
2026-07-20 15:39:21 +02:00
2026-07-16 16:09:25 +01:00
2026-08-04 16:57:16 +02:00
2025-10-27 17:07:25 +01:00
2025-06-20 13:16:55 -06:00
2026-04-27 12:58:26 +01:00
2024-08-22 15:40:53 +10:00
2026-07-09 07:40:42 -07:00
2026-05-13 14:59:33 -05:00
2026-07-09 07:40:42 -07:00
2026-06-02 10:46:40 +00:00
2026-07-09 07:40:42 -07:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-07-15 12:16:25 -08:00
2026-06-11 09:06:07 +10:00
2026-06-03 15:30:37 -04:00
2026-04-27 12:58:26 +01:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2026-01-08 15:24:11 +04:00
2026-06-22 19:26:34 -06:00
2026-06-22 12:15:27 -06:00
2026-06-22 19:26:34 -06:00
2025-06-20 13:16:55 -06:00
2025-03-26 01:56:39 -05:00
2026-08-13 18:32:47 +02:00
2026-08-13 18:32:47 +02:00
2026-03-05 09:35:57 -08:00
2026-06-03 15:30:37 -04:00
2025-09-22 17:14:07 +04:00
2026-06-26 12:45:53 +01:00
2026-07-01 15:59:55 +03:00
2026-06-12 14:41:58 +10:00
2026-05-15 14:36:54 -07:00
2026-08-04 16:24:14 +10:00
2026-05-15 14:36:54 -07:00
2026-04-29 10:28:27 -07:00
2026-05-15 14:36:54 -07:00
2024-03-17 09:45:26 -05:00
2026-01-08 15:24:11 +04:00
2026-05-15 14:36:54 -07:00
2026-06-03 15:16:42 -04:00
2026-06-12 14:41:58 +10:00
2026-07-07 12:38:37 -07:00
2026-07-07 12:38:37 -07:00
2026-01-08 15:24:11 +04:00
2026-04-27 12:58:26 +01:00
2026-06-03 15:30:37 -04:00
2026-03-02 22:52:39 -05:00
2026-06-03 15:16:42 -04:00
2025-09-03 10:49:19 +04:00
2025-03-26 01:56:39 -05:00
2023-09-08 18:21:33 +00:00
2026-06-04 08:43:51 -06:00
2026-08-05 10:42:13 -07:00
2025-12-03 11:32:59 +02:00
2026-04-21 15:11:50 -05:00
2026-06-03 15:30:37 -04:00
2026-04-21 15:11:50 -05:00
2026-06-03 15:30:37 -04:00
2025-10-30 17:41:08 -06:00
2026-01-08 15:24:11 +04:00
2026-04-27 12:58:26 +01:00
2026-06-03 15:16:42 -04:00
2026-04-16 12:46:52 -04:00
2025-09-11 15:08:57 +02:00
2026-01-08 15:24:11 +04:00
2026-07-28 16:59:33 -07:00
2026-07-28 16:59:33 -07:00
2026-05-05 19:43:08 -06:00
2026-06-11 09:58:16 -06:00
2026-06-11 09:58:16 -06:00
2026-06-03 15:30:37 -04:00
2026-02-06 14:09:39 +11:00
2026-02-05 19:35:20 +11:00
2026-02-06 14:09:39 +11:00
2025-09-22 17:14:07 +04:00
2024-08-20 14:47:46 +10:00
2025-12-03 11:32:59 +02:00
2024-05-23 07:54:59 -10:00
2026-03-25 13:11:08 +11:00
2026-03-04 11:14:52 -07:00
2023-08-09 13:00:25 +02:00
2026-04-24 17:09:17 -04:00
2026-02-26 14:34:30 +01:00
2026-04-24 17:09:17 -04:00
2025-07-03 13:22:54 +10:00
2026-06-03 15:30:37 -04:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2026-06-25 15:41:09 -06:00
2026-06-05 14:33:15 +03:00
2025-10-06 08:56:43 +00:00
2025-12-03 11:32:59 +02:00
2026-03-03 08:47:34 +00:00
2025-12-03 11:32:59 +02:00
2023-08-18 18:55:43 +00:00
2026-01-08 15:24:11 +04:00
2025-03-26 01:56:39 -05:00
2026-06-03 15:30:37 -04:00
2026-04-27 12:58:26 +01:00
2024-03-17 09:45:26 -05:00
2026-06-03 15:30:37 -04:00
2026-01-08 15:24:11 +04:00
2026-06-03 15:30:37 -04:00
2026-04-27 12:58:26 +01:00
2026-05-21 16:51:34 +02:00
2026-07-08 11:12:53 +02:00
2026-07-28 16:59:33 -07:00
2025-06-20 13:16:55 -06:00
2026-06-03 15:30:37 -04:00
2026-04-27 12:58:26 +01:00
2026-07-28 14:37:29 -07:00
2026-07-28 14:37:29 -07:00
2026-07-28 14:37:29 -07:00
2026-07-14 15:30:36 -04:00
2026-06-05 14:33:13 -05:00
2026-06-02 08:36:01 -06:00
2026-06-16 13:26:04 -07:00
2026-06-23 11:37:33 -05:00
2026-06-23 11:37:33 -05:00
2026-03-04 20:26:03 -05:00
2026-06-03 15:30:37 -04:00
2026-01-08 15:24:11 +04:00
2024-03-17 09:45:26 -05:00
2026-07-15 14:39:45 +02:00
2026-08-10 14:43:16 -05:00
2026-06-23 11:58:00 -05:00
2026-06-23 11:58:00 -05:00
2026-06-03 15:30:37 -04:00
2026-04-27 12:58:26 +01:00
2024-03-15 13:16:36 +00:00
2024-03-15 13:16:36 +00:00
2026-06-03 15:16:42 -04:00
2026-01-08 15:24:11 +04:00
2026-06-03 13:21:45 +00:00
2023-07-20 12:05:39 +02:00
2026-06-25 15:41:09 -06:00
2023-07-20 12:05:39 +02:00
2026-06-05 16:08:20 +10:00
2026-06-03 15:30:37 -04:00
2026-04-27 12:58:26 +01:00
2025-03-26 10:36:53 +00:00
2025-03-26 10:36:53 +00:00
2026-02-23 22:46:17 -06:00
2026-04-27 12:58:26 +01:00
2026-04-27 12:58:26 +01:00
2026-07-16 13:00:32 +03:00
2026-07-16 13:00:32 +03:00
2026-07-16 13:00:32 +03:00
2025-11-28 08:33:50 +02:00
2026-06-17 13:01:57 +02:00
2025-11-28 08:33:50 +02:00
2026-05-27 12:33:39 +02:00
2026-06-17 13:01:57 +02:00
2026-06-17 13:01:57 +02:00
2026-05-14 14:45:20 +02:00
2026-06-17 13:01:57 +02:00
2025-11-25 15:24:25 +00:00
2025-11-25 15:24:25 +00:00
2026-06-03 15:30:37 -04:00
2026-01-08 15:24:11 +04:00
2026-06-03 15:30:37 -04:00
2025-12-03 11:32:59 +02:00
2026-03-07 01:36:03 +00:00
2026-02-02 15:50:09 +02:00
2026-06-03 15:30:37 -04:00
2026-02-13 14:21:31 +00:00
2026-06-03 15:30:37 -04:00
2026-02-17 16:24:13 +00:00
2026-07-14 11:48:31 +10:00
2026-05-25 19:14:29 +03:00
2026-03-12 08:33:09 -06:00
2026-03-12 08:33:09 -06:00
2026-07-14 11:48:31 +10:00
2026-02-17 16:24:13 +00:00
2026-08-06 14:45:38 +10:00
2026-08-06 14:45:38 +10:00
2026-06-03 15:30:37 -04:00
2026-01-08 15:24:11 +04:00
2026-08-06 14:45:38 +10:00
2026-08-06 14:45:38 +10:00
2026-06-02 08:05:26 -04:00
2026-03-23 23:19:23 +02:00
2026-06-03 15:30:37 -04:00
2025-12-03 11:32:59 +02:00
2026-06-03 15:30:37 -04:00
2025-12-03 11:32:59 +02:00
2026-06-03 15:30:37 -04:00
2025-09-22 17:14:07 +04:00
2026-06-03 15:30:37 -04:00
2025-10-03 10:20:06 -05:00
2025-07-24 16:44:36 +01:00
2025-12-15 11:26:41 -06:00
2025-09-22 17:14:07 +04:00
2026-06-03 15:30:37 -04:00
2026-02-19 09:31:12 +11:00
2026-03-06 00:04:09 +00:00
2026-07-14 13:39:58 -04:00
2026-06-03 15:30:37 -04:00
2026-04-27 12:58:26 +01:00
2026-06-03 15:30:37 -04:00
2026-07-28 21:05:50 +10:00
2026-07-28 21:05:50 +10:00
2025-09-22 17:14:07 +04:00
2025-04-15 18:30:20 -04:00
2025-09-22 17:14:07 +04:00
2026-06-03 15:30:37 -04:00
2025-12-03 11:32:59 +02:00
2026-03-19 15:14:00 +00:00
2026-03-18 22:10:04 +00:00
2026-03-18 22:10:04 +00:00
2023-10-10 11:14:20 +01:00
2026-01-08 15:24:11 +04:00
2025-06-20 13:16:55 -06:00
2025-03-26 01:56:39 -05:00
2025-06-20 13:16:55 -06:00
2026-01-08 15:24:11 +04:00
2026-01-08 15:24:11 +04:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2026-02-12 12:14:56 +01:00
2024-11-18 21:10:01 +10:00
2026-06-02 10:50:27 -04:00
2026-01-08 15:24:11 +04:00
2026-08-05 10:42:13 -07:00
2025-09-26 11:20:25 +01:00