goateddev

Centrex guide

Use GitHub Copilot with Genesys Cloud™

A step-by-step GitHub Copilot Genesys Cloud setup: GitHub Copilot Chat in VS Code, in Agent mode, reading your org through Centrex, an MCP server for Genesys Cloud, with every write a plan you approve first.

In testing. This setup follows the documentation of VS Code and GitHub Copilot and the public Centrex guide, but it has not yet been tested against a real Copilot. Parts marked “Not yet tested” may differ in your version of VS Code. If one does, please open an issue.

What you need

  • Node.js 22 or later.
  • VS Code with GitHub Copilot, signed in.
  • With a Copilot Business or Copilot Enterprise seat: an admin of your GitHub organization or enterprise must turn on the MCP servers in Copilot policy. Until then Copilot uses no MCP server.
  • A Genesys Cloud org, and a user there with the OAuth > Client > Add permission to create an OAuth client. To give that client a role, you must hold the role yourself.

Set it up in five steps

  1. Create an OAuth client in your org

    In Genesys Cloud, open Menu > IT and Integrations > OAuth and click Add client. Give it a name, choose Client Credentials under Grant Types, and click Next.

    Assign it roles. Centrex can do only what those roles allow, so give it only the roles the work needs: for a first try, roles that can view what you want to read.

    Save, and keep the client ID and the client secret. You also need the region domain of your org, such as mypurecloud.ie.

  2. Install Centrex

    npm install -g centrex
  3. Add Centrex to your project in .vscode/mcp.jsonNot yet tested

    Create the file .vscode/mcp.json in your project with this content. It holds no credentials:

    {
      "inputs": [
        { "type": "promptString", "id": "genesyscloud-region", "description": "Region domain of the org" },
        { "type": "promptString", "id": "genesyscloud-oauthclient-id", "description": "OAuth client ID" },
        {
          "type": "promptString",
          "id": "genesyscloud-oauthclient-secret",
          "description": "OAuth client secret",
          "password": true
        }
      ],
      "servers": {
        "centrex": {
          "type": "stdio",
          "command": "centrex",
          "args": ["mcp"],
          "env": {
            "GENESYSCLOUD_REGION": "${input:genesyscloud-region}",
            "GENESYSCLOUD_OAUTHCLIENT_ID": "${input:genesyscloud-oauthclient-id}",
            "GENESYSCLOUD_OAUTHCLIENT_SECRET": "${input:genesyscloud-oauthclient-secret}"
          }
        }
      }
    }

    On native Windows, where centrex is an npm .cmd shim, use "command": "cmd" and "args": ["/c", "centrex", "mcp"].

  4. Start the server and give it your credentialsNot yet tested

    Start the centrex server from VS Code. The first time it starts, VS Code asks for the region, the client ID and the client secret, and keeps them in its secret storage, never in the file.

  5. Ask Copilot Chat, in Agent modeNot yet tested

    Open Copilot Chat, choose Agent mode, and ask which org you are connected to. Copilot calls Centrex's status tool, which answers with the org, the region and the token.

First prompts to try

Ask in your own words, in English or Spanish. These only read:

  • Which org and region am I connected to? status shows the org, the region, the token and any pending plans.
  • List the queues in my org and how many members each one has. search finds the operations, describe shows their parameters, execute reads.
  • Which operation lists the members of a queue, and what permissions does it need? search and describe answer from the catalog, without calling your org.

How a write looks Not yet tested

Ask for a change, for example: Rename the queue Support to Support Tier 1.

  1. Copilot finds the operation and calls plan. plan writes nothing: it reads the queue and shows the name before and after, the permissions the operation needs, and a plan id.
  2. VS Code asks before each MCP tool call, so it asks before apply. That confirmation is your approval: read the plan, then allow that one call or skip it.
  3. apply reads the queue again and refuses if it changed since the plan. If not, it writes, reads again to confirm, and logs the change with the state before and after.

How safe writes work: plan, approve, apply

Approve every apply one call at a time

The confirmation on apply is the only moment a person approves a write. The read-only tools can be allowed for the session or always, but apply never: not for the session, not for the project, not always, and not through the setting that approves every tool, which would include it.

Read-only sessions

For a session that should only read, add "CENTREX_READ_ONLY": "1" to env in .vscode/mcp.json: plan and apply then refuse every write.

Other Copilot clients

A client that calls tools with no person to answer its prompts, like the Copilot coding agent on GitHub, must get Centrex only with CENTREX_READ_ONLY=1.

Microsoft 365 Copilot and Copilot Studio connect only to remote MCP servers over HTTP. Centrex's MCP server speaks stdio only, so they cannot use it.

Read more