Pega setup

From pegasystems/infinity-ai-plugins · View interactive version

Pega setup is an AI agent skill from the GitHub repository pegasystems/infinity-ai-plugins. Use when the GitHub Copilot CLI plugin needs connection setup help, environment configuration, or troubleshooting. Guides first-time setup, OAuth configuration, and recovery from connection failures.

How to use this skill

Skill file

Pega Setup

This skill guides users through configuring the Infinity Authoring plugin for use with GitHub Copilot CLI.

Overview

The Pega MCP server requires a connection to a Pega Infinity environment.

The plugin's launcher downloads and verifies the skills and supplies the skills path itself. The shared

config should explicitly set pega_infinity_version to 26-1 for a 26.1 environment, even though

the runtime defaults to that version when the key is omitted.

Do not ask users to set pega_skills_path for normal use.

Supported Infinity versions map to bundled directory names as follows:

This Copilot setup flow is OAuth-only:

  1. OAuth (Recommended): Token-based authentication

This is an interactive step-by-step guide. The agent detects the user's current configuration and provides tailored instructions, but never asks for or handles secrets directly - users add connection values to the config file or environment variables themselves. Make this clear to the user whenever secrets come up.

Step 1: Check Existing Configuration

Check whether a connection is already configured.

First, try calling list-skills. If it succeeds, the bundled plugin runtime and local skills are available.

Do not treat this as proof that the remote Pega environment is reachable or configured. Check the

configuration separately even when list-skills succeeds.

Use a presence-only check. Never print the contents of the config file into the session transcript:

config="$HOME/.infinity-rules-mcp/config.json"
if [ -f "$config" ]; then
    printf 'config.json: present\n'
    grep -qE '"pega_base_url"[[:space:]]*:' "$config" && printf 'pega_base_url: [set]\n' || printf 'pega_base_url: [missing]\n'
    grep -qE '"pega_oauth_client_id"[[:space:]]*:' "$config" && printf 'pega_oauth_client_id: [set]\n' || printf 'pega_oauth_client_id: [missing]\n'
    grep -qE '"pega_infinity_version"[[:space:]]*:' "$config" && printf 'pega_infinity_version: [set]\n' || printf 'pega_infinity_version: [missing]\n'
    [ "$(stat -c '%a' "$config" 2>/dev/null)" = "600" ] && printf 'permissions: restricted\n' || printf 'permissions: check chmod 600\n'
else
    printf 'config.json: missing\n'
fi

Interpretation:

Partial Configuration Handling:

Step 2: Confirm Setup Inputs

If no valid configuration exists, confirm the user has:

Use the standard OAuth client ID shown in the template. Only use a different client ID if the user

explicitly says their environment requires a custom override.

Step 3: Configure Connection

Do not ask for or handle secrets - provide exact instructions so the user can add connection values directly.

Option A: Config File (recommended, persistent, shared across all Infinity Rules MCP clients)

First ensure the config directory exists:

mkdir -p ~/.infinity-rules-mcp

Instruct the user to create or edit ~/.infinity-rules-mcp/config.json directly with:

{
  "pega_base_url": "<paste-your-pega-url-here>",
  "pega_oauth_client_id": "34233104330833666523",
  "pega_infinity_version": "26-1"
}

The plugin supplies the skills directory automatically. 26-1 selects the matching skills version. The runtime defaults to 26-1 when the key is omitted, but keep it

explicit for a deterministic setup.

After creating the file, instruct the user to restrict permissions:

chmod 600 ~/.infinity-rules-mcp/config.json

⚠️ ~/.infinity-rules-mcp/config.json is stored in plaintext. Do not commit it to version control.

Option B: Environment Variables (for temporary or CI sessions)

Instruct the user to export variables in their shell profile. Store values in a dedicated file, not directly in the shell profile:

For the connection (~/.pega-env):

export PEGA_BASE_URL="<paste-your-pega-url-here>"
export PEGA_OAUTH_CLIENT_ID="34233104330833666523"
export PEGA_INFINITY_VERSION="26-1"

After creating the file:

chmod 600 ~/.pega-env

Detect the user's shell and profile file by running echo $SHELL, then instruct them to add source ~/.pega-env to their profile (e.g. ~/.zshrc, ~/.bashrc).

⚠️ ~/.pega-env is stored in plaintext. Do not commit it to version control.

Priority order: Non-empty values in ~/.infinity-rules-mcp/config.json override environment

variables. Use the environment-variable path when no conflicting config-file value is present.

Proceed to Step 4 (Verify and Next Steps).

Step 4: Verify and Next Steps

4.1: Restart the Session

The user must fully restart the Copilot CLI session for changes to take effect:

4.2: Verify Connection

After restart, verify two things separately:

  1. Call list-skills to confirm the bundled plugin runtime and local skills are available.
  2. Call list-available-applications or get-application to confirm the remote Pega environment is reachable with the configured base URL.

Expected results:

If verification fails, check:

4.3: Verify Configuration Is Loaded

The presence-only check in Step 1 shows whether each key is set, never its value. If a config-file

value is present, it is the value the runtime uses even when an environment variable is also set.

4.4: Next Steps

  1. Confirm remote app context: Call list-available-applications to see available applications
  2. Load runtime skills: Call list-skills then get-skill to load Pega-specific guidance

Troubleshooting

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.