Sentiment Evolution Tracker
An enterprise-ready MCP server that provides persistent sentiment analytics, churn prediction, and automated risk alerting for customer conversations. Enables Claude to track sentiment trends, detect at-risk customers, generate reports, and maintain historical context across interactions.
README
title: MCP NLP Analytics emoji: 📊 colorFrom: indigo colorTo: blue sdk: static app_file: index.html pinned: false tags:
- building-mcp-track-01
Sentiment Evolution Tracker – MCP Monitoring Stack
Sentiment Evolution Tracker is an enterprise-ready monitoring stack that runs as a Model Context Protocol (MCP) server. It combines local sentiment analytics, churn prediction, alerting, and reporting, and can operate standalone or alongside Claude Desktop as an intelligent assistant.
Why This Exists
Traditional "use Claude once and move on" workflows do not keep historical context, trigger alerts, or generate portfolio-level insights. Sentiment Evolution Tracker solves that by providing:
- Automated trend detection (RISING / DECLINING / STABLE)
- Churn probability scoring with configurable thresholds
- Persistent customer histories in SQLite
- Real-time alerts when risk exceeds 70%
- ASCII and HTML visualizations for demos and stakeholders
- Seven MCP tools that Claude (or any MCP-compatible LLM) can invoke on demand
🎥 Demo Video
A demo video (3-4 minutes) showing live sentiment analysis, risk detection, and MCP integration with Claude:
The video demonstrates:
- Live sentiment analysis of customer conversations
- Risk detection and churn prediction
- MCP tool invocation via Claude Desktop
- Real-time alerts and reporting
How to Use
Quick Start (5 minutes)
-
Clone and install:
git clone https://github.com/RubenReyesss/mcp-nlp-analytics.git cd mcp-nlp-server pip install -r requirements.txt python -m textblob.download_corpora python -m nltk.downloader punkt averaged_perceptron_tagger -
Populate demo data:
python init_db.py python tools/populate_demo_data.py -
View dashboard:
python tools/dashboard.py -
Generate HTML report:
python tools/generate_report.py # Opens data/reporte_clientes.html in your browser -
Integrate with Claude Desktop:
- Edit
config/claude_desktop_config.jsonwith your actual path - Restart Claude Desktop
- Start the MCP server:
python src/mcp_server.py - Now Claude can access all 7 sentiment analysis tools
- Edit
Installation
cd mcp-nlp-server
pip install -r requirements.txt
python -m textblob.download_corpora
python -m nltk.downloader punkt averaged_perceptron_tagger
Daily Operations
python init_db.py– rebuilds the database from scratch (reset option)python tools\populate_demo_data.py– loads deterministic demo customerspython tools\dashboard.py– terminal dashboard (Ctrl+C to exit)python tools\generate_report.py– createsdata/reporte_clientes.htmlpython src\mcp_server.py– launch the MCP server for Claude Desktop
MCP Tool Suite
| Tool | Purpose |
|---|---|
analyze_sentiment_evolution |
Calculates sentiment trajectory for a set of messages |
detect_risk_signals |
Flags phrases that correlate with churn or dissatisfaction |
predict_next_action |
Forecasts CHURN / ESCALATION / RESOLUTION outcomes |
get_customer_history |
Retrieves full timeline, sentiment, and alerts for a customer |
get_high_risk_customers |
Returns customers whose churn risk is above a threshold |
get_database_statistics |
Portfolio-level KPIs (customers, alerts, sentiment mean) |
save_analysis |
Persists a custom analysis entry with full metadata |
Data Model (SQLite)
customer_profiles– customer metadata, lifetime sentiment, churn risk, timestampsconversations– every analysis entry, trend, predicted action, confidencerisk_alerts– generated alerts with severity, notes, and resolution state
Database files live in data/sentiment_analysis.db; scripts automatically create the directory if needed.
Claude Desktop Integration
config/claude_desktop_config.json registers the server:
{
"mcpServers": {
"sentiment-tracker": {
"command": "python",
"args": ["src/mcp_server.py"],
"cwd": "C:/Users/Ruben Reyes/Desktop/MCP_1stHF/mcp-nlp-server"
}
}
}
Restart Claude Desktop after editing the file. Once connected, the seven tools above appear automatically and can be invoked using natural language prompts.
Documentation Map
docs/QUICK_START.md– five-minute functional checklistdocs/ARCHITECTURE.md– diagrams, module responsibilities, data flowdocs/HOW_TO_SAVE_ANALYSIS.md– practical guide for thesave_analysistooldocs/EXECUTIVE_SUMMARY.md– executive briefing for stakeholdersdocs/CHECKLIST_FINAL.md– submission readiness checklist
Tech Stack
- Python 3.10+
- MCP SDK 0.1+
- SQLite (standard library)
- TextBlob 0.17.x + NLTK 3.8.x
- Chart.js for optional HTML visualizations
📚 Documentation
For a comprehensive technical explanation of the NLP processing, architecture, and MCP integration, see:
This document covers:
- NLP & Processing: Why sentiment evolution tracking matters, hybrid scoring approach, and real business value
- Architecture Diagram: Complete system flow (Mermaid visualization)
- Technical Details: Model stack, tool implementations, database schema, scoring algorithms
- MCP Explained: What is MCP, why it matters, and how it gives Claude persistent memory
- Implementation Highlights: Trend detection, churn prediction, multilingual support
Status
- ✅ Production-style folder layout
- ✅ Deterministic demo dataset for the hackathon video
- ✅ Comprehensive English documentation
- ✅ Tests for the
save_analysisworkflow (tests/test_save_analysis.py) - ✅ Technical deep dive with NLP explanations and architecture diagrams
Run python tools\dashboard.py or open the generated HTML report to verify data before your demo, then start the MCP server and launch Claude Desktop to show the agentic workflow in real time.
Team
| Role | Contributor | GitHub |
|---|---|---|
| Developer | RubenReyesss | @RubenReyesss |
Track
This project is submitted to Track 1: Building MCPs (building-mcp-track-01).
It demonstrates a production-ready MCP server that extends Claude's capabilities with persistent analytics, risk prediction, and alerting—solving the limitation that Claude lacks memory, database writes, and automated monitoring.
📱 Social Media Post
Announcement on LinkedIn:
Read the full post on LinkedIn
Featured in: MCP 1st Birthday Hackathon
Resources
- GitHub Repository: https://github.com/RubenReyesss/mcp-nlp-analytics
- Hugging Face Space: https://huggingface.co/spaces/MCP-1st-Birthday/mcp-nlp-analytics
- Demo Video: https://youtu.be/h2tNu2KTPQk
- LinkedIn Post: https://www.linkedin.com/posts/rubenreyesparra_mcp-nlp-analytics-a-hugging-face-space-activity-7400976539959390208-SG3Q
Made with ❤️ for the Anthropic MCP 1st Birthday Hackathon
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。