JSPM

  • Created
  • Published
  • Downloads 105
  • Score
    100M100P100Q101228F
  • License MIT

ThetaCoach CRM MCP Server - Claude AI integration for battle card sales methodology. Simple, direct connection to YOUR Supabase.

Package Exports

  • thetacoach-crm-mcp
  • thetacoach-crm-mcp/server.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (thetacoach-crm-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ThetaCoach CRM MCP Server

Claude AI integration for ThetaCoach CRM battle card sales methodology. Simple, direct connection to YOUR Supabase database.

Latest Features:

  • 🎉 crm-update-checklist tool - accepts simple string arrays
  • 🛠️ Globally unique checklist IDs prevent checkbox collision
  • 🔧 Automatic recovery from corrupted checklist data
  • ⚡ Auto-opens card URL in browser after crm-next
  • ✨ Auto-generates 3 checklist items per Challenger section
  • 📝 Complete battle card documentation with examples

🚀 Quick Start (30 seconds)

# 1. Install the MCP server
npm install -D thetacoach-crm-mcp

# 2. Register with Claude Code (one-time)
npx thetacoach-crm-mcp install

# 3. Restart Claude Code (only needed once)

# 4. Test it!
# In Claude Code, say: "List my CRM leads"

Done! Your CRM is now Claude-powered.

📋 MCP Tools Reference

crm-create-lead - Create New Lead

Creates a new lead with automatic default checklists (3 items per Challenger section).

Required fields:

  • email - Lead email (unique identifier)
  • name - Lead name

Optional fields:

  • company - Company name
  • phone - Phone number
  • role - Job title/role
  • score - Lead score 0-100 (default: 50)
  • stage - Sales stage (default: 'awareness')

Example:

Create CRM lead:
- email: john@acmecorp.com
- name: John Smith
- company: Acme Corp
- role: VP Engineering
- score: 75

What gets created automatically:

  • ✅ 3 Discovery checklist items
  • ✅ 3 Rational Drowning checklist items
  • ✅ 3 Emotional Impact checklist items
  • ✅ 3 Solution checklist items
  • ✅ 3 Commitment checklist items

crm-create-card / crm-update-card - Battle Card Notes

Update the Challenger methodology notes for a lead.

Fields you can update:

  • discovery_notes - Discovery phase findings
  • rational_notes - Rational drowning business case
  • emotional_notes - Emotional drivers and pain
  • solution_notes - Solution mapping
  • commitment_notes - Next steps and commitment
  • notes - General notes/transcript

Example:

Update battle card for john@acmecorp.com:

discovery_notes: "Revealed they spend 40hrs/quarter on audit prep. Current process is 100% manual. Frustrated with documentation gaps."

rational_notes: "3-year cost: $450K in labor @ $75/hr. Industry average for similar companies is 50+ compliance gaps (they think they have 5)."

emotional_notes: "Personal concern about being named if audit fails. Mentioned board scrutiny. Leaned in when discussing career impact."

solution_notes: "Showed FIM real-time compliance dashboard. His reaction: 'This changes everything.' Key objection: security approval."

commitment_notes: "Next meeting: Tuesday 2pm with CISO. Success metric: reduce audit prep to under 10hrs. Verbal yes to 30-day pilot."

crm-update-lead - Update Single Field

Update a single field on a lead (for checklist updates, see note below).

Example:

Update lead john@acmecorp.com:
- field: stage
- value: qualified

Note: To update checklists, use the web interface at https://thetacoach.biz/crm/cards - checklists are interactive and auto-save when you check/uncheck items.

crm-list-leads - List All Leads

List leads with optional filters.

Options:

  • stage - Filter by stage (awareness, qualified, etc.)
  • min_score - Minimum lead score
  • limit - Max results (default: 10)

Example:

List CRM leads with min_score 70

crm-get-lead - Get Lead Details

Get complete lead information including all battle card notes and checklists.

Example:

Get CRM lead john@acmecorp.com

crm-next - Next Lead

Get the next highest-priority lead.

Example:

Show me my next CRM lead

crm-sql - Advanced SQL

Execute raw SQL queries (advanced users only).

🎯 Default Checklists

Every new lead automatically gets 3 actionable checklist items for each Challenger stage:

🔍 Discovery

  • ☐ Ask about current compliance/audit process
  • ☐ Identify pain points and time spent
  • ☐ Get them to verbalize specific challenges

🧠 Rational Drowning

  • ☐ Calculate 3-year cost of current approach
  • ☐ Present industry data on scale/gaps
  • ☐ Get them to say the numbers out loud

❤️ Emotional Impact

  • ☐ Share story of similar company failure
  • ☐ Connect to their personal career risk
  • ☐ Watch for body language shift

✨ Solution

  • ☐ Present cloud product first
  • ☐ Show demo of specific pain point solution
  • ☐ Ask about barriers to adoption

🎯 Commitment

  • ☐ Schedule next meeting with specific date
  • ☐ Define success metrics together
  • ☐ Get verbal "yes" to pilot/next step

These appear automatically in the web interface at https://thetacoach.biz/crm/cards and are perfect for live call tracking.

📊 Database Schema

Leads Table

CREATE TABLE leads (
  id UUID PRIMARY KEY,
  email TEXT UNIQUE,
  name TEXT,
  phone TEXT,
  company TEXT,
  role TEXT,
  lead_score INTEGER DEFAULT 50,
  stage TEXT DEFAULT 'awareness',

  -- Challenger Section Notes (text)
  discovery_notes TEXT,
  rational_notes TEXT,
  emotional_notes TEXT,
  solution_notes TEXT,
  commitment_notes TEXT,
  notes TEXT,

  -- Challenger Section Checklists (JSONB arrays)
  -- Each is an array of {id, text, completed}
  discovery_checklist JSONB DEFAULT '[]'::jsonb,
  rational_checklist JSONB DEFAULT '[]'::jsonb,
  emotional_checklist JSONB DEFAULT '[]'::jsonb,
  solution_checklist JSONB DEFAULT '[]'::jsonb,
  commitment_checklist JSONB DEFAULT '[]'::jsonb,

  -- Additional fields
  product_positioning TEXT,
  outreach_a TEXT,
  outreach_b TEXT,

  -- Timestamps
  created_at TIMESTAMP WITH TIME ZONE,
  updated_at TIMESTAMP WITH TIME ZONE
);

Checklist JSONB Format

[
  {
    "id": "1234567890-abc123",
    "text": "Ask about current compliance/audit process",
    "completed": false
  },
  {
    "id": "1234567890-def456",
    "text": "Identify pain points and time spent",
    "completed": true
  }
]

🔄 Backfill Existing Leads

If you have existing leads without checklists, run:

# Option 1: Node script
node scripts/backfill-checklists.js

# Option 2: SQL script
psql -h your-supabase-host -d postgres -f scripts/backfill-checklists.sql

This adds default checklists to any leads with empty checklist arrays.

🏗️ Complete Example: Creating a Full Battle Card

# Step 1: Create the lead
Create CRM lead:
- email: sarah@techstartup.com
- name: Sarah Johnson
- company: TechStartup Inc
- role: CTO
- score: 80
- stage: awareness

# Step 2: Add battle card notes
Update battle card for sarah@techstartup.com:

discovery_notes: "Currently using manual spreadsheets for compliance tracking. Team of 5 spends 60+ hours per quarter on audit prep. Major pain point: can't prove hardware-level validation to EU auditors."

rational_notes: "Current cost: $90K/year in audit prep labor. Risk of €35M fine under EU AI Act. Competitors using automated validation have 70% faster audit cycles."

emotional_notes: "Personal concern: 'I don't want to be the CTO who gets us fined.' Board is asking pointed questions about compliance readiness. Visible stress when discussing upcoming audit."

solution_notes: "Showed FIM real-time dashboard. Key moment: 'Wait, this proves what our hardware actually did?' Objection: needs security team approval for cloud deployment."

commitment_notes: "Next meeting: Friday 10am with CISO and Security team. Success metric: pass audit with zero findings. Verbal yes to 30-day pilot in their VPC."

# Step 3: Check the boxes during the call
# (Done in the web UI at https://thetacoach.biz/crm/cards)

🎓 Challenger Methodology Integration

The CRM is designed around the Challenger Sale methodology:

  1. Warmer - Build rapport
  2. Reframe - Teach them something new about their business
  3. Rational Drowning - Quantify the problem (make it bigger)
  4. Emotional Impact - Make it personal (career/reputation risk)
  5. New Way - Present your solution as the clear alternative
  6. Your Solution - Map features to their specific pain
  7. Close - Lock in next steps and commitment

Each section has:

  • Notes field - For capturing details, quotes, insights
  • 3-item checklist - For live call tracking and methodology adherence

🔐 Security

  • Uses Supabase Row Level Security (RLS)
  • Service role key required (never exposed to client)
  • Credentials stored in .env.local (never committed to git)
  • Hot-reload enabled (no restart needed after first setup)

📝 Development

# Local development
cd mcp-server-crm
npm link

# Test the server
echo '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}' | node server.js

# Publish new version
npm version patch
npm publish

🐛 Troubleshooting

"Missing credentials" error

Make sure .env.local exists with:

CRM_SUPABASE_URL=https://xxxxx.supabase.co
CRM_SUPABASE_SERVICE_ROLE_KEY=eyJ...

Checklists not showing

  1. Check if leads have checklist data: Get CRM lead email@example.com
  2. If empty arrays, run backfill: node scripts/backfill-checklists.js
  3. New leads get checklists automatically on creation

MCP server not responding

  1. Restart Claude Code once after install
  2. Check credentials with: node -e "require('dotenv').config({path:'.env.local'}); console.log(process.env.CRM_SUPABASE_URL)"

📚 Learn More

📄 License

MIT © ThetaDriven Inc


Generated with Claude Code • Powered by Anthropic