Configure an MCP server
Declare required MCP servers in the@agent decorator:
List Available Tools
ToolDefinition objects:
Call a Tool
Error Handling
Tool failures raiseToolCallError:
Real Example: Time Operations
Multiple MCP Servers
Environment Variables in MCP
Pass environment variables directly to MCP server processes:ctx.env, use the environment decorator field:
Stdio vs SSE Transport
Currently onlystdio transport is supported. sse (Server-Sent Events) is planned.
Tool Chaining
API Reference: ctx.tools
Full tools capability API reference
MCP Specification
Official MCP protocol documentation
MCP Servers Registry
Browse available MCP servers

