Skip to content

Commit 4e8a465

Browse files
committed
fix(agno): restore MCP functionality
Latest mcp-gateway no longer supports stdio over TCP. Since SSE doesn't seem to work on agno either, use streaming-http instead.
1 parent 204ab37 commit 4e8a465

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

agno/agent/playground.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ async def create_mcp_tools(tools_list: list[str], entity_type: str) -> list[Tool
7979
transport: str = ""
8080
if gateway_url.startswith("http://") or gateway_url.startswith("https://"):
8181
url = gateway_url
82-
transport = "sse"
83-
print(f"DEBUG: {entity_type} connecting to MCP gateway via SSE {url}")
82+
transport = "streamable-http"
83+
print(f"DEBUG: {entity_type} connecting to MCP gateway via streamable-http {url}")
8484
else:
8585
# Assume it's a TCP endpoint
8686
tcp_endpoint = gateway_url

agno/compose.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
- "7777:7777"
99
environment:
1010
# point agents at the MCP gateway
11-
- MCPGATEWAY_URL=mcp-gateway:8811
11+
- MCPGATEWAY_URL=http://mcp-gateway:8811
1212
volumes:
1313
# mount the agents file
1414
- ./agents.yaml:/agents.yaml
@@ -34,6 +34,7 @@ services:
3434
# use docker API socket to start MCP servers
3535
use_api_socket: true
3636
command:
37+
- --transport=streaming
3738
# securely embed secrets into the gateway
3839
- --secrets=/run/secrets/mcp_secret
3940
# add any MCP servers you want to use

0 commit comments

Comments
 (0)