Pega Setup
Use this skill when the user needs to configure or troubleshoot the opencode MCP server for
pega-infinity-authoring.
Setup Rules
- Treat
opencode.jsonas the source of truth for how the MCP server starts. - The MCP server runs from the JAR and skills downloaded from the GitHub release page; the paths are set in
opencode.json. - Use OAuth for authentication.
- If the runtime exposes setup or auth helper tools, use them before suggesting manual env changes.
- Treat
PEGA_BASE_URLas the Pega environment root URL only; do not include/prwebor any other path segment. - Separate local plugin validation from remote Pega validation:
list-skillsconfirms bundled skills availability, whilelist-available-applicationsorget-applicationconfirms remote connectivity.
Configuration
The MCP server is configured via the mcp section of the project's opencode.json or the global ~/.config/opencode/opencode.json.
Minimum required fields
{
"mcp": {
"pega-infinity-authoring": {
"type": "local",
"command": ["java", "-jar", "/absolute/path/to/infinity-rules-mcp-<version>.jar", "--spring.profiles.active=stdio"],
"environment": {
"PEGA_SKILLS_PATH": "/absolute/path/to/skills",
"PEGA_CLIENT_MODE": "opencode-plugin",
"PEGA_BASE_URL": "https://your-pega-environment.example.com"
},
"enabled": true
}
}
}
Use absolute paths to the downloaded JAR and the extracted skills directory. Set PEGA_BASE_URL to the environment root URL only — do not include /prweb or any other path segment.
Applying configuration changes
Restart opencode after editing opencode.json for changes to take effect. There is no hot-reload for MCP server configuration.
Troubleshooting Focus
- Confirm the MCP server is listed and enabled in opencode.
- Confirm the JAR path and
PEGA_SKILLS_PATHpoint at the files downloaded from the release page. - Confirm
PEGA_BASE_URLuses the environment root URL without/prweb. - Confirm bundled skills are discoverable through
list-skills. - Confirm remote Pega connectivity through
list-available-applicationsorget-application. - Confirm
javais available on the machine running opencode (java -version; requires Java 17+).
Troubleshooting Common Issues
- MCP server not appearing: Check that the JAR path in
commandexists. Restart opencode. - Connection refused: Verify
PEGA_BASE_URLis correct, uses the environment root URL without/prweb, and the Pega environment is accessible from this machine. - Authentication failed: The default OAuth client ID is provided automatically. If your environment requires a non-default client ID, set
PEGA_OAUTH_CLIENT_IDin theenvironmentblock. - Java not found: Install Java 17+ and ensure
javais on thePATHused by opencode. - Skills not loading: Confirm
PEGA_SKILLS_PATHis the extracted skills directory that directly contains the version folders (such as26-1) and that the selected version folder containsmanifest.json.