Chatwoot MCP Server
Manages customer conversations, reads and sends messages, and filters conversations by date range, status, assignee, inbox, and labels in Chatwoot.
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 list my open conversations"
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
A Model Context Protocol (MCP) server that connects AI assistants like Claude to your Chatwoot instance. Manage customer conversations, read messages, send replies, and filter by date ranges -- all through natural language.
Features
5 MCP Tools - List, filter, and inspect conversations; read and send messages
Advanced Filtering - Filter conversations by date range, status, assignee, inbox, and labels
Dual Authentication - API token (recommended) or JWT email/password
Type-Safe - Built with TypeScript and OpenAPI-generated types
Dual Output - Markdown (human-readable) and JSON (machine-readable) response formats
Related MCP server: aws-mcp
Tools
Tool | Description |
| List conversations with status, assignee, and inbox filters |
| Get full details for a specific conversation |
| List all messages in a conversation |
| Send a reply or create an internal note |
| Filter by date range, status, assignee, inbox, and labels |
Quick Start
Prerequisites
Node.js >= 18
A Chatwoot account with API access
Install
git clone https://github.com/mohnori/chatwoot-mcp.git
cd chatwoot-mcp
npm install
npm run buildConfigure
Copy the example environment file and fill in your credentials:
cp .env.example .envEdit .env:
CHATWOOT_BASE_URL="https://your-chatwoot-instance.com"
CHATWOOT_API_TOKEN="your_api_token_here"
CHATWOOT_ACCOUNT_ID="your_account_id_here"Getting your API token:
Log in to Chatwoot
Click your avatar → Profile Settings
Scroll to the bottom → copy your Access Token
Getting your account ID:
Your account ID is the number in the URL when you're logged in: app.chatwoot.com/app/accounts/<ID>/...
Run
npm startMCP Configuration
Claude Code
claude mcp add chatwoot \
-e CHATWOOT_BASE_URL="https://your-chatwoot-instance.com" \
-e CHATWOOT_API_TOKEN="your_api_token" \
-e CHATWOOT_ACCOUNT_ID="your_account_id" \
-- node /path/to/chatwoot-mcp/dist/index.jsReplace
/path/to/chatwoot-mcpwith the actual path where you cloned the repository.
Claude Desktop
Add to your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"chatwoot": {
"command": "node",
"args": ["/path/to/chatwoot-mcp/dist/index.js"],
"env": {
"CHATWOOT_BASE_URL": "https://your-chatwoot-instance.com",
"CHATWOOT_API_TOKEN": "your_api_token_here",
"CHATWOOT_ACCOUNT_ID": "your_account_id_here"
}
}
}
}Replace
/path/to/chatwoot-mcpwith the actual path where you cloned the repository. On Windows, use double backslashes:"C:\\Users\\you\\chatwoot-mcp\\dist\\index.js"
Environment Variables
Variable | Required | Description |
| Yes | Your Chatwoot instance URL (no trailing slash) |
| Yes | Your Chatwoot account ID (numeric) |
| Yes* | API access token (recommended method) |
| Yes* | Email for JWT auth (alternative method) |
| No | Password for JWT auth (needed for token refresh) |
*Either CHATWOOT_API_TOKEN or CHATWOOT_EMAIL is required.
Tools Reference
chatwoot_list_conversations
List conversations from an account with optional filters.
Parameter | Type | Required | Default | Description |
| string | No |
|
|
| string | No | - |
|
| number | No | - | Filter by inbox ID |
| number | No |
| Page number |
| string | No |
|
|
chatwoot_get_conversation
Get detailed information about a specific conversation.
Parameter | Type | Required | Description |
| number | Yes | Conversation ID |
| string | No |
|
chatwoot_list_messages
List all messages in a conversation.
Parameter | Type | Required | Description |
| number | Yes | Conversation ID |
| string | No |
|
chatwoot_create_message
Send a message or create an internal note in a conversation.
Parameter | Type | Required | Default | Description |
| number | Yes | - | Conversation ID |
| string | Yes | - | Message content |
| string | No |
|
|
| boolean | No |
|
|
chatwoot_filter_conversations
Filter conversations using advanced criteria. Uses Chatwoot's POST filter API with support for date ranges, status, assignee, inbox, and labels. Returns 25 results per page.
Parameter | Type | Required | Description |
| string | No | Created after this date (YYYY-MM-DD) |
| string | No | Created before this date (YYYY-MM-DD) |
| string | No | Last activity after this date (YYYY-MM-DD) |
| string | No | Last activity before this date (YYYY-MM-DD) |
| string | No |
|
| number | No | Filter by assignee agent ID |
| number | No | Filter by inbox ID |
| string | No | Filter by label name |
| number | No | Page number (default: 1) |
| string | No |
|
Date filter behavior: Date boundaries are exclusive. To get conversations for a single day like Feb 21, use date_from="2026-02-20" and date_to="2026-02-22".
Example Queries
Once connected, you can ask Claude things like:
"Show me all open conversations"
"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"
"Find all conversations created on Feb 21"
"Show me resolved conversations from last week with the label 'urgent'"
Development
Project Structure
chatwoot-mcp/
├── src/
│ ├── index.ts # MCP server entry point & tool registration
│ ├── constants.ts # Shared constants and enums
│ ├── chatwoot-types.ts # Auto-generated OpenAPI types
│ ├── services/
│ │ ├── chatwoot-client.ts # API client with auth middleware
│ │ ├── chatwoot-auth.ts # JWT authentication
│ │ ├── token-cache.ts # JWT token persistence
│ │ └── error-handler.ts # Error formatting utilities
│ ├── schemas/
│ │ └── common.ts # Shared Zod validation schemas
│ └── tools/
│ ├── conversations.ts # List & get conversation tools
│ ├── messages.ts # List & create message tools
│ └── filter-conversations.ts # Advanced conversation filtering
├── test/
│ ├── chatwoot-client.test.ts # Integration tests
│ ├── setup.ts # Test environment setup
│ └── unit/ # Unit tests (mocked, no API calls)
│ ├── error-handler.test.ts
│ ├── build-filter-payload.test.ts
│ ├── conversations.test.ts
│ ├── messages.test.ts
│ ├── filter-conversations.test.ts
│ ├── schemas.test.ts
│ ├── chatwoot-auth.test.ts
│ └── token-cache.test.ts
├── .env.example # Environment variable template
├── package.json
├── tsconfig.json
└── vitest.config.tsScripts
Command | Description |
| Compile TypeScript to |
| Run the compiled server |
| Run in development mode with auto-reload |
| Run integration tests |
| Run tests in watch mode |
| Remove the |
| Regenerate OpenAPI types from swagger.json |
Regenerating Types
If the Chatwoot API changes, download the latest OpenAPI spec and regenerate types:
Download
swagger.jsonfrom your Chatwoot instance at/swagger/v1/swagger.jsonPlace it in the project root
Run
npm run generate-types
Running Tests
Unit tests run without any credentials. Integration tests require a real Chatwoot instance:
# Unit tests only (no credentials needed)
npm test -- test/unit/
# All tests (requires .env with valid credentials)
cp .env.example .env
# Edit .env with your credentials
npm testTroubleshooting
API Token Returns 401
If using a self-hosted Chatwoot with nginx, add this to your nginx config:
server {
underscores_in_headers on; # Required for api_access_token header
}JWT Tokens Expire
JWT tokens expire (typically after 2 weeks). Keep CHATWOOT_PASSWORD in your .env for automatic refresh, or switch to API token authentication.
MCP Connection Errors
If you see JSON parsing errors when connecting, ensure you are using node dist/index.js directly (not npx). Some npm packages output debug information to stdout during installation, which corrupts the MCP stdio protocol.
Tech Stack
@modelcontextprotocol/sdk - MCP server framework
openapi-fetch - Type-safe API client
openapi-typescript - OpenAPI type generation
Zod - Runtime schema validation
Vitest - Test framework
Attribution
Originally created by Hugo Blanc.
License
Contributing
Contributions are welcome! Some ideas for additional tools:
Contact management (create, update, search)
Team and agent operations
Inbox configuration
Labels and custom attributes
Reports and analytics
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:
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: { conversation_id: 123, content: "Thank you for contacting us!" }
Add internal note: { conversation_id: 123, content: "Customer called for follow-up", private: true }
Inputs: content (required), conversation_id (required), private, message_type.
chatwoot_filter_conversationsFilter Chatwoot Conversations by Date and CriteriaARead-onlyIdempotent
Filter conversations using advanced criteria including date ranges, status, assignee, and labels.
This tool uses Chatwoot's filter API to find conversations by creation date, last activity date, status, and more. Supports pagination (25 results per page) or auto-pagination to fetch all results at once.
IMPORTANT - Date format must be YYYY-MM-DD only (no time component). Date filters use exclusive boundaries: date_from='2026-02-20' means conversations created AFTER Feb 20 (i.e., Feb 21+). For a single day like Feb 21: use date_from='2026-02-20' and date_to='2026-02-22'.
Args:
date_from (string): Start date YYYY-MM-DD - conversations created after this date (optional)
date_to (string): End date YYYY-MM-DD - conversations created before this date (optional)
activity_from (string): Filter by last activity after this date YYYY-MM-DD (optional)
activity_to (string): Filter by last activity before this date YYYY-MM-DD (optional)
status (string): Filter by status - "open", "resolved", "pending", "snoozed" (optional)
assignee_id (number): Filter by assignee agent ID (optional)
inbox_id (number): Filter by inbox ID (optional)
label (string): Filter by label name (optional)
all_pages (boolean): Fetch ALL pages automatically, returns every matching conversation (default: false)
page (number): Page number, 25 results per page - ignored when all_pages is true (default: 1)
response_format (string): "markdown" or "json" (default: "markdown")
Returns: Filtered conversations with meta counts (all_count, mine_count, unassigned_count, assigned_count).
Examples:
Get all conversations from Feb 21: { date_from: "2026-02-20", date_to: "2026-02-22" }
Get ALL conversations from a date range: { date_from: "2026-02-17", date_to: "2026-03-21", all_pages: true }
Get resolved conversations from Feb 21: { date_from: "2026-02-20", date_to: "2026-02-22", status: "resolved" }
Get conversations with activity on Feb 21: { activity_from: "2026-02-20", activity_to: "2026-02-22" }
Get open conversations with a label: { status: "open", label: "urgent" }
Inputs: page, label, status, date_to, +7 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:
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: { conversation_id: 123 }
Inputs: 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:
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: { status: "open" }
List unassigned conversations: { assignee_type: "unassigned" }
List conversations in specific inbox: { inbox_id: 5 }
Inputs: page, status, inbox_id, assignee_type, +1 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:
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: { conversation_id: 123 }
Inputs: conversation_id (required), response_format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
list_conversations and filter_conversations overlap significantly; both retrieve conversations with filtering, though filter adds date/label/advanced criteria. The other three tools (get_conversation, list_messages, create_message) are clearly distinct.
All tools follow a consistent chatwoot_ verb_noun pattern in snake_case: list_conversations, get_conversation, list_messages, create_message, filter_conversations. No style mixing or irregularities.
Five tools is a reasonable size for a focused Chatwoot conversation/message server. It feels slightly thin compared to the full platform scope, but each tool has a distinct role and the count is appropriate for a targeted integration.
Core read and send workflows are covered (list/get conversations, list/create messages), but there are notable gaps: no way to update conversation status, assignee, or labels, and no create conversation or contact management. The surface handles common support tasks but lacks lifecycle management.
Related MCP Connectors
Build and manage AI-native customer support agents from Claude or any MCP client.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Chatwoot MCP server for ChatGPT, Claude and any AI agent: list conversations, reply to conversation, add private note, assign conversation, add labels and resolve or snooze conversation in your own Chatwoot account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Chatwoot yourself; Cotlet does not store your password and you need no Chatwoot API key. About the official Chatwoot API: Chatwoot has a full REST API, the Application API, and an official command-line client, but no official MCP server (checked 22 Oct 2026). The API covers conversations, messages, contacts, labels, teams and assignments with an access token from Profile Settings. Setup and FAQ: https://cotlet.dev/integrations/chatwoot-api-mcp-server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.1319 npm77MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your AWS environment. This allows for natural language querying and management of your AWS resources during conversations. Think of better Amazon Q alternative.3296ISC
- AlicenseCqualityDmaintenanceA Model Context Protocol server that connects your personal WhatsApp account to AI agents like Claude, enabling them to search messages, view contacts, retrieve chat history, and send messages via WhatsApp.711 npm76ISC
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact with Zendesk Support through natural language for searching, creating, updating, and managing tickets.41287 npm3MIT