Summary
Allow any run_agent* tool to forward MCP server definitions into the agent's context, giving the agent access to external tools (databases, browsers, APIs) during its run.
Parameters added to all run_agent* tools
| param |
type |
description |
mcp_servers |
object |
Map of server name → {command, args} or {type: "http", url} |
Example
{
"prompt": "Open example.com and describe what you see",
"mcp_servers": {
"playwright": {"command": "npx", "args": ["@playwright/mcp@latest"]}
}
}
Files
src/tools.zig: add mcp_servers param to run_agent, run_agent_hooks, run_agent_subagents, run_agent_session schemas and handlers
src/agent_sdk.zig: serialize mcp_servers into query() mcpServers option
Summary
Allow any
run_agent*tool to forward MCP server definitions into the agent's context, giving the agent access to external tools (databases, browsers, APIs) during its run.Parameters added to all run_agent* tools
mcp_servers{command, args}or{type: "http", url}Example
{ "prompt": "Open example.com and describe what you see", "mcp_servers": { "playwright": {"command": "npx", "args": ["@playwright/mcp@latest"]} } }Files
src/tools.zig: addmcp_serversparam torun_agent,run_agent_hooks,run_agent_subagents,run_agent_sessionschemas and handlerssrc/agent_sdk.zig: serializemcp_serversinto query() mcpServers option