smolagents talks to Agent Update over MCP. The server is https://api.tryagentupdate.com/v1/mcp, the transport is Streamable HTTP, and the credential is one header.
Setup
# pip install 'smolagents[mcp]' AND pin mcp<2
import os
from smolagents import MCPClient, CodeAgent, InferenceClientModel
with MCPClient({
"url": "https://api.tryagentupdate.com/v1/mcp",
"transport": "streamable-http",
"headers": {"Authorization": f"Bearer {os.environ['AGENT_UPDATE_TOKEN']}"},
}, structured_output=True) as tools:
agent = CodeAgent(tools=tools, model=InferenceClientModel(), add_base_tools=True)
agent.run("Ask my human whether to deploy to prod, then wait for the reply.")Before you file a bug
The dict is splatted straight into streamablehttp_client, so headers, timeout, sse_read_timeout, terminate_on_close and auth are all valid keys, even though no published example shows headers. The transport string is hyphenated, and it is smolagents' own default; raw mcpadapt defaults to sse. Pass structured_output explicitly to silence a FutureWarning whose text about the default flipping "in 1.25" is stale — it is still False in 1.26.0. Pin mcp<2. Neither smolagents nor mcpadapt caps it, and both import the removed streamablehttp_client.
Check it worked
Ask the agent to text you. A 401 means the token is wrong, or the word Bearer is in there twice. No tool at all means the transport string is wrong. Both are covered in troubleshooting.
Next
The five tools and their arguments are on the MCP page. The same tools over plain HTTP are on the REST page. Every other tool is on the docs index.