Commit Graph

5 Commits

Author SHA1 Message Date
4aa45a5c43 fix(cli): modify exp mcp configure to also read claude API key from CLAUDE_API_KEY env (#17229)
Currently you have to set `CODER_MCP_CLAUDE_API_KEY`, which can be
obnoxious.
2025-04-03 09:45:17 +01:00
88bae05223 feat(cli): implement exp mcp configure claude-code command (#17195)
Updates `~/.claude.json` and `~/.claude/CLAUDE.md` with required
settings for agentic usage.
2025-04-01 20:06:42 +01:00
27d2343adf fix(cli): exp mcp: remove unnecessary cli flag (#17190) 2025-04-01 16:53:18 +01:00
1e11e823c9 fix(mcp): report task status correctly (#17187) 2025-04-01 15:02:08 +01:00
057cbd4d80 feat(cli): add coder exp mcp command (#17066)
Adds a `coder exp mcp` command which will start a local MCP server
listening on stdio with the following capabilities:
* Show logged in user (`coder whoami`)
* List workspaces (`coder list`)
* List templates (`coder templates list`)
* Start a workspace (`coder start`)
* Stop a workspace (`coder stop`)
* Fetch a single workspace (no direct CLI analogue)
* Execute a command inside a workspace (`coder exp rpty`)
* Report the status of a task (currently a no-op, pending task support)

This can be tested as follows:

```
# Start a local Coder server.
./scripts/develop.sh
# Start a workspace. Currently, creating workspaces is not supported.
./scripts/coder-dev.sh create -t docker --yes
# Add the MCP to your Claude config.
claude mcp add coder ./scripts/coder-dev.sh exp mcp
# Tell Claude to do something Coder-related. You may need to nudge it to use the tools.
claude 'start a docker workspace and tell me what version of python is installed'
```
2025-03-31 18:52:09 +01:00