CrewAI MCP server: connect an agent to Sume's tools
Give a CrewAI agent Sume's hosted MCP tools with MCPServerHTTP in the mcps field: a Bearer key header, a tool filter, and short jobs_wait slices.

To use an MCP server in CrewAI, add it to the agent's mcps list: a URL string for a quick setup, or an MCPServerHTTP config when you need headers and tool filtering. For Sume's hosted MCP server, use MCPServerHTTP with url="https://mcp.sume.com/mcp", your Sume API key in an Authorization: Bearer header, and a tool_filter that allows only the Sume tools the crew needs.
CrewAI's side comes from its MCP overview and MCP DSL Integration pages; 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 official CrewAI connector: CrewAI's own MCP client connects to Sume's remote server, and Sume's basics page says hosted MCP still works but is not part of the primary path today. To call Sume's REST API from a custom tool instead, see CrewAI video generation with a Sume Agent Completions tool.
How do I add Sume's MCP server to a CrewAI agent?
The mcps field needs the mcp library (uv add mcp). MCPServerHTTP takes a required url and optional headers, streamable (Streamable HTTP, True by default), tool_filter, and cache_tools_list:
- Skip the URL-string form for Sume. CrewAI's string examples carry credentials in the query string, while Sume's docs list two ways to send a key, both headers:
Authorization: Bearerorx-api-key. - Read the key from an environment variable, as CrewAI's DSL page advises for API keys.
import os
from crewai import Agent, Crew, Task
from crewai.mcp import MCPServerHTTP
from crewai.mcp.filters import create_static_tool_filter
sume = MCPServerHTTP(
url="https://mcp.sume.com/mcp",
headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
tool_filter=create_static_tool_filter(
allowed_tool_names=["tools_schema", "generate_video", "jobs_wait", "jobs_result"],
),
)
producer = Agent(
role="Video producer",
goal="Turn a brief into one short video with Sume",
backstory="Previews paid calls with dry_run=true first. Calls jobs_wait with "
"timeout_seconds 25 and repeats it until the job ends; never resubmits a paid create.",
mcps=[sume],
)
task = Task(description="A 5-second clip of waves at sunset.",
expected_output="The video URL", agent=producer)
print(Crew(agents=[producer], tasks=[task]).kickoff())Why keep jobs_wait under 30 seconds?
CrewAI's DSL page lists built-in timeouts for MCP operations, including a 30-second tool execution timeout. On Sume's remote MCP, jobs_wait defaults to 50 seconds and is capped at 55. A wait returns the moment its job is terminal, but a render still running holds the call for the whole slice, past CrewAI's limit.
So have the agent ask for a shorter slice, such as timeout_seconds 25 in the example's backstory, and call jobs_wait again with the same ids until the job ends. Never resubmit the paid create: a cut-off wait says nothing about the job, which keeps running and billing. MCP tool call timeouts on long-running video jobs covers the pattern.
| Setting | Value | Documented by |
|---|---|---|
| Tool execution timeout for MCP | 30 seconds | CrewAI |
jobs_wait slice when timeout_seconds is omitted | 50 seconds | Sume |
jobs_wait slice cap | 55 seconds | Sume |
Ids per jobs_wait call (job_ids) | 1–20 | Sume |
Which Sume tools should the crew see?
An API-key session sees Sume's full hosted tool set, paid tools included, and CrewAI's default tool_filter of None makes every tool available. create_static_tool_filter takes allow and block lists; name Sume's own tools, as CrewAI's filter examples name the server's tools. To prevent collisions, CrewAI prefixes tool names with the server name (its example turns search into mcp_exa_ai_search), so expect prefixed names in logs.
- Paid tools need an
idempotency_key;dry_run=truepreviews cost without submitting;max_spend_usdcaps a call only when it is sent. The model writes these arguments, so say in the backstory or task how to use them. - Sume MCP tools list groups every hosted tool by read, write, and paid.
What happens if the key is wrong or Sume is unreachable?
The crew keeps going without Sume. CrewAI logs connection failures as warnings and continues with the tools it has, logs authentication errors, and raises validation errors for invalid configurations when the agent is created. Sume answers a missing, malformed, or revoked key with 401, so check the logs before trusting a run that never called a Sume tool.
- Hosted MCP can't read files from your laptop.
Sources
Related posts
More in Integrations
- Crontab curl: call an API daily and escape the % sign
A crontab line runs curl with /bin/sh, and a bare % becomes a newline. Escape it as \%, use full paths, log the output, and key the request by date.
- Auto run MCP tools in Cursor: Run Modes and the allowlist
Cursor auto runs an MCP tool when it is on your allowlist or your Run Mode is Run Everything. How to set it, and which tools to keep on approval.
- How to add MCP to Devin: connect Sume's hosted server
Add a custom MCP server to Devin in Customize > MCPs: HTTP transport, Sume's hosted MCP URL, an Authorization header or OAuth, then Test tools.
- Dify MCP client: connect Sume's hosted MCP server
Dify connects to remote MCP servers from Integrations > Tools. Add Sume's hosted MCP by URL, then sign in with OAuth or send an API-key header.
Written by Sume