Skip to content

Conversation

@ljupche98
Copy link

@ljupche98 ljupche98 commented Nov 18, 2025

This PR addresses #3938.

Description

When initializing an MCP client while creating a connection to an MCP server using SSE transport, an invalid argument (terminate_on_close) is passed. The argument is valid for streamable HTTP transport, but is not supported for SSE transport. This results in a crash when trying to run an agent that connects to an MCP server using SSE transport.

Changes

  • The terminate_on_close argument is no longer passed during the initialization of MCP's SSE transport

Note

Remove unsupported terminate_on_close arg from SSE client init to prevent crashes.

  • Fix:
    • Remove unsupported terminate_on_close argument when initializing mcp.client.sse.sse_client in lib/crewai/src/crewai/mcp/transports/sse.py, preventing SSE connection failures.

Written by Cursor Bugbot for commit 4a78ae1. This will update automatically on new commits. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant