@@ -20,7 +20,7 @@ Let's connect to an example MCP Server that is already running on Hugging Face.
2020from smolagents.mcp_client import MCPClient
2121
2222with MCPClient(
23- {" url" : " https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse" }
23+ {" url" : " https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse" , " transport " : " sse " , }
2424) as tools:
2525 # Tools from the remote server are available
2626 print (" \n " .join(f " { t.name} : { t.description} " for t in tools))
@@ -64,7 +64,7 @@ Next, we'll connect to the MCP Server and get the tools that we can use to answe
6464
6565``` python
6666mcp_client = MCPClient(
67- {" url" : " https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse" } # This is the MCP Client we created in the previous section
67+ {" url" : " https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse" , " transport " : " sse " , } # This is the MCP Client we created in the previous section
6868)
6969tools = mcp_client.get_tools()
7070```
@@ -115,7 +115,7 @@ from smolagents import InferenceClientModel, CodeAgent, MCPClient
115115
116116try :
117117 mcp_client = MCPClient(
118- {" url" : " https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse" }
118+ {" url" : " https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse" , " transport " : " sse " , }
119119 )
120120 tools = mcp_client.get_tools()
121121
@@ -152,7 +152,7 @@ To deploy your Gradio MCP client to Hugging Face Spaces:
152152
153153``` python
154154mcp_client = MCPClient(
155- {" url" : " https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse" }
155+ {" url" : " https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse" , " transport " : " sse " }
156156)
157157```
158158
0 commit comments