mcp-client / README.md
NickKuijpers's picture
readme
bc6cf13

A newer version of the Gradio SDK is available: 6.12.0

Upgrade
metadata
title: MCP Client Demo
emoji: 🤖
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false

MCP Client Demo

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.

Features

  • Connects to remote MCP servers
  • Uses HuggingFace Inference API for language models
  • Interactive chat interface powered by Gradio
  • Demonstrates tool usage through MCP protocol

How it works

  1. MCP Client: Connects to a remote MCP server to retrieve available tools
  2. AI Agent: Uses HuggingFace LLM to understand user requests and decide when to use tools
  3. Tool Execution: Calls tools from the MCP server to perform tasks
  4. Chat Interface: Provides a user-friendly interface to interact with the agent

Environment Variables

  • HF_TOKEN_MCP: Your HuggingFace API token for accessing the Inference API

Usage

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.

Example: "Prime factorization of 68"