Skip to main content
Add the OpenCX server to your AI tool so your assistant can manage contacts, sessions, training, and more through natural language. Prerequisites: Node.js 18+ and an OpenCX API key.
1

Get your API key

Go to your OpenCX dashboard and navigate to Settings > API Keys > Create API Key. Copy the generated key.
See Authentication for details on key scopes and rotation.
2

Add to your AI tool

Add the following configuration to your AI tool’s MCP settings.
{
  "mcpServers": {
    "opencx": {
      "command": "npx",
      "args": ["-y", "@opencx/mcp"],
      "env": {
        "OPENCX_API_KEY": "your-api-key-here"
      }
    }
  }
}
3

Verify the connection

Ask your AI assistant one of these prompts to confirm the server is connected:
  • “List my recent chat sessions”
  • “Show me CSAT scores from the last week”
  • “Search my knowledge base for refund policy”
If you get results back, the connection is working.

Self-hosted instances

If you are running a self-hosted OpenCX deployment, set the OPENCX_BASE_URL environment variable to your instance URL:
VariableRequiredDefaultDescription
OPENCX_API_KEYYesYour OpenCX API key
OPENCX_BASE_URLNohttps://api.open.cxAPI base URL for self-hosted deployments

MCP Introduction

Overview and core concepts

Authentication

Create and manage API keys

Use Cases

Common workflows and examples

Troubleshooting

Debug connection and authentication issues