Spaces:
Runtime error
Runtime error
Download client.py from 22Nikk0/mcp-client: direct link, hf CLI and curl.
- Browser
- Download file 311 Bytes
-
https://huggingface.co/spaces/22Nikk0/mcp-client/resolve/main/client.py
- Command line
-
hf download hf://spaces/22Nikk0/mcp-client/client.py
-
curl -L -o client.py https://huggingface.co/spaces/22Nikk0/mcp-client/resolve/main/client.py
311 Bytes
| from smolagents.mcp_client import MCPClient | |
| with MCPClient( | |
| {"url": "https://abidlabs-mcp-tool-http.hf.space/gradio_api/mcp/sse", "transport": "sse",}, | |
| structured_output=True | |
| ) as tools: | |
| # Tools from the remote server are available | |
| print("\n".join(f"{t.name}: {t.description}" for t in tools)) | |