Summary
The Managed Agents API (client.beta.agents / client.beta.sessions) connects to MCP servers using the SSE transport only. This is now a breaking incompatibility with MCP servers that have migrated to Streamable HTTP (the newer MCP transport) and dropped SSE support.
Affected provider: Apify
Apify deprecated their SSE endpoint on April 1, 2026 and now only supports Streamable HTTP at https://mcp.apify.com. Any Managed Agents session configured with the Apify MCP server now fails at initialization with:
MCP server 'apify' initialize failed: SSE data line is not valid JSON
The server is returning a 405 Method Not Allowed (or similar) for the SSE endpoint, which the agent's MCP client misparses as a JSON error.
Reproduction
Configure an agent with the Apify MCP server using a URL-type entry:
agent = client.beta.agents.create(
name="my-agent",
model="claude-opus-4-6",
system="...",
mcp_servers=[
{
"type": "url",
"name": "apify",
"url": "https://mcp.apify.com",
}
],
...
)
Start a session and send a message. The event stream will contain:
agent.mcp_tool_result → is_error=True
# "MCP server 'apify' initialize failed: SSE data line is not valid JSON"
The agent falls back to other tools (e.g. Firecrawl) and never uses Apify.
Expected behaviour
The Managed Agents MCP client should support Streamable HTTP transport (the current MCP spec) in addition to or instead of SSE, so that agents can connect to any spec-compliant MCP server regardless of which transport it uses.
Workaround
None available on the client side. Apify cannot be used with Managed Agents until Streamable HTTP is supported.
Note: Claude Code itself already supports Streamable HTTP MCP servers (via claude mcp add --transport http), so the transport implementation exists — it just hasn't been wired into the Managed Agents session layer yet.
Environment
anthropic Python SDK (latest)
- Managed Agents beta (
managed-agents-2026-04-01)
- MCP server:
https://mcp.apify.com (Streamable HTTP only as of 2026-04-01)
Summary
The Managed Agents API (
client.beta.agents/client.beta.sessions) connects to MCP servers using the SSE transport only. This is now a breaking incompatibility with MCP servers that have migrated to Streamable HTTP (the newer MCP transport) and dropped SSE support.Affected provider: Apify
Apify deprecated their SSE endpoint on April 1, 2026 and now only supports Streamable HTTP at
https://mcp.apify.com. Any Managed Agents session configured with the Apify MCP server now fails at initialization with:The server is returning a
405 Method Not Allowed(or similar) for the SSE endpoint, which the agent's MCP client misparses as a JSON error.Reproduction
Configure an agent with the Apify MCP server using a URL-type entry:
Start a session and send a message. The event stream will contain:
The agent falls back to other tools (e.g. Firecrawl) and never uses Apify.
Expected behaviour
The Managed Agents MCP client should support Streamable HTTP transport (the current MCP spec) in addition to or instead of SSE, so that agents can connect to any spec-compliant MCP server regardless of which transport it uses.
Workaround
None available on the client side. Apify cannot be used with Managed Agents until Streamable HTTP is supported.
Note: Claude Code itself already supports Streamable HTTP MCP servers (via
claude mcp add --transport http), so the transport implementation exists — it just hasn't been wired into the Managed Agents session layer yet.Environment
anthropicPython SDK (latest)managed-agents-2026-04-01)https://mcp.apify.com(Streamable HTTP only as of 2026-04-01)