Skip to main content
Glama

chateapro-mcp

An MCP server that exposes a curated, safety-gated subset of the Chatea Pro REST API as tools for Claude Code and Claude Desktop.

It is meant for order-ops automation: read data (contacts, orders, tags, flows, agents) and act on a single contact (tag, set fields, move chat, assign agent, trigger a flow, send a message). Bulk and order-state writes are opt-in behind environment flags.

Requirements

  • Python 3.11+

  • A Chatea Pro API token with both scopes: Gestionar equipo (Manage Team) and Gestionar el flujo (Manage Flow).

Related MCP server: GHL MCP Server

Get a token

Chatea Pro → profile menu (top right) → API Keys → Crear token API. Name it, tick Asignar todas las habilidades (or at least Gestionar equipo + Gestionar el flujo), pick the workspace and bot, Crear. Copy the token.

Install

git clone https://github.com/Anthonygp21/chateapro-mcp
cd chateapro-mcp
uv sync --extra dev

Configure Claude Code

claude mcp add chateapro \
  -e CHATEAPRO_API_TOKEN=YOUR_TOKEN \
  -e CHATEAPRO_DRY_RUN=true \
  -- uv run --directory /abs/path/to/chateapro-mcp chateapro-mcp

Start in dry-run: every write tool returns the request it would send and makes no call. Once you've seen what the write tools do, drop -e CHATEAPRO_DRY_RUN=true (or set it to false) to let writes through.

Configure Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "chateapro": {
      "command": "uv",
      "args": ["run", "--directory", "/abs/path/to/chateapro-mcp", "chateapro-mcp"],
      "env": { "CHATEAPRO_API_TOKEN": "YOUR_TOKEN" }
    }
  }
}

Environment variables

Var

Default

Meaning

CHATEAPRO_API_TOKEN

—

Required. Bearer token.

CHATEAPRO_BASE_URL

https://chateapro.app/api

API base.

CHATEAPRO_DRY_RUN

false

When true, every write tool returns the request it would send and makes no call.

CHATEAPRO_ENABLE_ORDER_WRITE

false

Register update_order_status.

CHATEAPRO_ENABLE_BROADCAST

false

Register broadcast_whatsapp_template_by_tag (messages many customers).

CHATEAPRO_REQUEST_TIMEOUT

30

Per-request timeout (seconds).

CHATEAPRO_MAX_RETRIES

3

Retries on HTTP 429/5xx (exponential backoff).

Tools

Read: find_contact, get_contact, list_contacts, list_contact_fields, list_tags, list_flows, list_whatsapp_templates, list_orders, get_order, list_agents, list_agent_groups, list_ticket_lists, get_ticket_list_items.

Write (one contact; honor CHATEAPRO_DRY_RUN): set_contact_field, add_contact_tag, remove_contact_tag, move_chat (open/pending/spam/done), assign_agent, assign_agent_group, unassign_agent, pause_bot, resume_bot, trigger_flow, send_text, send_whatsapp_template.

Opt-in write (flag-gated): update_order_status, broadcast_whatsapp_template_by_tag.

find_contact joins external data (e.g. from Dropi) to a Chatea Pro conversation by phone number (Ecuador +593 normalization). If more than one contact matches, it returns them all and does not guess.

Safety

  • The token is read only from the environment and never logged or returned.

  • Start with CHATEAPRO_DRY_RUN=true to see exactly what each write would do.

  • broadcast_whatsapp_template_by_tag and update_order_status are not even registered unless you opt in.

Development

uv run pytest

The live smoke test (tests/test_smoke_live.py) runs only when CHATEAPRO_API_TOKEN is set and is read-only.

License

MIT

Available Tools

25 tools
add_contact_tagA

Add a tag to one contact. user_ns from find_contact; tag_name from list_tags. Write: changes contact segmentation and can trigger automations.

Inputs: user_ns (required), tag_name (required).

assign_agentA

Assign a contact's chat to a human agent. user_ns from find_contact; agent_id from list_agents. Write: reroutes the conversation.

Inputs: user_ns (required), agent_id (required).

assign_agent_groupA

Assign a contact's chat to an agent group. user_ns from find_contact; agent_group_id from list_agent_groups. Write: reroutes the conversation.

Inputs: user_ns (required), agent_group_id (required).

find_contactA

Resolve a user_ns from a phone number or a channel user_id.

Pass exactly one of phone (Ecuador +593 normalization applied) or user_id (a channel-native id such as a WhatsApp wa_id). Read-only. If several contacts match a phone it returns them all and leaves user_ns None rather than guessing.

Inputs: phone, user_id.

get_contactA

Return the full profile for one contact. user_ns from find_contact or list_contacts. Read-only.

Inputs: user_ns (required).

get_orderA

Return full detail for one order. order_id from list_orders. Read-only.

Inputs: order_id (required).

get_ticket_list_itemsA

List items in one ticket list, paginated; optionally filter by user_ns (from find_contact) or title. list_id from list_ticket_lists. Read-only.

Inputs: list_id (required), page, title, user_ns.

list_agent_groupsA

List agent groups (optionally filtered by name). Provides agent_group_id for assign_agent_group. Read-only.

Inputs: name.

list_agentsA

List team agents (optionally filtered by name/role). Provides agent_id for assign_agent. Read-only.

Inputs: name, role.

list_contact_fieldsA

List the custom contact-field definitions (optionally filtered by name). Use to get exact field_name values for set_contact_field. Read-only.

Inputs: name.

list_contactsB

Search contacts by phone / name / email / tag_ns, paginated. tag_ns from list_tags. Read-only.

Inputs: name, page, email, limit, +2 more.

list_flowsA

List published sub-flows (optionally filtered by name). Provides the exact flow_name for trigger_flow. Read-only.

Inputs: name.

list_ordersA

List shop orders, paginated; pass user_ns (from find_contact) to scope to one contact. Read-only.

Inputs: page, limit, user_ns.

list_tagsA

List the account's tags (optionally filtered by name). Provides tag_ns and exact tag names for the tag/broadcast tools. Read-only.

Inputs: name.

list_ticket_listsA

List ticket lists / boards (optionally filtered by name). Provides list_id for get_ticket_list_items. Read-only.

Inputs: name.

list_whatsapp_templatesA

List approved WhatsApp message templates (optionally filtered by name). Provides namespace, name, lang, and params for the template tools. Read-only.

Inputs: name.

move_chatA

Move a contact's chat to open, pending, spam, or done. user_ns from find_contact. Write: visible to agents in the Chatea Pro inbox.

Inputs: status (required), user_ns (required).

pause_botA

Pause the bot for one contact for minutes (must be positive). user_ns from find_contact. Write: automations stop replying to this contact.

Inputs: minutes (required), user_ns (required).

remove_contact_tagA

Remove a tag from one contact. user_ns from find_contact; tag_name from list_tags. Write: changes contact segmentation.

Inputs: user_ns (required), tag_name (required).

resume_botA

Resume the bot for one contact after pause_bot. user_ns from find_contact. Write: automations start replying again.

Inputs: user_ns (required).

send_textA

Send a free-text message to one contact. user_ns from find_contact. Write: irreversible; delivers a real WhatsApp message to the customer. Only works inside the 24h customer-service window.

Inputs: content (required), user_ns (required).

send_whatsapp_templateA

Send an approved WhatsApp template to one contact. user_ns from find_contact; namespace/name/lang/params from list_whatsapp_templates. Write: irreversible; delivers a real WhatsApp message to the customer.

Inputs: lang (required), name (required), user_ns (required), namespace (required), +1 more.

set_contact_fieldA

Set a custom field on one contact. user_ns from find_contact; field_name from list_contact_fields. Write: overwrites the stored value.

Inputs: value (required), user_ns (required), field_name (required).

trigger_flowA

Send a contact into a sub-flow. user_ns from find_contact; flow_name from list_flows. Write: customer-visible; may send WhatsApp messages.

Inputs: user_ns (required), flow_name (required).

unassign_agentA

Clear the human-agent assignment on a contact's chat. user_ns from find_contact. Write: reroutes the conversation.

Inputs: user_ns (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 25 tools

    Disambiguation4/5

    Most tools target distinct resources and actions, and the reference tools (list_*, find_contact) are clearly meant to supply user_ns/IDs for downstream tools. A few retrieval tools could still be confused, especially find_contact versus list_contacts and get_contact, since they all involve searching or resolving contact data.

    Naming Consistency5/5

    Every tool follows a consistent verb_noun snake_case pattern: list_*, get_*, set_*, add_*, remove_*, send_*, assign_*, pause_*, resume_*, trigger_*. The verbs map predictably to read/write/action semantics, and plural/singular usage is conventional.

    Tool Count3/5

    At 25 tools, the surface is at the heavy end and an LLM faces a large action space, even though most lookup tools are necessary ID resolvers. The count is defensible for the multi-domain scope, but it is not as lean as a well-scoped 3-15 tool server.

    Completeness3/5

    Core operational flows are covered: resolving contacts, modifying tags/fields, routing chats, pausing/resuming the bot, and sending WhatsApp messages/templates. However, there are notable gaps such as chat history/conversation listing, contact creation/updating beyond custom fields, and any write operations for tickets or orders.

    Related MCP Connectors

    Related MCP Servers