Skip to content
Changelog

MCPTools now accepts static auth headers

Community contributorLHMQ878

September 1, 20261 min read

We added a headers= argument to MCPTools. You can pass connect-time auth headers directly on the url= path for Streamable HTTP and SSE, without building a StreamableHTTPClientParams object first.

from agno.tools.mcp import MCPTools
 
mcp_tools = MCPTools(
    url="https://example.com/mcp",
    transport="streamable-http",
    headers={"Authorization": "Bearer ..."},
)

Before, passing headers meant constructing StreamableHTTPClientParams and threading it through. Now the common case, a static token or key, is one keyword argument.

Shipped around the same time