Skip to main content
Glama

pega-mcp-server

Generic TypeScript MCP server for Pega case operations with definition-driven tool registration.

Purpose

This project provides an MCP tool layer for reading and mutating cases in a flexible way. Tool wiring is metadata-based, so adding tools does not require editing server registration logic.

Related MCP server: Salesforce-Hosted-Custom-Mcp-Server

Supported MCP Tools

  • pega.get_cases

    • Input: optional limit

    • Returns: { ok: true, data: { cases: [...] } }

  • pega.get_case

    • Input: caseId, optional viewType, pageName, originChannel

    • Returns: { ok: true, data: { case: ... } }

  • pega.get_case_actions

    • Input: caseId, optional originChannel

    • Returns: { ok: true, data: { actions: ... } }

  • pega.get_case_views

    • Input: caseId, viewId, optional originChannel

    • Returns: { ok: true, data: { view: ... } }

  • pega.attach_document_to_case

    • Input: caseId, fileName, mimeType, fileContentBase64

    • Returns: { ok: true, data: ... }

  • pega.submit_case_action

    • Input: caseId, action, optional content

    • Returns: { ok: true, data: ... }

All tools return a standard failure format:

{
  "ok": false,
  "error": {
    "code": "INVALID_INPUT | NOT_FOUND_OR_FORBIDDEN | INTERNAL_ERROR",
    "message": "Human-readable explanation",
    "suggestion": "Optional recovery guidance"
  }
}

Environment Variables

Required:

  • PEGA_BASE_URL (for example https://your-pega-instance.example.com/prweb)

  • PEGA_CLIENT_ID

  • PEGA_CLIENT_SECRET

  • PEGA_TOKEN_URL (for example https://your-pega-instance.example.com/prweb/PRRestService/oauth2/v1/token)

Optional:

  • PEGA_CASES_API_BASE_PATH (default: /api/v1)

    • Common v2 path when base URL includes /prweb: /api/application/v2

    • Some deployments use app context: /PRAuth/app/work-manager/api/application/v2

  • PEGA_CASES_LIST_DATA_VIEW (default: D_pyMyWorkList)

    • Used as a fallback for pega.get_cases when GET /cases is not supported (HTTP 405)

    • Endpoint shape: POST <PEGA_CASES_API_BASE_PATH>/data_views/<dataViewId>

  • PEGA_ENABLED_TOOLS comma-separated tool names to allowlist

    • Example: pega.get_case,pega.get_case_actions

  • PEGA_DISABLED_TOOLS comma-separated tool names to blocklist

    • Example: pega.submit_case_action,pega.attach_document_to_case

Run Locally

npm install
cp .env.example .env
npm run dev

Build

npm run build
npm start

Test

npm test

Example Outputs

pega.get_cases

{
  "ok": true,
  "data": {
    "cases": [
      {
        "ID": "C-501",
        "caseType": "Insurance Claim",
        "status": "Pending Documents"
      }
    ]
  }
}

pega.get_case

{
  "ok": true,
  "data": {
    "case": {
      "ID": "C-501",
      "caseType": "Insurance Claim",
      "status": "Pending Documents",
      "uiResources": {
        "root": {
          "type": "page"
        }
      }
    }
  }
}

Detailed request/response contracts:

Available Tools

6 tools
pega.attach_document_to_caseAttach Document To CaseA

Use this tool to attach files or URLs to an existing case. Required input: caseId. Attachment input mode 1: attachments array payload. Attachment input mode 2: fileName + fileContentBase64 (optional mimeType) for upload-then-attach flow. Returns: { ok: true, data: } on success. Standard failure format: { ok: false, error: { code, message, suggestion? } }.

ParametersJSON Schema
NameRequiredDescriptionDefault
caseIdYesUnique case identifier/handle.
attachmentsNoOptional direct attachment payload array sent to the case attachments endpoint.
fileNameNoFile name including extension.
mimeTypeNoOptional MIME type for base64 upload mode.
fileContentBase64NoOptional document bytes encoded as base64. Used for upload-then-attach mode.
originChannelNoOptional channel hint, for example Web or Mobile.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Discloses return format structure for both success and failure cases ({ ok: true/false, ... }), compensating for lack of output schema. Explains the dual-mode upload flow behavior, though could explicitly state this modifies the case.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Efficient structure: purpose statement, required input highlight, two mode explanations, then return formats. Every sentence conveys essential information; the JSON return examples are compact and informative rather than verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive for a 6-parameter tool with dual invocation patterns. Covers return values (absent output schema), required fields, optional variations, and the channel hint parameter. Addresses the complexity of base64 vs direct attachmentpayloads adequately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3). Description adds significant value by grouping parameters into 'Mode 1' vs 'Mode 2' patterns, explaining the semantic relationship that attachments array is mutually exclusive with fileName/fileContentBase64 parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Excellent clarity: specific verb 'attach' with resources 'files or URLs' and target 'existing case'. Clearly distinguishes from sibling 'get_*' tools (read operations) and 'submit_case_action' by focusing specifically on document attachment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear guidance on two mutually exclusive input modes (attachments array vs fileName/fileContentBase64), which is crucial for correct invocation. Lacks explicit contrast with sibling tools, though the attachment-specific purpose makes this relatively clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pega.get_caseGet CaseA

Use this tool to fetch one case by identifier. Required input: caseId. Optional inputs: viewType, pageName, originChannel. Constraint: pageName requires viewType. Returns: { ok: true, data: { case: } } on success. Standard failure format: { ok: false, error: { code, message, suggestion? } }.

ParametersJSON Schema
NameRequiredDescriptionDefault
caseIdYesUnique case identifier/handle to retrieve.
viewTypeNoOptional upstream view selector. Can be scalar or list depending on API behavior.
pageNameNoOptional page/view name. Provide this together with viewType.
originChannelNoOptional channel hint, for example Web or Mobile.

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, description carries full burden and successfully discloses success/failure response structures and the dependency constraint between pageName and viewType. Lacks auth or rate limit details but covers the essential behavioral contract.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense, mechanical structure with minimal waste. Each sentence delivers distinct value: purpose, parameter requirements, constraints, and return formats. 'Use this tool to' is slight filler but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive for a read operation with no output schema: documents return structure, error format, and input constraints. Sibling differentiation would strengthen it, but technically sufficient for invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing baseline 3. Description adds value by documenting the cross-parameter constraint (pageName requires viewType) and explicitly labeling optionality, which aids agent reasoning beyond raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb ('fetch') and resource ('case'), with scope ('one case') that implicitly distinguishes from sibling 'get_cases'. However, lacks explicit differentiation from 'get_case_views' or 'get_case_actions'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Documents cross-parameter constraint ('pageName requires viewType') and required vs optional inputs, which are critical for correct invocation. However, misses explicit guidance on when to use this singular fetch vs 'get_cases' (list) or vs view-specific siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pega.get_case_actionsGet Case ActionsA

Use this tool to discover available actions for a case or fetch a specific action definition. Required input: caseId. Optional inputs: actionId, viewType, excludeAdditionalActions, originChannel. Returns: { ok: true, data: { actions: } } on success. Standard failure format: { ok: false, error: { code, message, suggestion? } }.

ParametersJSON Schema
NameRequiredDescriptionDefault
caseIdYesUnique case identifier/handle.
actionIdNoOptional action identifier. When provided, returns action-level details.
viewTypeNoOptional view type hint used when actionId is provided.
excludeAdditionalActionsNoOptional flag used with actionId to exclude additional actions from the payload.
originChannelNoOptional channel hint, for example Web or Mobile.

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent, so description carries full burden. It discloses return format structure ({ ok: true/false, data/error }) which helps, but omits safety profile (read-only vs destructive), rate limits, or auth requirements despite mutation-sounding siblings existing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Efficiently structured with purpose first, then inputs, then outputs. Each sentence delivers distinct information (functionality, input cardinality, return contracts). Slightly verbose in documenting JSON return structure inline.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequately compensates for missing output schema by documenting both success and failure response formats. With 5 parameters and good schema coverage, the description provides sufficient context to invoke the tool, though workflow relationships could be clearer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing baseline 3. Description categorizes parameters as 'Required' and 'Optional' which mirrors the schema but adds no additional semantic context (e.g., example values for originChannel, relationship between actionId and viewType).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific verbs ('discover', 'fetch') and resource ('actions for a case'), clearly identifying it queries case actions. Lacks explicit differentiation from sibling 'submit_case_action' (discovery vs execution).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage by delineating required (caseId) vs optional inputs, but provides no explicit guidance on when to use versus 'get_case' or workflow sequencing before 'submit_case_action'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pega.get_casesGet CasesB

Use this tool to list cases. Optional input: limit. Returns: { ok: true, data: { cases: [...] } } on success. Standard failure format: { ok: false, error: { code, message, suggestion? } }.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoOptional max number of cases to return.

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It adds valuable return structure documentation (success and failure JSON formats) compensating for the missing output schema. However, it omits critical safety information (read-only vs destructive), pagination behavior, and case structure details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Contains filler phrase 'Use this tool to' that wastes space. Front-loading is reasonable but the mixing of input specification with return format documentation creates slight structural awkwardness. No redundant sentences beyond the optional input mention.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Reasonably complete for a simple listing tool with one optional parameter. Return format description compensates for lack of output schema. However, missing safety characteristics (read-only status) and sibling differentiation given the presence of 'get_case'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (limit parameter fully documented). Description merely repeats 'Optional input: limit' without adding semantics about default behavior when omitted, or valid use cases for the 1-500 range.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool 'list cases' with specific verb and resource. However, it fails to distinguish from sibling tool 'get_case' (singular), which likely retrieves a specific case by ID versus listing multiple cases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides no guidance on when to use this tool versus the singular 'get_case' or other sibling tools. No mention of prerequisites, filtering capabilities, or search patterns.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pega.get_case_viewsGet Case ViewsA

Use this tool to retrieve metadata for a specific case view. Required inputs: caseId, viewId. Optional input: originChannel. Returns: { ok: true, data: { view: } } on success. Standard failure format: { ok: false, error: { code, message, suggestion? } }.

ParametersJSON Schema
NameRequiredDescriptionDefault
caseIdYesUnique case identifier/handle.
viewIdYesView identifier/name to retrieve for the case.
originChannelNoOptional channel hint, for example Web or Mobile.

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of disclosing behavior. It effectively documents the exact JSON response structure for both success and failure cases, compensating for the missing output schema. However, it doesn't mention idempotency, caching, or rate limiting characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured logically with purpose first, then inputs, then outputs. It is appropriately concise with no redundant sentences, though the input listing is somewhat mechanical and could be integrated more fluidly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema and annotations, the description adequately completes the documentation by manually specifying the return payload structure and error format. For a simple three-parameter retrieval tool, this provides sufficient context for invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, documenting all three parameters including originChannel's channel hint semantics. The description merely lists the parameter names and their required/optional status without adding syntax details, usage examples, or semantic context beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves 'metadata for a specific case view' using specific verbs and resources. While it doesn't explicitly name sibling tools to differentiate from 'get_case' or 'get_case_actions', the target resource (view metadata) is distinct enough to avoid confusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description lists required and optional inputs but provides no guidance on when to use this tool versus siblings like 'pega.get_case' or 'pega.get_case_actions'. There are no prerequisites, conditions, or exclusion criteria mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pega.submit_case_actionSubmit Case ActionB

Use this tool to execute an action on an existing case. Required inputs: caseId, action. Optional inputs: content, pageInstructions, attachments, eTag, viewType, pageName, originChannel. Returns: { ok: true, data: } on success. Standard failure format: { ok: false, error: { code, message, suggestion? } }.

ParametersJSON Schema
NameRequiredDescriptionDefault
caseIdYesUnique case identifier/handle.
actionYesAction identifier/name to execute.
eTagNoOptional optimistic-lock value sent as If-Match header.
contentNoOptional action payload sent to the upstream endpoint.
pageInstructionsNoOptional page instructions forwarded upstream.
attachmentsNoOptional action attachment operations.
viewTypeNoOptional response shape hint forwarded as query parameter.
pageNameNoOptional page name query parameter used with viewType.
originChannelNoOptional channel hint, for example Web or Mobile.

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It documents the response format (success/error structure) which adds value, but fails to disclose mutation side effects, optimistic locking failure behavior (despite eTag parameter), or idempotency characteristics of the submit operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear ordering: purpose statement, input categorization, return format. The optional input list is somewhat lengthy but efficiently presented. No redundant or filler text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequately covers the 9-parameter mutation operation with return format documentation, but gaps remain for a complex tool: no sibling relationship context, no side effect disclosure, and no output schema reference to compensate for the complex nested object parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% description coverage, establishing baseline 3. The description categorizes inputs as required/optional but adds no semantic depth beyond the schema (e.g., doesn't explain that eTag is for concurrency control or how content structure relates to specific actions).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool executes an action on an existing case, distinguishing it from sibling 'get' operations (get_case, get_cases, get_case_actions). However, it misses opportunity to clarify the relationship with 'get_case_actions' (which lists available actions vs. this tool which executes them).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Lists required and optional inputs but provides no guidance on when to use this tool versus alternatives (e.g., when to execute actions vs. when to simply get case data). No mention of prerequisites like knowing available actions beforehand.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedpega.attach_document_to_case
    • First observedpega.get_case
    • First observedpega.get_case_actions
    • First observedpega.get_case_views
    • First observedpega.get_cases
    • First observedpega.submit_case_action

TDQS

A3.8/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: attaching documents, fetching a single case, discovering actions, listing cases, retrieving view metadata, and submitting actions. The descriptions clearly differentiate between case retrieval, action management, and document handling functions.

Naming Consistency5/5

All tools follow a perfect verb_noun pattern with consistent snake_case naming: attach_document_to_case, get_case, get_case_actions, get_cases, get_case_views, and submit_case_action. The naming convention is predictable and follows the same structure throughout.

Tool Count5/5

Six tools is well-scoped for a case management system, covering core operations like CRUD for cases, action discovery/execution, document attachment, and view retrieval. Each tool earns its place without being overwhelming or insufficient.

Completeness4/5

The toolset provides excellent coverage for case lifecycle management with get/create/update (via submit_action) operations, action discovery/execution, and document attachment. Minor gaps include no explicit case creation tool (though submit_action might cover this) and no case deletion capability, but agents can work around these limitations.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables agents to interact with Salesforce, Atlassian (Jira/Confluence), and Supabase through standardized tools and resources. Provides both read-only access for querying data and write operations for managing records across these enterprise platforms.
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to perform CRUD operations, query data, fetch schemas, and execute custom operations on Microsoft Dynamics 365 CRM entities.
    20
    2
    MIT