@kaanha-ai/mcp
v1.8.1
Published
Kaanha AI MCP server and CLI — control your WhatsApp CRM from Claude Code, Codex CLI, Claude Desktop, or any terminal
Downloads
210
Maintainers
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
412 tools across 35 domains — the same set the hosted SSE transport serves, because both mount one registry.
| Area | Tools | |------|-------| | Ask AI | ask a grounded question about your workspace data | | Media | upload a file and get a mediaId (images, PDFs, docs) | | Contacts | search, get, create, update, notes | | Messaging | send text/image/video/doc/audio/location, send template | | Conversations | list, get, update status, takeover, resume | | Broadcasts | list, get, create, cancel | | Templates | list, create, delete | | AI Agents | list, get, create, update, delete, test | | Voice Agents | list, get, create, update, delete, outbound call, call history | | Phone Numbers | list provisioned numbers | | Orders | list, get, create, update, status, delete, order entry, held orders | | CRM — Deals | list, get, create, update, line items (add/remove) | | CRM — Tasks / Companies / Products / Suppliers | list, get, create, update | | Pipelines | get stages, create pipeline | | Custom Fields / Saved Views | list, create field, list views | | Custom Entities | list types, list/get/create/update records | | Import | stage a CSV, preview it, then execute — writes only on execute | | Knowledge Bases | list, create, upload a document, sync | | Forms & Appointments | list/get forms, read submissions, booking links, create/cancel appointments | | Sequences | list, create, enroll a contact | | Automations | list, create, toggle | | Reviews | list review / CSAT requests | | Groups | list, get, messages, send | | Trash | list, restore, purge | | Integrations | list, get, connection status | | Billing | plan, subscription, usage, start trial, redeem an LTD code | | Books | invoices, credit notes, expenses, payments, receivables / payables, ageing, GSTR-1, chart of accounts | | Analytics | message stats, platform health | | Payments | create payment link, list links | | Settings | business hours, Ask AI config, team, API keys, CRM integration, shipping, white-label + SMTP, notifications, reputation, lead mappings, IndiaMART, custom domain, Slack channel map, MCP servers, pipeline channels/ops, ops-channel routing | | Bulk | one request over up to 50,000 contacts / orders / products / companies / suppliers / custom records (conversations cap at 100) | | Search & Reporting | global search, audit log, account export, dashboard, pipeline forecast + velocity, deal stats, agent / revenue / CTWA analytics, contact timeline, company activity | | Voice provisioning | search, purchase and release numbers, telephony address, SIP credentials, carrier connections, number import | | Voice testing | test an agent, text-chat it, preview a voice, list / create / publish agent versions, read the manifest | | Connect (DC Bridge) | bridge status, device inventory and ban-protection quotas, history replay, group invite links, group participants |
Every tool runs as YOUR API key against the same REST API the web app uses, so role, plan and rate limits apply exactly as they do in the UI.
Quick start
1. Install
npm install -g @kaanha-ai/mcp2. Log in
kaanha-ai auth loginThis 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 7Claude Code integration
Register the MCP server so Claude Code can use every tool automatically:
# After running `kaanha-ai auth login`, the saved key is used automatically
claude mcp add kaanha -- npx @kaanha-ai/mcp serveThen 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 APPROVEDEnvironment 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 loginRequirements
- 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
Every tool, from the command line
The curated commands above cover the common paths. Underneath them, every MCP tool is also a CLI command, generated from the same registry both MCP transports mount — so a tool can never exist over MCP and be unreachable from a terminal.
kaanha-ai auth login # once, opens your browser
kaanha-ai auth status # shows WHICH ORG you are acting on — check this first
kaanha-ai api list # every tool, with its command name
kaanha-ai api describe books_delete_invoice
kaanha-ai api books-delete-invoice --invoice-id <ID>Flags come from each tool's own schema, so --help is always accurate:
kaanha-ai api list-custom-entity-types --help
kaanha-ai api list-custom-entity-types --include-inactiveNotes:
- The raw tool name works too.
api books_delete_invoiceandapi books-delete-invoiceare the same command, so anything copied out of MCP docs runs unchanged. - Booleans take a value.
--is-active true/--is-active false. A bare--is-activemeans true. --argsis the escape hatch for anything the flags cannot express (nested objects, arrays of objects). Explicit flags win over it:--args '{"lockDate":null}'.- Required arguments are checked before any network call, so you can learn a command's shape without credentials.
Worked examples
# Which entity types exist — including deactivated ones, which are
# invisible in the sidebar and every list page
kaanha-ai api list-custom-entity-types --include-inactive
kaanha-ai api update-custom-entity-type --id <ID> --is-active true
# Full Notion pull. WITHOUT --full this is INCREMENTAL and you get a delta
kaanha-ai api sync-notion-mapping --mapping-id <ID> --full true
# Which automation actions THIS org may use — reading existing rules tells you
# what is configured, not what is available
kaanha-ai api list-automation-actions
kaanha-ai api delete-automation --automation-id <ID>