JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 84
  • Score
    100M100P100Q111068F
  • License MIT

Kaanha AI MCP server and CLI — control your WhatsApp CRM from Claude Code, Codex CLI, Claude Desktop, or any terminal

Package Exports

  • @kaanha-ai/mcp

Readme

@kaanha-ai/mcp

Control your Kaanha AI WhatsApp CRM from Claude Code, OpenAI Codex CLI, Claude Desktop, or any terminal — no browser required after the first login.

What you can do

50+ tools covering every platform capability:

Area Tools
Contacts search, get, create, update, notes
Messaging send text/image/video/doc/audio/location, send template
Conversations list, get, update status, mark read, get history
Broadcasts list, get, create, cancel
Templates list, create, delete
AI Agents list, get, create, update, delete, test, takeover, resume
Voice Agents list, get, create, update, delete, outbound call, call history
Phone Numbers list provisioned numbers
CRM — Deals list, get, create, update, line items (add/remove)
CRM — Tasks list, create, update
CRM — Companies list, get, create, update
CRM — Products list, get, create, update
CRM — Suppliers list, create
Pipeline get stages
Automations list, toggle
Custom Fields list by entity type
Knowledge Bases list, sync
Settings business hours, Ask AI config, team, usage, plan
Analytics message stats, connection status, platform health
Payments create payment link, list links

Quick start

1. Install

npm install -g @kaanha-ai/mcp

2. Log in

kaanha-ai auth login

This opens your browser to app.kaanha.ai/cli-auth. Sign in, click Authorize, and you're done. A revocable CLI credential is saved to ~/.kaanha/config.json automatically.

Access requirements: CLI authorization requires an Owner account on a Starter plan or above. If you see a 403 error, check that you are logged in as the workspace Owner and that your workspace is on a paid plan.

3. Use it

# Try it immediately
kaanha-ai contacts list
kaanha-ai analytics --days 7

Claude Code integration

Register the MCP server so Claude Code can use all 50+ tools automatically:

# After running `kaanha-ai auth login`, the saved key is used automatically
claude mcp add kaanha -- npx @kaanha-ai/mcp serve

Then prompt Claude naturally:

"Send a WhatsApp message to +91 98765 43210 telling them their order is ready" "List all open conversations and assign the oldest one to Priya" "Create a broadcast to all contacts tagged VIP using the sale_announcement template" "Update my voice agent's system prompt to be more concise" "Show me analytics for the last 30 days"

OpenAI Codex CLI integration

After running kaanha-ai auth login, add the stdio server to your Codex config:

[[mcp_servers]]
name = "kaanha"
command = "npx"
args = ["@kaanha-ai/mcp", "serve"]

Claude Desktop integration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "kaanha": {
      "command": "npx",
      "args": ["@kaanha-ai/mcp", "serve"]
    }
  }
}

Interactive CLI

# Auth
kaanha-ai auth login              # opens browser
kaanha-ai auth status
kaanha-ai auth logout

# Contacts
kaanha-ai contacts list --search "John"
kaanha-ai contacts get <id>
kaanha-ai contacts create --phone +91xxxxxxxxxx --name "Priya" --tags vip,customer
kaanha-ai contacts notes <id>
kaanha-ai contacts add-note <id> "Called back, interested in Pro plan"

# Messaging
kaanha-ai send +91xxxxxxxxxx "Hello! Your order has shipped."

# Conversations
kaanha-ai conversations list --status OPEN
kaanha-ai conversations list --search "Priya"
kaanha-ai conversations get <id>
kaanha-ai conversations messages <id>
kaanha-ai conversations resolve <id>

# Broadcasts
kaanha-ai broadcasts list
kaanha-ai broadcasts create --name "Summer Sale" --template <id> --tags vip --send-now
kaanha-ai broadcasts create --name "Weekly Update" --template <id> --schedule 2026-06-01T09:00:00Z

# AI Agents
kaanha-ai agents list
kaanha-ai agents get <id>
kaanha-ai agents test <id> "What are your business hours?"
kaanha-ai agents update <id> --active false

# Voice Agents
kaanha-ai voice list
kaanha-ai voice get <id>
kaanha-ai voice update <id> --welcome "Hi, this is Ria from Kaanha. How can I help?"
kaanha-ai voice update <id> --llm anthropic --model claude-haiku-4-5-20251001
kaanha-ai voice update <id> --tts elevenlabs --voice <voice-id>
kaanha-ai voice update <id> --hangup-after 30 --interruption 0.5
kaanha-ai voice call <agentId> +91xxxxxxxxxx
kaanha-ai voice calls <agentId>
kaanha-ai voice phones

# CRM — Deals
kaanha-ai crm deals --stage Proposal
kaanha-ai crm create-deal --title "Acme Corp Pro" --value 4900 --stage Proposal

# CRM — Tasks
kaanha-ai crm tasks --status OPEN

# CRM — Companies
kaanha-ai crm companies --search "Acme"

# CRM — Products & Suppliers
kaanha-ai crm products --search "Widget"
kaanha-ai crm create-product --name "Widget Pro" --price 4900 --stock 100
kaanha-ai crm suppliers

# Settings & Billing
kaanha-ai settings status
kaanha-ai settings plan
kaanha-ai settings usage
kaanha-ai settings team
kaanha-ai settings kbs
kaanha-ai settings sync-kb <kbId>
kaanha-ai settings health

# Analytics
kaanha-ai analytics --days 30

# Templates
kaanha-ai templates list --status APPROVED

Environment variables

Variable Description
KAANHA_BASE_URL Override API base URL (default: https://app.kaanha.ai)

White-label / custom domain

If your workspace runs on a custom domain (e.g. crm.acmecorp.com), you don't need to do anything special. Your CLI credential works through app.kaanha.ai regardless — it is workspace-scoped and domain-independent.

KAANHA_BASE_URL only matters in the rare case your team needs requests routed through your branded domain for network/proxy reasons:

KAANHA_BASE_URL=https://crm.acmecorp.com kaanha-ai auth login

Requirements

  • Node.js 18 or higher
  • A Kaanha AI account on Starter plan or above (Free plan does not include API access)
  • Your account must have the Owner role in the workspace — Admin/Agent/Viewer accounts cannot create or use CLI keys