mcp-client / app.py
Mohammad Haghir
server
fac8710
raw
history blame contribute delete
398 Bytes
import gradio as gr
from mcp.client.stdio import StdioServerParameters
from smolagents import InferenceClientModel, CodeAgent, ToolCollection
from smolagents.mcp_client import MCPClient
with MCPClient(
## Try this working example on the hub:
{"url": "https://mhea-mcp-sentiment.hf.space/gradio_api/mcp/sse"}
) as tools:
print("\n".join(f"{t.name}: {t.description}" for t in tools))