Update mcp_client.py
Browse files- mcp_client.py +3 -3
mcp_client.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
"""
|
2 |
-
This is
|
3 |
|
4 |
This script initializes a Gradio interface for an agent that uses tools from the MCP server.
|
5 |
It connects to the MCP server, retrieves available tools, and sets up a chat interface where users can interact with the agent.
|
@@ -15,7 +15,7 @@ from smolagents import InferenceClientModel, CodeAgent, MCPClient
|
|
15 |
try:
|
16 |
mcp_client = MCPClient(
|
17 |
{
|
18 |
-
"url": "
|
19 |
"transport": "sse"
|
20 |
}
|
21 |
)
|
@@ -29,7 +29,7 @@ try:
|
|
29 |
fn=lambda message, history: str(agent.run(message)),
|
30 |
type="messages",
|
31 |
title="Agent with MCP Tools",
|
32 |
-
description="
|
33 |
)
|
34 |
|
35 |
demo.launch()
|
|
|
1 |
"""
|
2 |
+
This is a Gradio MCP client that connects to my MCP server (mcp-rag-workflow).
|
3 |
|
4 |
This script initializes a Gradio interface for an agent that uses tools from the MCP server.
|
5 |
It connects to the MCP server, retrieves available tools, and sets up a chat interface where users can interact with the agent.
|
|
|
15 |
try:
|
16 |
mcp_client = MCPClient(
|
17 |
{
|
18 |
+
"url": "https://agents-mcp-hackathon-mcp-rag-workflow.hf.space/gradio_api/mcp/sse",
|
19 |
"transport": "sse"
|
20 |
}
|
21 |
)
|
|
|
29 |
fn=lambda message, history: str(agent.run(message)),
|
30 |
type="messages",
|
31 |
title="Agent with MCP Tools",
|
32 |
+
description="MCP Client build with Gradio to use (mcp-rag-workflow) MCP tools.",
|
33 |
)
|
34 |
|
35 |
demo.launch()
|