
pmas2016/mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
A prototype Customer Support chatbot for a company that sells computer products (monitors, printers, etc.).
Обзор
A prototype Customer Support chatbot for a company that sells computer products (monitors, printers, etc.). The chatbot integrates with an MCP (Model Context Protocol) server to provide real-time product information, order management, and customer support. - 🔐 : Secure login with email and PIN via MCP server - 🛍️ : Search and browse computer products with natural language queries - 📦 : View order history and track orders for authenticated customers - 💬 : Powered by Groq's Llama 3.1 8B Instant model (cost-effective) - 🔌 : Seamless integration with MCP server via Streamable HTTP (all 8 tools) - 🛡️ : User-friendly error messages with graceful error recovery - 💾 : In-memory session state for multi-turn conversations - 🎨 : Clean Gradio interface with intuitive login and chat experience The app will be available at http://localhost:7860 1. Create a new Space on HuggingFace Spaces 2. Upload all project files 3.
README
Показан фрагмент оригинального README. Открыть оригинал.
title: Customer Support Chatbot emoji: 🤖 colorFrom: blue colorTo: purple sdk: gradio sdk_version: 4.0.0 app_file: app.py pinned: false license: mit
Customer Support Chatbot
A prototype Customer Support chatbot for a company that sells computer products (monitors, printers, etc.). The chatbot integrates with an MCP (Model Context Protocol) server to provide real-time product information, order management, and customer support.
Features
- 🔐 Customer Authentication: Secure login with email and PIN via MCP server
- 🛍️ Product Search: Search and browse computer products with natural language queries
- 📦 Order Management: View order history and track orders for authenticated customers
- 💬 Natural Language Interface: Powered by Groq’s Llama 3.1 8B Instant model (cost-effective)
- 🔌 MCP Integration: Seamless integration with MCP server via Streamable HTTP (all 8 tools)
- 🛡️ Error Handling: User-friendly error messages with graceful error recovery
- 💾 Session Management: In-memory session state for multi-turn conversations
- 🎨 Modern UI: Clean Gradio interface with intuitive login and chat experience
Setup
Local Development
- Clone the repository:
git clone
cd customer-support-chatbot
- Install dependencies:
pip install -r requirements.txt
- Create a
.envfile:
cp .env.example .env
- Add your API keys to
.env:
MCP_SERVER_URL=https://vipfapwm3x.us-east-1.awsapprunner.com/mcp
GROQ_API_KEY=your_groq_api_key_here
- Run the application:
python app.py
The app will be available at http://localhost:7860
HuggingFace Spaces Deployment
- Create a new Space on HuggingFace Spaces
- Upload all project files
- Add environment variables in Space settings:
GROQ_API_KEY: Your Groq API keyMCP_SERVER_URL: https://vipfapwm3x.us-east-1.awsapprunner.com/mcp
- The Space will automatically build and deploy
Test Credentials
Use these test credentials to login:
| PIN | |
|---|---|
| [email protected] | 7912 |
| [email protected] | 1520 |
| [email protected] | 1488 |
| [email protected] | 2535 |
| [email protected] | 4582 |
| [email protected] | 4811 |
| [email protected] | 9279 |
| [email protected] | 1434 |
| [email protected] | 4257 |
| [email protected] | 9928 |
Usage
- Login: Enter your email and PIN to authenticate
- Browse Products: Ask questions like:
- “Show me available monitors”
- “Search for printers”
- “What is the price of MON-0054?”
- View Orders: After authentication, you can:
- “Show my orders”
- “What’s the status of my order?”
- “Get order details for [order-id]”
Architecture
- Frontend: Gradio (Python-based UI framework) - Fast deployment, perfect for demos
- LLM: Groq API with Llama 3.1 8B Instant (cost-effective flash model)
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →