Chatwoot MCP Server
An MCP server that lets AI assistants manage Chatwoot conversations and messages through Chatwoot API tools.
List and filter conversations by status, assignee, and inbox, with pagination and markdown or JSON output.
Retrieve full details for a specific conversation, including contact, assignee, labels, custom attributes, and message statistics.
Change a conversation’s status to open, resolved, pending, or snoozed, optionally setting a snooze-until timestamp.
List all messages in a conversation with sender information, timestamps, attachments, and private-note flags.
Send outgoing or incoming messages and create private internal notes in a conversation.
Provides tools for integrating with the Chatwoot API to manage customer conversations and messages, including listing and retrieving conversations, reading message history, sending messages or internal notes, and toggling conversation status.
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 Server show me all open conversations in account 3"
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 Server
Model Context Protocol (MCP) server for Chatwoot API integration. Enables AI assistants to manage customer conversations, messages, and contacts in Chatwoot.
Features
Conversations Management: List, filter, and retrieve conversation details
Message Operations: Read message history, send new messages, and delete messages
Type-Safe: Built with TypeScript using OpenAPI-generated types
Flexible Auth: Supports both API token (recommended) and JWT authentication
Related MCP server: @indica-facil/mcp-chatwoot
Tools Provided
Conversations
chatwoot_list_conversations- List conversations with filtering (status, assignee, inbox)chatwoot_get_conversation- Get detailed info for a specific conversation
Messages
chatwoot_list_messages- List all messages in a conversationchatwoot_create_message- Send a message or create an internal notechatwoot_delete_message- Permanently delete a message and its attachments
Installation
npm install
npm run buildConfiguration
Recommended: API Access Token
The simplest method using your Chatwoot API token (no expiration).
Get your API token:
Log in to your Chatwoot account
Click your avatar → Profile Settings
Scroll to bottom → Copy your "Access Token"
Configure .env:
CHATWOOT_BASE_URL="https://your-chatwoot-instance.com"
CHATWOOT_API_TOKEN="your_api_token_here"Alternative: JWT Authentication
Use email/password if API tokens don't work on your instance (requires password for token refresh).
CHATWOOT_BASE_URL="https://your-chatwoot-instance.com"
CHATWOOT_EMAIL="your@email.com"
CHATWOOT_PASSWORD="your_password"Note: JWT tokens expire and require the password for auto-refresh.
Important for Self-Hosted Instances
If using nginx as reverse proxy (e.g., CapRover), add this to nginx config to support API tokens:
server {
...
underscores_in_headers on; # Required for api_access_token header
...
}Usage
Running the Server
npm startDevelopment Mode (with auto-reload)
npm run devUsing with Claude Code
claude mcp add chatwoot \
-e CHATWOOT_BASE_URL="https://your-instance.com" \
-e CHATWOOT_API_TOKEN="your_token" \
-- node /path/to/chatwoot-mcp-server/dist/index.jsUsing with Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"chatwoot": {
"command": "node",
"args": ["/path/to/chatwoot-mcp-server/dist/index.js"],
"env": {
"CHATWOOT_BASE_URL": "https://your-chatwoot-instance.com",
"CHATWOOT_API_TOKEN": "your_api_token"
}
}
}
}Example Queries
Once connected, you can ask Claude things like:
"Show me all open conversations in account 3"
"What are the details of conversation #123?"
"List all messages in conversation #456"
"Send a reply to conversation #789 saying 'Thank you for contacting us!'"
"Add an internal note to conversation #101 about the customer's issue"
Testing
Run integration tests:
npm testWatch mode:
npm run test:watchProject Structure
chatwoot-mcp-server/
├── src/
│ ├── index.ts # Main server entry point
│ ├── constants.ts # Shared constants
│ ├── chatwoot-types.ts # Generated OpenAPI types
│ ├── services/
│ │ ├── chatwoot-client.ts # API client with auth
│ │ ├── chatwoot-auth.ts # JWT authentication
│ │ ├── token-cache.ts # JWT token caching
│ │ └── error-handler.ts # Error handling utilities
│ ├── schemas/
│ │ └── common.ts # Shared Zod schemas
│ └── tools/
│ ├── conversations.ts # Conversation tools
│ └── messages.ts # Message tools
├── test/ # Integration tests
├── swagger.json # Chatwoot OpenAPI spec
└── package.jsonDevelopment
Regenerating Types
If the Chatwoot API changes, regenerate types:
npm run generate-typesAdding New Tools
Create a new file in
src/tools/Define Zod schemas for input validation
Implement the tool function
Register the tool in
src/index.ts
Building
npm run buildBuilds TypeScript to JavaScript in the dist/ directory.
Troubleshooting
API Token Returns 401
If using a self-hosted instance with nginx, ensure underscores_in_headers on; is set in your nginx config. This is required because api_access_token contains underscores.
JWT Tokens Expire
If using JWT authentication, tokens expire (typically after 2 weeks). Keep CHATWOOT_PASSWORD in .env for automatic refresh, or switch to API token authentication.
Tech Stack
TypeScript - Type-safe development
openapi-fetch - Type-safe API client
openapi-typescript - Generate types from OpenAPI spec
Zod - Runtime input validation
@modelcontextprotocol/sdk - MCP server framework
Vitest - Testing framework
License
MIT
Contributing
Contributions are welcome! Additional tools that could be added:
Contact management (create, update, search)
Team and agent operations
Inbox configuration
Labels and custom attributes
Reports and analytics
Bulk operations
Fork: local build for github.com/vivernet/chatwoot-mcp
This copy is a fork of chatwoot-mcp-server@1.0.0 (see UPSTREAM.md),
run from source instead of via npx, with one added tool.
Changes in this fork
New tool
chatwoot_toggle_status— changes a conversation status (open/resolved/pending/snoozed), including optionalsnoozed_until(Unix timestamp in seconds) for scheduled snooze. Implemented indist/tools/conversations.js+ registered indist/index.js; uses the stock ChatwootPOST /api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_statusendpoint (already present in the generated OpenAPI types).New tool
chatwoot_delete_message— permanently deletes a message and its attachments through Chatwoot'sDELETE /api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}endpoint. The tool is marked destructive and requires explicit human approval through the companionchatwoot-approvalplugin.Version bumped to
1.2.0;startscript runsnode dist/index.js.
Running locally (no npx)
node dist/index.jsNeeds the same env vars as upstream: CHATWOOT_BASE_URL plus either
CHATWOOT_API_TOKEN or CHATWOOT_EMAIL/CHATWOOT_PASSWORD.
Smoke test
python3 tests/mcp_smoke.py # stub HTTP backend; verifies status toggle and message deletionHermes Agent wiring
Hermes config.yaml → mcp_servers.chatwoot:
mcp_servers:
chatwoot:
command: node
args: ["/absolute/path/to/chatwoot-mcp-server/dist/index.js"]
env:
CHATWOOT_BASE_URL: ${env:CHATWOOT_BASE_URL}
CHATWOOT_EMAIL: ${env:CHATWOOT_EMAIL}
CHATWOOT_PASSWORD: ${env:CHATWOOT_PASSWORD}Companion approval plugin (guards chatwoot_create_message,
chatwoot_toggle_status, and chatwoot_delete_message behind the
human-approval gate): see the
chatwoot-approval Hermes plugin.
Available Tools
5 toolschatwoot_create_messageCreate Message in ConversationA
Create a new message in a Chatwoot conversation.
This tool sends a message in an existing conversation. Can be used for outgoing messages to customers or private internal notes.
Args:
account_id (number): The numeric ID of the Chatwoot account (required)
conversation_id (number): The ID of the conversation (required)
content (string): The message content (required)
message_type (string): Type of message - "outgoing" or "incoming" (default: "outgoing")
private (boolean): Whether this is a private internal note (default: false)
Returns: Created message details including ID and confirmation
Examples:
Send a reply: { account_id: 1, conversation_id: 123, content: "Thank you for contacting us!" }
Add internal note: { account_id: 1, conversation_id: 123, content: "Customer called for follow-up", private: true }
Inputs: content (required), account_id (required), conversation_id (required), private, +1 more.
chatwoot_get_conversationGet Chatwoot Conversation DetailsARead-onlyIdempotent
Get detailed information about a specific Chatwoot conversation.
This tool retrieves full details for a single conversation including contact info, assignee, labels, and custom attributes.
Args:
account_id (number): The numeric ID of the Chatwoot account (required)
conversation_id (number): The ID of the conversation to retrieve (required)
response_format (string): Output format - "markdown" or "json" (default: "markdown")
Returns: Full conversation details including:
Status, inbox, and metadata
Complete contact information
Assignee details
Labels and custom attributes
Message statistics
Examples:
Get conversation details: { account_id: 1, conversation_id: 123 }
Inputs: account_id (required), conversation_id (required), response_format.
chatwoot_list_conversationsList Chatwoot ConversationsARead-onlyIdempotent
List conversations from a Chatwoot account with filtering options.
This tool retrieves conversations from Chatwoot, allowing you to filter by status, assignee, and inbox. Supports pagination for large result sets.
Args:
account_id (number): The numeric ID of the Chatwoot account (required)
page (number): Page number for pagination, starts at 1 (default: 1)
status (string): Filter by conversation status - "open", "resolved", "pending", "snoozed", or "all" (default: "open")
assignee_type (string): Filter by assignee - "me", "unassigned", or "all" (optional)
inbox_id (number): Filter by specific inbox ID (optional)
response_format (string): Output format - "markdown" or "json" (default: "markdown")
Returns: A list of conversations with details including:
Conversation ID, status, and inbox
Contact information (name, email)
Assignee details
Message count and unread count
Last activity timestamp
Examples:
List all open conversations: { account_id: 1, status: "open" }
List unassigned conversations: { account_id: 1, assignee_type: "unassigned" }
List conversations in specific inbox: { account_id: 1, inbox_id: 5 }
Inputs: account_id (required), page, status, inbox_id, +2 more.
chatwoot_list_messagesList Messages in ConversationARead-onlyIdempotent
List all messages in a Chatwoot conversation.
This tool retrieves all messages from a specific conversation, including message content, sender information, timestamps, and attachments.
Args:
account_id (number): The numeric ID of the Chatwoot account (required)
conversation_id (number): The ID of the conversation (required)
response_format (string): Output format - "markdown" or "json" (default: "markdown")
Returns: List of messages with:
Message ID and content
Message type (incoming/outgoing)
Sender information (name, type)
Timestamp
Attachment information
Private flag (for internal notes)
Examples:
List all messages: { account_id: 1, conversation_id: 123 }
Inputs: account_id (required), conversation_id (required), response_format.
chatwoot_toggle_statusChange Conversation StatusADestructive
Change the status of a Chatwoot conversation (open/resolved/pending/snoozed).
This tool updates the conversation status. Use "snoozed" together with snoozed_until to schedule a reopen.
Args:
account_id (number): The numeric ID of the Chatwoot account (required)
conversation_id (number): The ID of the conversation (required)
status (string): Target status: open, resolved, pending or snoozed (required)
snoozed_until (number): Optional Unix timestamp (seconds) when a snoozed conversation reopens
Inputs: status (required), account_id (required), conversation_id (required), snoozed_until.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: listing conversations, getting one conversation, changing status, listing messages, and creating a message. The list/get and message read/write pairs are cleanly separated by scope and action.
All tools use the same chatwoot_ prefix and snake_case verb_noun pattern. The convention is predictable throughout, with only minor semantic looseness in 'toggle_status' since it sets rather than toggles.
Five tools is a compact, well-scoped set for conversation-centric Chatwoot workflows. Each tool earns its place without redundancy or excessive surface area.
The core conversation read/reply/status workflow is covered, but notable Chatwoot operations are absent: creating conversations, assigning agents, managing labels, and listing contacts or inboxes. These gaps will limit common support workflows.
Maintenance
Related MCP Connectors
Read conversations and contacts; add replies or notes, set status and assign in Chatwoot.
Read and answer support conversations, and run outbound email and chat sequences, from your AI.
Give AI agents secure access to RevDesk calling, SMS, phone numbers, caller IDs, and usage.
Access your Callin.io AI phone agents, call history and transcripts from any AI assistant.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to manage contacts, send messages, handle conversations, and manage workspace via the Respond.io API.28179 npmMIT
- 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.14 npmMIT
- AlicenseBqualityCmaintenanceProvides AI assistants with read-only access to Chatwoot analytics and operational data, including conversations, agents, inboxes, teams, CSAT, and real-time metrics.301MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to access and manage CRM data by creating contacts and companies, retrieving activities and conversations, and performing semantic search over previously retrieved information with built-in vector storage and caching.-