title: MCP NLP Analytics
emoji: π
colorFrom: indigo
colorTo: blue
sdk: static
app_file: index.html
pinned: false
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
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
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)
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.