demo-redshift-mcp
Provides CrewAI agents with customer migration analysis capabilities, including querying renewal counts, customer churn, competitor returns, feature adoption, and migration summaries from stored customer data.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@demo-redshift-mcpHow many customers renewed into the new product?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Insurance Customer Migration Analysis POC
A production-grade proof-of-concept demonstrating customer migration analysis using:
Data Layer: Mock legacy (Excel) + new product (CSV) + competitor data
MCP Server: Data access tools exposed to CrewAI agents
CrewAI: Query router + analysis agents for multi-step reasoning
Gradio UI: Executive-friendly natural language interface
Architecture
Executive Question
↓
Gradio UI
↓
CrewAI Router Agent (query understanding)
↓
CrewAI Analysis Agent (data fetching + insights)
↓
MCP Tools (GetRenewedCount, GetLeftCount, etc.)
↓
Data Layer (pandas + Excel/CSV queries)
↓
Response formatted for executivesRelated MCP server: Database MCP Server
Setup
1. Install Dependencies
# Install using uv (recommended)
uv sync
# OR using pip
pip install -r requirements.txt2. Environment Setup
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY3. Generate Mock Data
python -m demo_redshift_mcp.data_generatorThis creates:
data/legacy_product.xlsx- 900 legacy customersdata/new_product_customers.csv- 100 new product customersdata/competitor_coverage.csv- Competitor history
Running the Application
Web UI (Recommended)
# Launch Gradio interface
python -m demo_redshift_mcp
# Opens at http://localhost:7860Command Line (Testing)
python -c "
from src.demo_redshift_mcp.crew_agents import run_customer_migration_analysis
result = run_customer_migration_analysis('How many customers renewed?')
print(result)
"Sample Questions for Executives
"How many customers renewed into the new product?"
Returns: Count + percentage of migration success
"How many customers left and went to competitors?"
Returns: Count + breakdown by status (ACTIVE/EXPIRED/CANCELLED)
"How many came back from competitors and why?"
Returns: Return count + reasons (price, features, etc.)
"What's the overall migration summary?"
Returns: Comprehensive analysis of all segments
"Tell me about customers in California"
Returns: State-specific metrics
"Who adopted the CONNECTED feature?"
Returns: Feature adoption breakdown
Project Structure
demo-redshift-mcp/
├── src/demo_redshift_mcp/
│ ├── app.py # Gradio UI entry point
│ ├── crew_agents.py # CrewAI agents + workflow
│ ├── mcp_server.py # MCP tools definition
│ ├── data_layer.py # Data access logic
│ ├── data_generator.py # Mock data generation
│ └── __init__.py
├── data/ # Generated mock data
│ ├── legacy_product.xlsx
│ ├── new_product_customers.csv
│ └── competitor_coverage.csv
├── INSURANCE_POC_ARCHITECTURE.md
├── pyproject.toml
└── .envKey Design Decisions
Data Separation (Excel vs CSV)
Legacy: Excel (simulates existing systems)
New: CSV in "Redshift" (simulates cloud OLAP)
Reason: Tests cross-store join logic early
MCP Over Direct Queries
Clean abstraction between data and reasoning
Production-ready: swap CSV with Redshift later
Agents stay focused on reasoning, not plumbing
Template + Dynamic Fallback
Fast path: pre-defined queries for common questions
Flexible path: CrewAI creates logic for edge cases
Soft inference: combine pricing + feature signals to explain why customers returned
Next Steps
Phase 1: Data ✅
Mock data generation (900 legacy, 100 new, competitor coverage)
Phase 2: MCP ✅
Data access tools (GetRenewedCount, GetLeftCount, etc.)
Phase 3: CrewAI ✅
Query router + analysis agents
Phase 4: Testing
Run sample questions and verify accuracy
Test edge cases
Phase 5: UI ✅
Gradio interface for executives
Future Enhancements
Replace CSV with actual AWS Redshift
Add state-level dashboards
Export reports as PDF/Excel
Add historical trend analysis
Deploy as FastAPI endpoint
Troubleshooting
"Module not found" error
# Ensure you're in the right directory
cd /Users/Balu/Documents/Projects/MyCode/demo-redshift-mcp
# Reinstall dependencies
uv sync"Data not found" error
# Generate mock data
python -m demo_redshift_mcp.data_generatorCrewAI errors
Ensure ANTHROPIC_API_KEY is set in .env
Check that you have Claude 3.5 Sonnet (or later) access
Development
Adding a New Query Tool
Add method to
DataLayer(data_layer.py)Wrap it in
InsuranceMCPTools(mcp_server.py)Create CrewAI @tool wrapper (crew_agents.py)
Update routing logic in analysis_task
Testing Locally
from src.demo_redshift_mcp.data_layer import DataLayer
data = DataLayer()
result = data.customers_renewed()
print(result)License
Internal POC - Not for production use without proper data governance.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables management of insurance claims, inspections, and contractors through interactive UI widgets and data tools. Users can view claim dashboards, update statuses, and query service provider information using natural language.
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely interact with multiple databases (MySQL, PostgreSQL) via natural language queries, with cross-database querying and enterprise-grade security.15MIT
- FlicenseNot gradedqualityBmaintenanceProvides retrieval-augmented generation for insurance claims, enabling search, clause retrieval, and governed tool-calling over policy documents using local LLM (Ollama).
- FlicenseNot gradedqualityBmaintenanceExposes a governed semantic layer built on dbt Core and DuckDB, enabling AI agents to query predefined metric definitions for a P&C insurance dataset. Prevents metric hallucination by restricting agents to governed tools and read-only data access.
Related MCP Connectors
Create and manage AI agents that collaborate and solve problems through natural language interacti…
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/balu7771/demo-redshift-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server