@pega-lt-mcp/pega-lt-mcp
v1.2.5
Published
MCP server for Pega Legacy Transformation Assistant API — create and update Pega rules (DataTransform, When, Validation, FlowAction, Property, DataPage, ReportDefinition) via the LT Assistant API.
Maintainers
Readme
@pega-lt-mcp/pega-lt-mcp
MCP (Model Context Protocol) server for Pega Legacy Transformation. Creates, updates, and deletes Pega rules programmatically via the LT Assistant API.
Quick Start
1. Install
npm install -g @pega-lt-mcp/pega-lt-mcpOr use directly with npx (no install needed):
npx @pega-lt-mcp/pega-lt-mcp2. Configure
Create a .env file in your working directory (or set environment variables):
# Pega Connection (required)
PEGA_BASE_URL=https://your-pega-instance.com
# Authentication — choose one:
# Option A: Basic Auth
PEGA_AUTH_TYPE=basic
PEGA_USERNAME=your-username
PEGA_PASSWORD=your-password
# Option B: OAuth2 (default if PEGA_AUTH_TYPE not set)
PEGA_AUTH_TYPE=oauth2
PEGA_CLIENT_ID=your-client-id
PEGA_CLIENT_SECRET=your-client-secret
# Optional
PEGA_APP_ALIAS=your-app-alias
LTPEGA_SKILL_PATH=/path/to/custom/skills3. Run
Stdio mode (for IDE integrations like Kiro, VS Code, Cursor):
pega-lt-mcp
# or
npx @pega-lt-mcp/pega-lt-mcpHTTP mode (for network access / remote clients):
node node_modules/@pega-lt-mcp/pega-lt-mcp/src/index-http.js
# or from source:
node src/index-http.jsHTTP server listens on http://0.0.0.0:3000/mcp by default.
MCP Client Configuration
Kiro / VS Code (mcp.json)
{
"mcpServers": {
"pega-lt-mcp": {
"command": "npx",
"args": ["@pega-lt-mcp/pega-lt-mcp"],
"env": {
"PEGA_BASE_URL": "https://your-pega-instance.com",
"PEGA_AUTH_TYPE": "basic",
"PEGA_USERNAME": "your-username",
"PEGA_PASSWORD": "your-password"
}
}
}
}Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"pega-lt-mcp": {
"command": "npx",
"args": ["-y", "@pega-lt-mcp/pega-lt-mcp"],
"env": {
"PEGA_BASE_URL": "https://your-pega-instance.com",
"PEGA_AUTH_TYPE": "basic",
"PEGA_USERNAME": "your-username",
"PEGA_PASSWORD": "your-password"
}
}
}
}Available Tools
| Tool | Description |
|------|-------------|
| create_rules | Create Pega rules in bulk (supports 20+ rule types) |
| update_rules | Update existing rules, append View fields, or delete rules from a branch |
| get_app_metadata | Retrieve application metadata (case types, data objects, properties) |
| create_openapi_integrations | Generate integration rules from an OpenAPI/Swagger YAML spec |
| list_skills | List available rule-generation skill references |
| get_skill | Get detailed schema/examples for a specific rule type |
Supported Rule Types
| Rule Type | RuleType Value | Pega Class |
|-----------|-----------------|------------|
| Data Transform | DataTransform | Rule-Obj-Model |
| When Condition | When | Rule-Obj-When |
| Validation | Validation | Rule-Obj-Validate |
| Flow Action | FlowAction | Rule-Obj-FlowAction |
| Property | Property | Rule-Obj-Property |
| Data Page | DataPage | Rule-Declare-Pages |
| Data Object | DataObject | Rule-Obj-Class |
| View | View | Rule-UI-View |
| Activity | Activity | Rule-Obj-Activity |
| Decision Table | DecisionTable | Rule-Declare-DecisionTable |
| SLA | SLA | Rule-Obj-ServiceLevel |
| JSON Data Transform | JsonDataTransform | Rule-Obj-Model |
| Report Definition | ReportDefinition | Rule-Obj-Report-Definition |
| Queue Processor | QueueProcessor | Rule-Async-QueueProcessor |
| Job Scheduler | JobScheduler | Rule-Async-JobScheduler |
| DataSet (DB) | DataSet | Rule-Decision-DataSet |
| DataSet (File) | Dataset | Rule-Decision-DataSet |
| Service Package | ServicePackage | Data-Admin-ServicePackage |
| Parse Delimited | ParseDelimited | Rule-Obj-ParseStructured |
| Service File | ServiceFile | Rule-Service-File |
| File Listener | FileListener | Data-Admin-Connect-FileListener |
| Map Structured | MapStructured | Rule-Obj-MapStructured |
| Data Flow | DataFlow | Rule-Decision-DDF |
Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| PEGA_BASE_URL | ✅ | — | Pega instance URL (without /prweb) |
| PEGA_AUTH_TYPE | No | oauth2 | Auth type: basic or oauth2 |
| PEGA_USERNAME | If basic | — | Basic auth username |
| PEGA_PASSWORD | If basic | — | Basic auth password |
| PEGA_CLIENT_ID | If oauth2 | — | OAuth2 client ID |
| PEGA_CLIENT_SECRET | If oauth2 | — | OAuth2 client secret |
| PEGA_APP_ALIAS | No | — | Application alias for API routing |
| LTPEGA_SKILL_PATH | No | Bundled | Override path to custom skills directory |
| MCP_HTTP_PORT | No | 3000 | HTTP server port (HTTP mode only) |
| MCP_HTTP_HOST | No | 0.0.0.0 | HTTP server bind address (HTTP mode only) |
Skills
Skills are bundled with the package — no extra configuration needed. They provide JSON schemas, examples, and validation checklists for generating correct Pega rule payloads.
To use custom skills instead of the bundled ones, set LTPEGA_SKILL_PATH to your skills directory.
HTTP Mode
For network access (remote clients, other tools):
# Set env vars, then:
node src/index-http.jsEndpoints:
POST /mcp— MCP Streamable HTTP endpoint (JSON-RPC + SSE)GET /health— Health check
Clients connect with:
POST http://<host>:3000/mcp
Content-Type: application/json
Accept: application/json, text/event-streamExample Usage
Create a Data Transform
{
"BranchRuleset": "MyApp_Branch_Feature1",
"RuleList": [
{
"RuleType": "DataTransform",
"RuleName": "SetDefaults",
"pyClassName": "MyOrg-MyApp-Work-Case",
"Actions": [
{
"ActionType": "SET",
"FieldName": ".pyLabel",
"FieldValue": "\"New Case\"",
"Actionseq": "1"
}
]
}
]
}Delete a Rule from Branch
{
"BranchRuleset": "MyApp_Branch_Feature1",
"Action": "Delete",
"RuleList": [
{
"RuleName": "OldRule",
"RuleType": "When",
"pyClassName": "MyOrg-MyApp-Work-Case"
}
]
}Prerequisites
- Node.js 18+
- A Pega Infinity instance with the LT Assistant API deployed
- Valid authentication credentials (Basic or OAuth2)
License
MIT
