Agno MCP server: give an Agno agent Sume's hosted tools
Connect an Agno agent to Sume's hosted MCP server with MCPTools, an API-key header, a tool allowlist, and timeout_seconds raised from 10.

To connect an Agno agent to a remote MCP server, create MCPTools with the server's url, pass auth in headers, and give it to the agent's tools; a URL makes Agno use the Streamable HTTP transport. For Sume's hosted MCP server that is url="https://mcp.sume.com/mcp" with your Sume API key in an Authorization: Bearer header, an include_tools allowlist, and timeout_seconds raised from its default of 10, because one Sume jobs_wait call can hold for 55 seconds.
Agno's side comes from its MCP overview, its Stripe MCP agent and Confirmation Required MCP Toolkit examples, and its server parameters page; Sume's side comes from MCP OAuth and API keys, MCP tools and gates, and Jobs and results, all read on 2026-09-28. Sume has no Agno package or plugin: this is Agno's own MCP client talking to Sume's remote server, and Sume's basics page says hosted MCP still works but is not part of the primary path today.
How do I connect an Agno agent to Sume's MCP server?
Install agno[mcp,openai], as Agno's Stripe example does for its OpenAI model, and use one MCPTools instance per server. That example, for Stripe's hosted server, passes a bearer key in headers and opens the connection with async with, which cleans up for you. Sume takes the same shape; leave transport to Agno's inference from the URL. Read the key from the environment, never from a prompt:
import asyncio
import os
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.tools.mcp import MCPTools
async def main() -> None:
async with MCPTools(
url="https://mcp.sume.com/mcp",
headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
include_tools=["tools_schema", "generate_image", "jobs_wait", "jobs_result"],
timeout_seconds=60,
) as sume:
agent = Agent(
model=OpenAIResponses(id="gpt-5.2"),
tools=[sume],
instructions="Call generate_image with dry_run=true before any real submit.",
)
await agent.aprint_response("Make a photo of a blue ceramic mug.", stream=True)
asyncio.run(main())Why raise timeout_seconds for Sume?
timeout_seconds is the MCP client read timeout in seconds, and it defaults to 10. Sume's jobs_wait holds one call open for at most 55 seconds, or 50 when its own timeout_seconds argument is omitted, so with Agno's default the client stops reading while Sume is still holding the wait. Set 60. A client-side timeout does not cancel a Sume job: it keeps running and billing, so raise the client timeout rather than submitting again. OpenAI Agents SDK MCP server covers the same trap with a 5-second default.
- Two settings share the name: Agno's
timeout_secondsonMCPTools, and thetimeout_secondsargument of Sume'sjobs_waittool. - If you connect with
server_params=StreamableHTTPClientParams(...)instead ofurl, itstimeoutfor HTTP operations defaults to 30 seconds andsse_read_timeoutto 5 minutes. Raisetimeoutabove 55 as well. - On
wait_slice_expired, the agent should calljobs_waitagain with the same ids and never resubmit the paid create. MCP tool call timeouts on long-running video jobs has the pattern.
Which Sume tools should the agent get?
include_tools and exclude_tools select from the tools Agno discovers. An API-key session sees Sume's full hosted tool set, write and paid tools included, so the allowlist is the narrowing you control. Sume's live tool ids use underscores; Sume MCP tools list groups them by read, write, and paid.
| `MCPTools` parameter | Agno default and purpose | For Sume |
|---|---|---|
url | None; the remote server endpoint | https://mcp.sume.com/mcp |
transport | Inferred: streamable-http when a URL is provided | Leave it inferred; never sse |
headers | None; static HTTP headers | Authorization: Bearer <key> or x-api-key |
include_tools | None; selects discovered tools | Only the Sume tools the task needs |
timeout_seconds | 10; the MCP client read timeout in seconds | 60, above the 55-second jobs_wait hold |
protocol_mode | "legacy", the session-based protocol | Keep the default: Sume's current server negotiates through initialize |
How do I make the agent ask before a paid Sume call?
Name the paid tools in requires_confirmation_tools on MCPTools; tool names are case-sensitive. In Agno's example the run pauses when the agent calls such a tool, and it continues only after your code answers each pending confirmation with requirement.confirm() or requirement.reject() and calls agent.acontinue_run(...). The example's agent also has a db.
- Sume's paid tools need an
idempotency_keyon every call.dry_run=truereturns an admission and cost preview without submitting the job, andmax_spend_usdcaps a call only when it is sent. - The agent writes those arguments itself, so they are not a limit your code enforces. The allowlist and the confirmation step are.
- Hosted MCP cannot read files from your laptop.
Sources
Related posts
More in Integrations
- Android Studio MCP server: add Sume to Gemini's agent
Add a remote MCP server to Gemini in Android Studio: enable MCP Servers, add Sume's httpUrl with an API-key header, and approve its tool calls.
- AnythingLLM MCP server: add Sume as a streamable server
Add Sume's hosted MCP server to AnythingLLM in anythingllm_mcp_servers.json with type streamable and a key header, then refresh Agent Skills.
- AutoGen MCP workbench: connect McpWorkbench to Sume
Use AutoGen's McpWorkbench with Sume's hosted MCP server: StreamableHttpServerParams, an API-key header, a 60-second timeout, and fewer tools.
- AWS Lambda maximum concurrency for SQS and AI API jobs
Lambda's SQS maximum concurrency caps how many instances one queue can invoke, from 2 to 1,000. How to set it so AI jobs stay within API limits.
Written by Sume