Examples
Agent with an MCP server
Create mcp.toml beside the agent's agent.toml.
A local process over stdio:
[servers.files]
transport = "stdio"
command = "my-mcp-server"
args = ["--root", "/data"]
env = { API_TOKEN = "${MCP_API_TOKEN}" }A remote server over HTTP with a shared token:
[servers.crm]
transport = "http"
url = "https://mcp.example.com/mcp"
auth = { bearer = { token = "${CRM_TOKEN}" } }Tools arrive namespaced as mcp__files__read, mcp__crm__search, and so on, so two servers can
both expose a search without colliding.
For a large catalog, defer schemas behind tool search:
deferred_loading_threshold = 10000Next
- Connect an MCP server - the full guide.
- Per-user MCP access - when shared credentials are wrong.