Spaces:
Sleeping
Sleeping
Commit ·
bc6cf13
1
Parent(s): af34e94
readme
Browse files
README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: MCP Client Demo
|
| 3 |
+
emoji: 🤖
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "4.44.1"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# MCP Client Demo
|
| 13 |
+
|
| 14 |
+
A demonstration of Model Context Protocol (MCP) client using smolagents. This application connects to a remote MCP server and uses AI agents to interact with tools.
|
| 15 |
+
|
| 16 |
+
## Features
|
| 17 |
+
|
| 18 |
+
- Connects to remote MCP servers
|
| 19 |
+
- Uses HuggingFace Inference API for language models
|
| 20 |
+
- Interactive chat interface powered by Gradio
|
| 21 |
+
- Demonstrates tool usage through MCP protocol
|
| 22 |
+
|
| 23 |
+
## How it works
|
| 24 |
+
|
| 25 |
+
1. **MCP Client**: Connects to a remote MCP server to retrieve available tools
|
| 26 |
+
2. **AI Agent**: Uses HuggingFace LLM to understand user requests and decide when to use tools
|
| 27 |
+
3. **Tool Execution**: Calls tools from the MCP server to perform tasks
|
| 28 |
+
4. **Chat Interface**: Provides a user-friendly interface to interact with the agent
|
| 29 |
+
|
| 30 |
+
## Environment Variables
|
| 31 |
+
|
| 32 |
+
- `HF_TOKEN_MCP`: Your HuggingFace API token for accessing the Inference API
|
| 33 |
+
|
| 34 |
+
## Usage
|
| 35 |
+
|
| 36 |
+
Simply type your questions or requests in the chat interface. The agent will use available tools from the MCP server to help answer your questions.
|
| 37 |
+
|
| 38 |
+
Example: "Prime factorization of 68"
|