Sentiment Evolution Tracker

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.

Category
Visit Server

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:

Watch on YouTube

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)

  1. 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
    
  2. Populate demo data:

    python init_db.py
    python tools/populate_demo_data.py
    
  3. View dashboard:

    python tools/dashboard.py
    
  4. Generate HTML report:

    python tools/generate_report.py
    # Opens data/reporte_clientes.html in your browser
    
  5. Integrate with Claude Desktop:

    • Edit config/claude_desktop_config.json with your actual path
    • Restart Claude Desktop
    • Start the MCP server: python src/mcp_server.py
    • Now Claude can access all 7 sentiment analysis tools

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 customers
  • python tools\dashboard.py – terminal dashboard (Ctrl+C to exit)
  • python tools\generate_report.py – creates data/reporte_clientes.html
  • python 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, timestamps
  • conversations – every analysis entry, trend, predicted action, confidence
  • risk_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 checklist
  • docs/ARCHITECTURE.md – diagrams, module responsibilities, data flow
  • docs/HOW_TO_SAVE_ANALYSIS.md – practical guide for the save_analysis tool
  • docs/EXECUTIVE_SUMMARY.md – executive briefing for stakeholders
  • docs/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:

πŸ“– Technical Deep Dive

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_analysis workflow (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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured