Skip to main content
The ChatbotX MCP Server gives AI agents direct programmatic access to your self-hosted ChatbotX Workspace. Tools are automatically generated from the ChatbotX OpenAPI specification (public-spec.json), exposing over 380 operations across the entire platform without manual tool definitions.

How Tools Reach Your Context

Listing all ~380 API operations at once would overwhelm an AI agent’s context window, increasing token cost and leading to hallucinated arguments. To prevent this, ChatbotX MCP uses a two-tier tool discovery model:

Curated Default Set (43 Tools)

A curated set of 43 essential tools (plus 2 meta-tools) is always visible in tools/list for common operations: contacts, conversations, flows, broadcasts, sequences, and analytics.

Meta-Tools (Full API Access)

Two fixed meta-tools (search_tools and call_tool) allow the agent to discover and run any of the ~337 extended API operations on demand with zero context cost.

Meta-Tools

When an agent needs an operation outside the default set (such as managing coupons, webhooks, tags, triggers, or workspace members), it uses the meta-tools:

Scope-Based Filtering

On connect, the server introspects the caller’s Workspace Token (GET /v1/token) and filters the visible tool list:
  • Missing Scopes: If a token lacks a required scope (e.g. broadcasts), tools requiring that scope are hidden from tools/list.
  • Read-Only Tokens: Tokens with read_only permission only see read operations (GET endpoints, protecting your workspace against unintended writes).
  • Auto-Refresh: The server re-fetches the OpenAPI specification and token cache every 5 minutes (CHATBOTX_SPEC_TTL_MS), ensuring newly deployed endpoints become available without restarting the MCP server.

Discovery Tools (Call These First)

Before performing business actions, AI agents should invoke discovery tools to inspect available workspace resources and verify permissions:

Default Tools (43 Core Tools)

The following 43 tools are registered in the default tools/list set. Tool names follow the OpenAPI operationId converted to snake_case.

Capabilities (3 tools)

Tools for environment discovery, token introspection, and schema validation.

AI Agents (5 tools)

Manage autonomous AI agents, knowledge base files, and custom AI functions.

Analytics (5 tools)

Access workspace growth, contact activity, flow engagement, and sequence performance.

Broadcasts (3 tools)

Send and control mass outbound campaigns across connected channels.

Contacts (12 tools)

Comprehensive contact data management, tag assignment, custom fields, and direct messaging.

Conversations (3 tools)

Live chat inbox management and agent assignment.

Error Logs (1 tool)

Inspect runtime execution errors across flows, webhooks, and integrations.

Flows (6 tools)

Build, validate, test, and publish conversational automation flows.

Keywords (1 tool)

Automated keyword triggers that match customer messages.

Messages (1 tool)

Conversation thread message inspection.

Sequences (3 tools)

Drip campaigns and delayed follow-up messaging sequences.

Extended Operations via Meta-Tools

All other ChatbotX API endpoints (~337 operations) are fully functional through search_tools and call_tool. The agent can search by natural language keyword, receive the exact parameter schema, and invoke the operation. Common resource areas reachable via meta-tools:
Manage tags at the workspace level:
  • tags_list: List all available workspace tags.
  • tags_create: Create a new tag for audience segmentation.
  • tags_get: Get tag details by ID.
  • tags_update: Rename or re-color an existing tag.
  • tags_delete: Remove a tag from the workspace.
Define global variables and contact attributes:
  • custom_fields_list: List custom field definitions.
  • custom_fields_create: Define a new contact custom field (text, number, date, boolean).
  • custom_fields_delete: Remove a custom field definition.
  • bot_fields_list: List global workspace bot fields.
  • bot_fields_set: Set or update the global value of a bot field.
Handle real-time event triggers and incoming webhooks:
  • triggers_list: List automation event triggers.
  • triggers_create: Create an event trigger (e.g. tag added, field changed).
  • webhooks_list: List registered incoming and outgoing webhooks.
  • webhooks_create: Register a new webhook endpoint.
  • webhooks_delete: Delete an obsolete webhook.
Canned responses and multi-channel message templates:
  • saved_replies_list: List canned replies for live chat agents.
  • saved_replies_create: Add a new saved reply shortcut.
  • whatsapp_templates_list: List approved WhatsApp message templates.
Promotional marketing tools:
  • coupons_list: List active promotional coupon batches.
  • coupons_create: Generate single-use or multi-use discount coupons.
  • coupons_validate: Validate coupon code validity and redemption limits.
Workspace collaboration and inbox management:
  • workspace_members_list: List workspace collaborators and roles.
  • invites_create_invite_token: Generate an invitation link for new team members.
  • inboxes_list: List connected inboxes and communication channels.

Tool Execution Protocol

When an AI assistant calls a tool, it formats the request as a standard JSON-RPC 2.0 message:

Example: Direct Tool Call (contacts_create)

Example: Discovery via Meta-Tool (search_tools and call_tool)

1

Search for an extended operation

The agent searches for tag management tools:
2

Inspect search results

The server returns matching tool definitions including tags_create with its inputSchema.
3

Execute the tool via call_tool

The agent invokes call_tool passing the target name and arguments:
For instructions on setting up ChatbotX MCP with Claude, Cursor, ChatGPT, Codex, or OpenClaw, see Platform Setup.