Connect Claude Code or Codex
devboxes mcp gives Claude Code, Codex, or another MCP client the devboxes tools. Your agent can then do in devboxes what you can do. The MCP server reference lists the tools your agent gets.
Connect Claude Code
claude mcp add devboxes -- devboxes mcpRun /mcp in Claude Code to check that the devboxes server is connected.
Connect Codex
codex mcp add devboxes -- devboxes mcpConnect another MCP client
Configure the client to start the command devboxes with the argument mcp.
Tell your agent what to do
Describe the result you want, and the agent finds the operations. The how-to guides have prompts that work as they are, for example in Start and follow tasks.
Connect with limited access
To let an agent do only some things, give it a delegation token instead of your account. The token has fine-grained permissions and runs only the operations you grant, in one Organization. A token needs the operations of the Blueprint that it starts: publication.commit for a Blueprint that publishes, and the operations of its capabilities.
-
Create the delegation:
delegation.json { "organizationId": "<organization id>", "name": "Claude Code", "operations": [ "sessions.list", "sessions.inspect", "sessions.dispatch", "sessions.continue", "publication.commit" ], "expiresInSeconds": 28800 }devboxes invoke delegations.create --input @delegation.jsonexpiresInSecondssets how long the token works, here eight hours. Delegations lists the lifetimes you can choose. The result contains thetoken. devboxes shows it only once. -
Add devboxes to your agent with that token:
claude mcp add devboxes -e DEVBOXES_TOKEN=<token> -- devboxes mcpFor Codex, use
codex mcp addwith--envin place of-e.
If you already added devboxes with your account, remove it first with claude mcp remove devboxes or codex mcp remove devboxes.
When the delegation expires, create a new one and add the server again with the new token. To end a delegation early, revoke it with delegations.revoke.