iMessage Advanced Insights MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
iMessage Advanced Insights - MCP Server
Transform your iMessage conversations into actionable insights about relationships and communication patterns. A privacy-first MCP server that enables Claude to analyze your messages locally.
Created by David Jelinek at Rally Venture Partners
π― What This Does
This MCP server gives Claude the ability to:
π Analyze relationship health and evolution
π― Identify optimal contact times
π Detect communication anomalies
π Track sentiment and conversation depth
π Map your social network structure
βοΈ Handle iCloud-stored messages intelligently
All analysis happens locally on your machine. No data ever leaves your computer.
Related MCP server: iMessage MCP Server
π Quick Start
1. Install the Server
# From PyPI (recommended)
pip install imessage-advanced-insights
# Or from source
git clone https://github.com/rallyventurepartners/iMessage_MCPServer_AdvancedInsights.git
cd iMessage_MCPServer_AdvancedInsights
pip install -e .2. Configure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"imessage-insights": {
"command": "python",
"args": ["-m", "imessage_mcp_server.main"]
}
}
}3. Grant Full Disk Access
Open System Settings β Privacy & Security β Full Disk Access
Add Terminal.app (or your terminal of choice)
Restart Terminal after granting access
4. Restart Claude Desktop
The tools will be available after restart. Grant consent when prompted.
π Privacy & Security
π Privacy Guarantee
β 100% Local Processing: No network connections, no telemetry
β Hashed Identifiers: All contacts SHA-256 hashed by default
β Consent Required: Explicit consent for each session (24hr expiry)
β Redaction by Default: PII automatically removed from outputs
β Preview Caps: Message previews limited to 160 characters
β Read-Only Access: Cannot modify or send messages
π‘ Use Cases & Example Prompts
Relationship Analysis
You: "Analyze my communication patterns with Sarah over the past 6 months"
Claude: I'll analyze your communication with Sarah. Let me check the patterns...
Based on 847 messages exchanged:
- Response time improved 45% (now averaging 12 minutes)
- Conversation depth increased with longer messages (+28%)
- Peak communication shifted from evenings to lunch hours
- Sentiment trending positive (+0.15 over 6 months)
- You initiate 58% of conversations (well balanced)Optimal Contact Timing
You: "When's the best time to reach John about work matters?"
Claude: Based on John's response patterns:
- **Best times**: Tue-Thu 10-11 AM (87% response rate within 30min)
- **Good times**: Mon/Fri 2-3 PM (72% response rate)
- **Avoid**: Evenings and weekends (<30% response rate)Communication Health Check
You: "How healthy are my closest relationships based on messaging patterns?"
Claude: Analyzing your top 5 contacts by message volume...
β
Strong indicators:
- Balanced conversation ratios (45-55% initiation)
- Consistent communication (no gaps >7 days)
- Positive sentiment trends in 4/5 relationships
β οΈ Areas to consider:
- Contact "hash:a3f2..." showing decreased frequency (-40%)
- Consider reaching out to reconnectNetwork Intelligence
You: "Who are the key connectors in my social network?"
Claude: Based on group chat analysis:
Key connectors (bridge multiple groups):
1. hash:b7c9... - Present in 8 different groups
2. hash:f2a1... - Connects work and personal circles
3. hash:d4e8... - Central to family communicationsAnomaly Detection
You: "Have there been any unusual communication patterns recently?"
Claude: Detected 3 anomalies in the past 30 days:
1. Unusual silence with hash:c8d2... (normally daily contact)
2. Spike in late-night messages (2-4 AM) last week
3. New contact with sudden high volume (possible spam/scam)Life Event Detection
You: "Can you identify any major life events from my conversation patterns?"
Claude: Potential life events detected:
- Mid-September: Surge in "congratulations" messages (possible achievement)
- October: Travel-related keywords spike (trip/vacation?)
- November: Increased family communication (+60%)Long-Term Analytics with Visualizations
You: "Show me my communication patterns with Sarah over the past 3 years with charts"
Claude: I'll analyze your 3-year communication history with Sarah and generate visualizations.
Based on 36 months of data (8,247 messages):
π Key Insights:
- Overall trend: Increasing (+2.3 messages/month average growth)
- Current average: 18.5 messages/day (up from 12.1 three years ago)
- Communication balance: Very healthy (52% you, 48% Sarah)
- Peak activity: Weekdays 7-9 PM, minimal on Sunday mornings
π Visualizations generated:
1. **Time Series Chart**: Shows steady growth with seasonal dips in August
2. **Communication Heatmap**: Most active Tue-Thu evenings
3. **Balance Chart**: Consistently balanced throughout the period
The relationship shows strong, sustained growth with excellent reciprocity.Multi-Contact Comparison
You: "Compare my messaging patterns across my top 5 contacts over 6 months"
Claude: Analyzing communication patterns across your top 5 contacts...
π Comparative Analysis (6 months):
1. Sarah: 3,421 messages (19.0/day) - Most active, very balanced
2. Work Team: 2,156 messages (11.9/day) - Weekday focused
3. Mom: 1,832 messages (10.2/day) - Evening calls trigger text follow-ups
4. John: 987 messages (5.5/day) - Declining trend (-30%)
5. College Group: 743 messages (4.1/day) - Burst pattern around events
Key Observations:
- Sarah represents 35% of your total messaging
- Work communications drop 95% on weekends
- Consider reaching out to John (declining engagement)
[Visualization shows overlaid time series for all 5 contacts]π οΈ Available MCP Tools
Core Tools (25 Total)
Note: Tools marked with * now include enhanced features like extended time periods (up to 36 months), visualizations, and time series data when requested.
Tool | Purpose | Privacy Level |
Consent Management | ||
| Request access permission | Required first |
| Verify active consent | No data access |
| Revoke access | Clears consent |
System Tools | ||
| Verify database access | No message access |
| Global statistics | Hashed contacts only |
| Resolve contact IDs | Hash mapping only |
Analysis Tools | ||
| Deep relationship analysis + visualizations* | Metadata only |
| Multi-dimensional quality scoring | Aggregated metrics |
| Compare multiple relationships | Patterns only |
| Topic extraction | Keywords only |
| Emotional pattern tracking | Scores only |
| Response pattern analysis | Timing only |
| Communication heatmaps + time series* | Frequency only |
Advanced Analytics | ||
| Optimal contact predictions | Pattern-based |
| Detect unusual patterns | Statistical only |
| Social network analysis | Structure only |
| Get message samples | Heavily redacted |
| Analyze group chat dynamics | Participation only |
| ML-powered future predictions | Pattern-based |
Cloud-Aware Tools | ||
| Check iCloud storage status | No message access |
| Adaptive querying | Confidence scores |
| Partial data analysis | Quality metrics |
ML-Powered Tools (Optional) | ||
| Natural language search | Requires ML deps |
| Emotion tracking | Requires ML deps |
| Topic discovery | Requires ML deps |
π Sample Outputs & Visualizations
Relationship Intelligence Output
{
"contact_id": "hash:a3f2b8c9",
"messages_total": 842,
"sent_pct": 56.2,
"median_response_time_s": 410,
"avg_daily_msgs": 2.9,
"streak_days_max": 23,
"last_contacted": "2025-08-18T22:14:03Z",
"engagement_score": 0.87,
"engagement_trend": "increasing",
"flags": ["balanced-communicator", "high-engagement"]
}Conversation Quality Score
{
"contact_id": "hash:def456",
"overall_score": 87.5,
"grade": "B+",
"trajectory": "improving",
"dimensions": {
"depth": {"score": 82.0, "insights": ["Ask more questions to deepen engagement"]},
"balance": {"score": 91.0, "insights": ["Great mutual engagement"]},
"emotion": {"score": 88.0, "insights": ["Express emotions more openly"]},
"consistency": {"score": 89.0, "insights": ["Very active communication - well done!"]}
},
"action_items": [
"Ask more questions to deepen engagement",
"Express emotions more openly",
"Your conversation quality is excellent - keep it up!"
]
}Relationship Comparison
{
"contacts_analyzed": 5,
"overview": {
"healthiest_relationship": "hash:abc123",
"highest_quality_score": 92.3,
"most_active_relationship": "hash:xyz789",
"average_quality_score": 78.6
},
"relationship_clusters": [
{
"type": "inner_circle",
"size": 2,
"members": ["hash:abc123", "hash:def456"],
"characteristics": ["High quality relationships", "Deep, meaningful conversations"]
},
{
"type": "regular_contact",
"size": 3,
"members": ["hash:ghi789", "hash:jkl012", "hash:mno345"],
"characteristics": ["Moderate quality relationships", "Well-balanced communication"]
}
],
"insights": {
"patterns": ["2 relationships in your inner circle", "Consistent relationship quality across contacts"],
"recommendations": ["Consider re-engaging with 1 dormant relationship"],
"strengths": ["Strong balance across relationships"]
}
}Group Dynamics Analysis
{
"group_id": "hash:work_team_chat",
"participant_count": 5,
"message_count": 1247,
"group_personality": "collaborative_active",
"dynamics": {
"participation": {
"balance_score": 0.78,
"roles": {
"most_active": "member_001",
"conversation_starters": ["member_001", "member_003"]
}
},
"influence": {
"key_members": {
"influencers": ["member_001", "member_002"],
"connectors": ["member_003"]
},
"network_density": 0.65
},
"health": {
"health_score": 84.2,
"inclusivity_score": 76.5,
"engagement_trend": "stable"
}
}
}Predictive Engagement Forecast
{
"contact_id": "hash:xyz789",
"predictions": {
"response_time": {
"best_times_to_contact": [
{"hour": 10, "day": "Tuesday", "response_time_minutes": 8.5},
{"hour": 14, "day": "Thursday", "response_time_minutes": 12.3}
],
"prediction_confidence": "high"
},
"activity_level": {
"current_daily_average": 4.2,
"predicted_daily_average": 3.8,
"trend": "stable"
},
"relationship_risk": {
"risk_level": "low",
"risk_score": 0.15
}
},
"engagement_strategies": {
"timing": ["Contact on Tuesday around 10:00 for fastest response"],
"frequency": ["Maintain current communication frequency"],
"warnings": []
}
}Enhanced Time Series Analysis
{
"contact_id": "hash:abc123",
"time_period": "36m",
"granularity": "monthly",
"total_messages": 15234,
"daily_average": 14.1,
"time_series": {
"primary": {
"2023-01": {"total": 412, "sent": 198, "received": 214},
"2023-02": {"total": 389, "sent": 201, "received": 188},
"2023-03": {"total": 445, "sent": 220, "received": 225}
}
},
"statistics": {
"mean": 415.3,
"median": 412.0,
"trend_direction": "increasing",
"weekly_pattern_strength": 0.32
},
"visualizations": {
"time_series_chart": "data:image/png;base64,iVBORw0KGgoAAAANS...",
"heatmap_chart": "data:image/png;base64,iVBORw0KGgoAAAANS...",
"balance_chart": "data:image/png;base64,iVBORw0KGgoAAAANS..."
}
}Visualization Examples
Communication Volume Over Time
The enhanced tools generate matplotlib/seaborn visualizations that show:
Time Series Trends: Message volume with rolling averages
Multi-Contact Comparison: Compare up to 5 contacts simultaneously
Granular Analysis: Hourly, daily, weekly, or monthly aggregations
Communication Heatmap
Hour-by-day heatmap showing when conversations typically occur
Message Balance Analysis
Sent vs received messages and communication balance over time
Relationship Dashboard
Comprehensive relationship metrics including volume, balance, and engagement scores
Sentiment Evolution
Tracking emotional tone across multiple relationships over time
Communication Heatmap
Hour-by-day visualization of message frequency patterns
Social Network Graph
Identifying key connectors and community clusters
Response Time Distribution
Understanding communication rhythms and expectations
π Performance & Scalability
Database Size | Health Check | Overview | Analysis | Memory Usage |
< 1 GB | < 50ms | < 200ms | < 500ms | < 100 MB |
1-10 GB | < 100ms | < 500ms | < 1s | < 250 MB |
10-50 GB | < 200ms | < 1s | < 2s | < 500 MB |
50+ GB | Use sharding | < 2s | < 5s | < 1 GB |
Performance Features:
Connection pooling with automatic retry
Query result caching (5 min TTL)
Streaming processing for large datasets
Automatic database sharding for 20GB+ databases
Memory monitoring with automatic limits
π§ Limitations & Troubleshooting
Known Limitations
macOS only (requires access to iMessage SQLite database)
Read-only access (cannot send or modify messages)
iCloud Messages: Limited local availability (use cloud-aware tools)
Group chats: Some metadata may be incomplete
Attachments: Not analyzed (privacy by design)
Common Issues
"Database not found" Error
# Verify database exists
ls -la ~/Library/Messages/chat.db
# Check Full Disk Access is granted
# System Settings β Privacy & Security β Full Disk Access"99% messages in iCloud"
# Check cloud status
python -m imessage_mcp_server.tools.cloud_aware --status
# Force download from iCloud
brctl download ~/Library/Messages/"No active consent"
Always request consent first in Claude:
"I need to analyze my messages, please request consent"Performance Issues
# Run optimization
python scripts/add_performance_indexes.py
# Enable sharding for large databases
python scripts/shard_large_database.py --db chat.dbπ§ Full Troubleshooting Guide β
π€ Contributing
We welcome contributions! Key areas:
π Privacy enhancements: Better redaction, anonymization
β‘ Performance: Query optimization, caching strategies
π§ Analytics: New insight algorithms, ML models
π Internationalization: Support for non-English analysis
π± Cross-platform: WhatsApp, Telegram integration
See CONTRIBUTING.md for guidelines.
π Documentation
Setup Guide - Detailed installation instructions
Tool Reference - Complete tool documentation
Cloud-Aware Tools - Handling iCloud storage
Large Database Guide - Performance optimization
Privacy & Security - Security architecture
π Roadmap
Real-time analysis dashboard
Export insights to PDF/CSV
Conversation coaching suggestions
Mental health indicators
Cross-platform message sources
Team/family analytics
π¨βπ» Credits
Created and maintained by David Jelinek at Rally Venture Partners
Author: David Jelinek (david@rvp.io)
Organization: Rally Venture Partners
Website: rvp.io
π License
MIT License - see LICENSE for details.
Copyright Β© 2025 David Jelinek / Rally Venture Partners / rvp.io
π Acknowledgments
Built on Model Context Protocol by Anthropic
Visualization libraries: Matplotlib, Seaborn, NetworkX
Privacy-preserving techniques from differential privacy research
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
iMessage for AI agents, from your iPhone. No Mac needed, and you choose which chats they read.
Claude and ChatGPT, connected to your iCloud Calendar, Mail, Contacts and Reminders.
Your Telegram, WhatsApp, Instagram, mail and calendar in Claude or ChatGPT. Never sends messages.
Hosted Apple Health MCP for Claude and ChatGPT, works outside the US. iPhone app, no local server.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to send and read iMessages on macOS, with smart contact lookup, message history retrieval, and cross-conversation search using natural language commands.6MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to read and search through iMessage, SMS, and RCS conversations, including mixed-protocol group chats with Android users. It decodes binary message data from the macOS Messages database to provide a comprehensive view of message history.MIT
- AlicenseAqualityDmaintenanceConnects Claude Desktop to iMessage on macOS, enabling reading conversations, searching messages, sending texts, and managing attachments.78 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to access and search local messages and contacts across multiple platforms (iMessage, Discord, Gmail, Slack) via a local-first datastore, ensuring data never leaves the Mac.MIT