chatwoot-mcp
This server exposes Chatwoot analytics and management data to AI assistants via MCP, mostly through read-only tools, with optional local DuckDB storage and Jev lead scoring.
Get account-level summaries: conversations, response times, resolution rate, CSAT, bot performance, and conversation traffic heat maps.
Monitor agents, teams, inboxes, and labels with performance metrics such as open/resolved conversations, response times, and CSAT.
List and search conversations, retrieve full conversation details and message histories.
Access Captain AI assistant metrics: overview, FAQ stats, resolution flow, resolution trends, and AI-generated conversation summaries.
Analyze CSAT responses and aggregated CSAT metrics with filters by period, rating, inbox, and team.
View real-time conversation counts and grouped metrics by team or agent.
Search contacts, get contact details, and view a contact's conversation history.
Generate advanced reports like inbox-label matrix and first-response-time distribution.
Sync a recent window of conversations/contacts/messages into a local DuckDB store and run read-only SQL queries.
Score leads by propensity to enroll using Jev, list hot leads, view lead profiles, and backtest lead scoring accuracy.
Provides read-only access to Chatwoot analytics and data, enabling tools to retrieve conversations, agent and inbox performance, team metrics, labels, CSAT responses, Captain AI insights, real-time metrics, and contact details.
Click on "Deploy 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., "@chatwoot-mcp Can you give me a summary of our support performance over the past week?"
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.
chatwoot-mcp
An MCP (Model Context Protocol) server that exposes Chatwoot analytics data to AI assistants. All tools are read-only, except chatwoot_get_conversation_summary which triggers a Captain LLM call on the Chatwoot server.
Features
39 MCP tools covering conversations, agents, inboxes, teams, labels, CSAT, Captain AI, real-time metrics, and contacts
Local DuckDB storage: sync a recent window of conversations/contacts/messages for offline analytics
Jev lead scoring: score contacts by propensity to enroll using Jev (TypeSafe System One) via OpenRouter, with built-in calibration
Configurable domain profile: generic defaults; map an account's own attribute keys, labels, stages and keywords via a gitignored JSON profile
Two transport modes: stdio for Claude Desktop, HTTP for claude.ai remote connector
Multi-tenant HTTP mode: each user provides their own Chatwoot credentials per request; each tenant gets an isolated DuckDB file
Dual output format:
markdown(human-readable) orjsonfor all toolsPeriod shortcuts: built-in ranges like
today,7d,30d,90dfor all time-series queries
Related MCP server: Secureframe MCP Server
Requirements
Python 3.11+
uv package manager
A Chatwoot account with API access
Installation
git clone https://github.com/minholi/chatwoot-mcp.git
cd chatwoot-mcp
uv syncConfiguration
Copy .env.example to .env and fill in your credentials:
cp .env.example .envCHATWOOT_URL=https://your-instance.chatwoot.com
CHATWOOT_ACCOUNT_ID=1
CHATWOOT_API_TOKEN=your_api_token_hereYour API token can be found in Chatwoot under Profile Settings → Access Token.
Local storage & lead scoring (optional)
The DuckDB sync and Jev lead scoring features are optional and configured separately:
# Per-tenant DuckDB files live under data/tenants/<hash>.duckdb
CHATWOOT_DB_DIR=./data
# Optional fixed path (overrides CHATWOOT_DB_DIR; useful for stdio single-tenant)
# CHATWOOT_DB_PATH=./data/chatwoot.duckdb
JEV_SYNC_MAX_PAGES=8000
JEV_SYNC_STOP_MARGIN=10
# Throttling — protects the Chatwoot instance during syncs
CHATWOOT_MAX_RPS=3
CHATWOOT_MAX_RETRIES=4
# Jev (TypeSafe System One) via OpenRouter — https://openrouter.ai
OPENROUTER_API_KEY=
OPENROUTER_BASE_URL=https://openrouter.ai
JEV_MODEL=typesafe/jev-1.13Typical flow:
chatwoot_sync_local_data— ingest a recent window into DuckDB.chatwoot_score_leads— compute features and call Jev per lead (billable, cheap).chatwoot_list_hot_leads/chatwoot_lead_scoring_report— consume the ranking.chatwoot_evaluate_lead_scoring— backtest against historical outcomes.
Long backfills: MCP clients time out on multi-minute tool calls, so large first-time syncs are better run as a detached CLI process calling
src.ingest.sync_all(...); the MCP tool is fine for small incremental refreshes. Requests are paced globally byCHATWOOT_MAX_RPSwith retry/backoff, and the DuckDB store is per-tenant and safe to re-run (upserts).
Domain profile (account-specific vocabulary)
Lead scoring relies on an account's own enrollment vocabulary. The tracked defaults are a generic example; supply a JSON profile to map the logical names to a real account's Chatwoot custom-attribute keys, labels, stages and keywords:
{
"institution_name": "Example University",
"attributes": {
"stage": "enrollment_stage",
"situation": "enrollment_status",
"course": "course_code",
"course_name": "course_name",
"modality": "modality"
},
"label_flags": {
"has_enrolled": { "exact": ["enrolled"] },
"has_no_response": { "prefix": ["no-response"] }
},
"keywords": { "kw_enroll": "enroll|register|sign up" }
}Point CHATWOOT_DOMAIN_CONFIG at the file (or set JEV_INSTITUTION_NAME to just
override the deployment name). Only the keys you provide are overridden; the rest
fall back to the defaults. Logical names are stable, so keep the profile out of
version control (the domain/ directory is gitignored).
Usage
Stdio mode (Claude Desktop)
Run the server directly — credentials come from the .env file:
uv run python main.pyTo integrate with Claude Desktop, add this to your claude_desktop_config.json:
{
"mcpServers": {
"chatwoot": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/path/to/chatwoot-mcp",
"env": {
"CHATWOOT_URL": "https://your-instance.chatwoot.com",
"CHATWOOT_ACCOUNT_ID": "1",
"CHATWOOT_API_TOKEN": "your_api_token_here"
}
}
}
}HTTP mode (claude.ai remote connector)
Start the server in HTTP mode:
uv run python main.py --transport http --port 8000Each request must include a composite key in the Authorization or X-API-Key header:
Authorization: Bearer https://your-instance.chatwoot.com|account_id|api_tokenThis allows multiple users to connect with their own credentials without server-side configuration.
Available endpoints:
Endpoint | Description |
| Service info |
| Health check |
| MCP protocol (stateless) |
Docker
docker compose up -dThe compose file reads from .env and runs in HTTP mode on http://127.0.0.1:8000 by default. Set MCP_HOST_PORT in .env to change the exposed port.
Available tools
Overview
Tool | Description |
| Account summary: conversation counts, response times, resolution rate, CSAT |
| Bot performance: handoffs, autonomous resolution rate, average response time |
| Heat map of conversation volume by hour and day of week |
Agents
Tool | Description |
| List all agents with ID, email, and availability status |
| Per-agent metrics: open/resolved conversations, response time, CSAT |
Conversations
Tool | Description |
| List conversations with filters (status, assignee, inbox, team, label) |
| Full-text search across conversations and messages |
| Full details of a specific conversation |
| Complete message history of a conversation |
Labels
Tool | Description |
| List all labels with ID, color, and description |
| Performance metrics for a specific label |
Inboxes
Tool | Description |
| List all inboxes (WhatsApp, email, widget, etc.) |
| Performance metrics for a specific inbox |
Teams
Tool | Description |
| List all teams |
| Performance metrics for a specific team |
Captain AI
Tool | Description |
| List AI assistants configured in the account |
| AI assistant performance metrics |
| FAQ usage and effectiveness statistics |
| Period-to-period comparison overview |
| Funnel of resolution steps |
| Resolution rate trend over time |
| AI-generated summary of a conversation (not read-only — triggers a Captain LLM call, billable) |
CSAT
Tool | Description |
| Survey responses with filters (period, rating, inbox, team) |
| Aggregated CSAT summary with breakdown by rating |
Real-time
Tool | Description |
| Real-time counts: open, unattended, unassigned, pending |
| Real-time conversations grouped by team or agent |
Contacts
Tool | Description |
| Search contacts by name, email, phone, or identifier |
| Full contact details |
| Conversation history of a contact |
Advanced reports
Tool | Description |
| Cross-distribution of conversations between inboxes and labels |
| Histogram of first-response-time distribution |
Local storage (DuckDB)
Tool | Description |
| Incrementally sync conversations/contacts/messages into the local DuckDB store |
| Row counts and sync cursors for the current tenant |
| Read-only SQL (SELECT/WITH) against the local store |
Lead scoring (Jev)
Tool | Description |
| Score leads by propensity to enroll with Jev (not read-only — billable OpenRouter calls) |
| Ranked scored leads with filters (band, course, modality, confidence) |
| Local features + latest Jev decision for a contact |
| Ranked lead-scoring report as a tool |
| Backtest persisted scores against historical outcomes (precision/recall/precision@K) |
Development
# Lint and format
uv run ruff check src/ main.py
uv run ruff format src/ main.py
# Run tests
uv run pytestLicense
MIT — see LICENSE.
Available Tools
30 toolschatwoot_get_agent_performanceARead-only
Returns performance metrics for a specific agent.
Includes: open and resolved conversations, average first response time,
average resolution time, and CSAT.
Args:
agent_id: Agent ID (use chatwoot_list_agents to get IDs).
period: Analysis period.
output_format: Output format.
Inputs: agent_id (required), period, output_format. Returns: result
chatwoot_get_bot_summaryBRead-only
Returns overall bot performance: handoffs, autonomous resolution rate, and average response time.
Args:
period: Analysis period.
output_format: Output format.
Inputs: period, output_format. Returns: result
chatwoot_get_captain_faq_statsBRead-only
Returns usage and effectiveness statistics for a Captain assistant's knowledge base (FAQ).
Args:
assistant_id: Assistant ID (use chatwoot_list_captain_assistants).
range: Analysis period in days or month (7, 30, 90, this_month, last_month).
output_format: Output format.
Inputs: assistant_id (required), range, output_format. Returns: result
chatwoot_get_captain_metricsBRead-only
Returns performance metrics for a Captain (AI) assistant.
Includes autonomous resolution rate, handoffs to humans, and FAQ usage.
Args:
assistant_id: Assistant ID (use chatwoot_list_captain_assistants).
period: Analysis period.
output_format: Output format.
Inputs: assistant_id (required), period, output_format. Returns: result
chatwoot_get_captain_overviewARead-only
Returns overview metrics for a Captain assistant with period-to-period comparison.
Args:
assistant_id: Assistant ID (use chatwoot_list_captain_assistants).
range: Analysis period in days or month (7, 30, 90, this_month, last_month).
output_format: Output format.
Inputs: assistant_id (required), range, output_format. Returns: result
chatwoot_get_captain_resolution_flowARead-only
Returns the conversation resolution funnel for a Captain assistant (steps to resolution).
Args:
assistant_id: Assistant ID (use chatwoot_list_captain_assistants).
range: Analysis period in days or month (7, 30, 90, this_month, last_month).
output_format: Output format.
Inputs: assistant_id (required), range, output_format. Returns: result
chatwoot_get_captain_resolution_trendARead-only
Returns the resolution rate trend for a Captain assistant over time.
Args:
assistant_id: Assistant ID (use chatwoot_list_captain_assistants).
range: Analysis period in days or month (7, 30, 90, this_month, last_month).
output_format: Output format.
Inputs: assistant_id (required), range, output_format. Returns: result
chatwoot_get_contactARead-only
Returns the full details of a specific contact.
Args:
contact_id: Contact ID (use chatwoot_search_contacts to get IDs).
output_format: Output format.
Inputs: contact_id (required), output_format. Returns: result
chatwoot_get_contact_conversationsARead-only
Returns the full conversation history of a specific contact.
Args:
contact_id: Contact ID (use chatwoot_search_contacts to get IDs).
output_format: Output format.
Inputs: contact_id (required), output_format. Returns: result
chatwoot_get_conversationCRead-only
Returns the full details of a specific conversation.
Args:
conversation_id: Conversation ID.
output_format: Output format.
Inputs: conversation_id (required), output_format. Returns: result
chatwoot_get_conversation_messagesCRead-only
Returns the complete message history of a conversation.
Args:
conversation_id: Conversation ID.
output_format: Output format.
Inputs: conversation_id (required), output_format. Returns: result
chatwoot_get_conversation_trafficARead-only
Returns a conversation traffic heat map (hour × day of week).
Useful for identifying peak hours and staffing teams appropriately.
Args:
period: Analysis period.
output_format: Output format.
Inputs: period, output_format. Returns: result
chatwoot_get_csat_metricsBRead-only
Returns the aggregated CSAT summary: total responses, breakdown by score, and response rate.
Args:
period: Analysis period.
inbox_id: Filter by a specific inbox.
team_id: Filter by a specific team.
output_format: Output format.
Inputs: period, team_id, inbox_id, output_format. Returns: result
chatwoot_get_csat_responsesARead-only
Returns customer satisfaction survey (CSAT) responses.
Enables qualitative analysis of support quality based on customer feedback.
Args:
period: Analysis period.
rating: Filter by score (1 to 5). None = all scores.
inbox_id: Filter by a specific inbox.
team_id: Filter by a specific team.
page: Results page.
output_format: Output format.
Inputs: page, period, rating, team_id, +2 more. Returns: result
chatwoot_get_first_response_distributionBRead-only
Returns a histogram of first response time distribution.
Allows identifying which time range most first responses fall into.
Args:
period: Analysis period.
output_format: Output format.
Inputs: period, output_format. Returns: result
chatwoot_get_inbox_label_matrixARead-only
Returns the conversation distribution between inboxes and labels (inbox × label matrix).
Useful for understanding which channels generate which types of conversations.
Args:
period: Analysis period.
inbox_ids: Filter by specific inboxes (list of IDs; use chatwoot_list_inboxes).
label_ids: Filter by specific labels (list of IDs; use chatwoot_list_labels).
output_format: Output format.
Inputs: period, inbox_ids, label_ids, output_format. Returns: result
chatwoot_get_inbox_performanceBRead-only
Returns performance metrics for a specific inbox.
Args:
inbox_id: Inbox ID (use chatwoot_list_inboxes to get IDs).
period: Analysis period.
output_format: Output format.
Inputs: inbox_id (required), period, output_format. Returns: result
chatwoot_get_label_performanceARead-only
Returns performance metrics for a specific label.
Allows quantitative analysis of conversations by category/tag.
Args:
label_id: Label ID (use chatwoot_list_labels to get IDs).
period: Analysis period.
output_format: Output format.
Inputs: label_id (required), period, output_format. Returns: result
chatwoot_get_live_grouped_metricsBRead-only
Returns real-time conversations grouped by team or agent.
Args:
group_by: Group by team (team_id) or agent (assignee_id).
team_id: Filter by a specific team (optional).
output_format: Output format.
Inputs: team_id, group_by, output_format. Returns: result
chatwoot_get_live_metricsBRead-only
Returns real-time conversation counts: open, unattended, unassigned, and pending.
Args:
output_format: Output format.
Inputs: output_format. Returns: result
chatwoot_get_summaryARead-only
Returns the account summary: conversations, response times, resolution rate, and CSAT.
Args:
period: Analysis period (today, yesterday, 7d, 15d, 30d, 90d).
output_format: Output format — markdown (default) or json.
Inputs: period, output_format. Returns: result
chatwoot_get_team_performanceBRead-only
Returns performance metrics for a specific team.
Args:
team_id: Team ID (use chatwoot_list_teams to get IDs).
period: Analysis period.
output_format: Output format.
Inputs: team_id (required), period, output_format. Returns: result
chatwoot_list_agentsARead-only
Lists all agents in the account with ID, email, and availability status.
Args:
output_format: Output format.
Inputs: output_format. Returns: result
chatwoot_list_captain_assistantsARead-only
Lists all Captain (AI) assistants configured in the account.
Args:
output_format: Output format.
Inputs: output_format. Returns: result
chatwoot_list_conversationsBRead-only
Lists conversations with filters by status, assignee, inbox, team, and label.
Args:
status: Conversation status (open, resolved, pending, snoozed, all).
assignee_type: Filter by assignment type (me, assigned, unassigned, all).
inbox_id: Inbox ID to filter by (use chatwoot_list_inboxes).
team_id: Team ID to filter by (use chatwoot_list_teams).
label: Label to filter by (use chatwoot_list_labels to see available labels).
page: Results page (25 per page).
output_format: Output format.
Inputs: page, label, status, team_id, +3 more. Returns: result
chatwoot_list_inboxesBRead-only
Lists all inboxes (channels) in the account: WhatsApp, email, widget, etc.
Args:
output_format: Output format.
Inputs: output_format. Returns: result
chatwoot_list_labelsARead-only
Lists all labels in the account with ID, color, and description.
Labels are used to tag and categorize conversations.
Args:
output_format: Output format.
Inputs: output_format. Returns: result
chatwoot_list_teamsCRead-only
Lists all teams in the account.
Args:
output_format: Output format.
Inputs: output_format. Returns: result
chatwoot_search_contactsARead-only
Searches contacts by name, email, phone, or identifier.
Args:
query: Text to search (name, email, phone, or identifier).
page: Results page.
output_format: Output format.
Inputs: query (required), page, output_format. Returns: result
chatwoot_search_conversationsARead-only
Searches conversations and messages by text.
Args:
query: Text to search across conversations and messages.
page: Results page.
output_format: Output format.
Inputs: query (required), page, output_format. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 30 tools
Each tool has a clearly distinct purpose: list vs. get vs. search, and per-entity performance metrics are separated by resource (agent, inbox, team, label, captain). Even the Captain analytics tools (FAQ stats, overview, resolution flow, resolution trend) are differentiated by their focus, reducing selection ambiguity.
All tools follow a strict chatwoot_<verb>_<noun> pattern with consistent verbs (get, list, search). The naming is uniform across all 30 tools, making the API predictable and easy to navigate.
At 30 tools, the server is on the heavier side, but the breadth of Chatwoot's feature set (agents, inboxes, teams, labels, contacts, conversations, CSAT, Captain AI, live metrics, analytics) justifies the count. Each tool covers a distinct aspect, so the number feels appropriate for a comprehensive analytics-focused MCP.
The server is strong for read-only analytics and reporting, covering the main entities and metrics. Minor gaps exist: no single-entity detail tools beyond list (e.g., get_inbox, get_team), and no write operations, but that aligns with its apparent reporting purpose. The core lifecycle of querying and analyzing data is well covered.
Maintenance
Related MCP Connectors
Read-only Google Search Console and Google Analytics for AI agents.
Read conversations and contacts; add replies or notes, set status and assign in Chatwoot.
Amazon Ads, Seller Central, Vendor Central and AMC data for AI agents. Read-only by default.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides AI assistants with read access to Clamp analytics data including pageviews, visitors, referrers, and custom events. Enables traffic analysis, conversion funnel evaluation, and metric alerts through natural language queries.3357 npm2MIT
- AlicenseNot gradedqualityFmaintenanceProvides AI assistants with read-only access to Secureframe's compliance data, enabling querying of security controls, tests, users, vendors, and more across frameworks like SOC 2 and ISO 27001.8MIT
- AlicenseNot gradedqualityDmaintenanceExposes the full Chatwoot API as 129 tools for AI assistants, enabling account, contact, conversation, message, inbox, team, report, help center, automation, and custom attribute management, plus exclusive Kanban and scheduled message features.5 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to query internal business data for insights into customers, revenue, subscriptions, sales, and churn through controlled, read-only MCP tools.-