Using Centrex from Claude Code (MCP)
centrex mcp starts an MCP server over stdio with six tools, one per action: search, describe, execute,
plan, apply and status. Each tool’s description teaches the safe flow (search, describe, execute for reads;
plan, then apply for writes), its input schema mirrors the action’s options, and its result is the same JSON the
CLI prints. An error comes back as a tool error whose text is the CLI’s { "error": { ... } }. Stdout carries
only MCP messages; every diagnostic goes to stderr. The server starts without credentials, so the client can
list its tools; a missing variable is reported as the error of the first tool call that needs Genesys.
Add it with the Claude Code CLI:
claude mcp add centrex \
-e GENESYSCLOUD_REGION=mypurecloud.ie \
-e GENESYSCLOUD_OAUTHCLIENT_ID=<client id> \
-e GENESYSCLOUD_OAUTHCLIENT_SECRET=<client secret> \
-- centrex mcp
Or in a project’s .mcp.json, reading the credentials from your environment instead of writing them in the file:
{
"mcpServers": {
"centrex": {
"command": "centrex",
"args": ["mcp"],
"env": {
"GENESYSCLOUD_REGION": "mypurecloud.ie",
"GENESYSCLOUD_OAUTHCLIENT_ID": "${GENESYSCLOUD_OAUTHCLIENT_ID}",
"GENESYSCLOUD_OAUTHCLIENT_SECRET": "${GENESYSCLOUD_OAUTHCLIENT_SECRET}"
}
}
}
}
On native Windows, where centrex is an npm .cmd shim, use cmd as the command and ["/c", "centrex", "mcp"]
as the arguments.
Without a global install, npx downloads Centrex the first time: end the command with -- npx -y centrex mcp,
or use "command": "npx" and "args": ["-y", "centrex", "mcp"] in the file (cmd and
["/c", "npx", "-y", "centrex", "mcp"] on native Windows).
Never allow-list the apply tool. Its permission prompt is the only moment a human approves a write. In
Claude Code, the read-only tools can go in permissions.allow, but mcp__centrex__apply must not, and neither
must the whole server (mcp__centrex or mcp__centrex__*), which would include it:
{
"permissions": {
"allow": [
"mcp__centrex__search",
"mcp__centrex__describe",
"mcp__centrex__execute",
"mcp__centrex__plan",
"mcp__centrex__status"
],
"ask": ["mcp__centrex__apply"]
}
}