Content
# MCP Sentiment Analysis Server
This project demonstrates how to build and deploy a Model Context Protocol (MCP) server using Gradio and Hugging Face Spaces.
## 🚀 Overview
The application performs sentiment analysis on text input using TextBlob and exposes it as an MCP-compatible tool. This allows both human users and AI agents to access the functionality.
## 🧠 Features
- Sentiment analysis (positive / negative / neutral)
- Gradio-based web interface
- MCP tool exposure for AI clients
- Public deployment on Hugging Face Spaces
## 🔗 Live Demo
- App: https://hashan-7-mcp-sentiment.hf.space
- MCP Schema: https://hashan-7-mcp-sentiment.hf.space/gradio_api/mcp/schema
## ⚙️ Tech Stack
- Python
- Gradio (with MCP support)
- TextBlob
- Hugging Face Spaces
## 📦 Installation (Local)
git clone https://github.com/hashan-7/mcp-sentiment-server.git
cd mcp-sentiment-server
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python app.py
## 🧩 MCP Tool
The server exposes the following MCP tool:
- sentiment_analysis → analyzes text sentiment
## 📌 Use Case
This project demonstrates:
- Building custom AI tools
- Exposing tools via MCP
- Deploying AI services to the cloud
- Enabling AI agents to discover and use tools dynamically
## 📄 License
MIT License