Pega MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Pega MCP Servershow me the details and available actions for case C-501"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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_casesInput: optional
limitReturns:
{ ok: true, data: { cases: [...] } }
pega.get_caseInput:
caseId, optionalviewType,pageName,originChannelReturns:
{ ok: true, data: { case: ... } }
pega.get_case_actionsInput:
caseId, optionaloriginChannelReturns:
{ ok: true, data: { actions: ... } }
pega.get_case_viewsInput:
caseId,viewId, optionaloriginChannelReturns:
{ ok: true, data: { view: ... } }
pega.attach_document_to_caseInput:
caseId,fileName,mimeType,fileContentBase64Returns:
{ ok: true, data: ... }
pega.submit_case_actionInput:
caseId,action, optionalcontentReturns:
{ 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 examplehttps://your-pega-instance.example.com/prweb)PEGA_CLIENT_IDPEGA_CLIENT_SECRETPEGA_TOKEN_URL(for examplehttps://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/v2Some 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_caseswhenGET /casesis not supported (HTTP 405)Endpoint shape:
POST <PEGA_CASES_API_BASE_PATH>/data_views/<dataViewId>
PEGA_ENABLED_TOOLScomma-separated tool names to allowlistExample:
pega.get_case,pega.get_case_actions
PEGA_DISABLED_TOOLScomma-separated tool names to blocklistExample:
pega.submit_case_action,pega.attach_document_to_case
Run Locally
npm install
cp .env.example .env
npm run devBuild
npm run build
npm startTest
npm testExample 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 toolspega.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? } }.
| Name | Required | Description | Default |
|---|---|---|---|
| caseId | Yes | Unique case identifier/handle. | |
| attachments | No | Optional direct attachment payload array sent to the case attachments endpoint. | |
| fileName | No | File name including extension. | |
| mimeType | No | Optional MIME type for base64 upload mode. | |
| fileContentBase64 | No | Optional document bytes encoded as base64. Used for upload-then-attach mode. | |
| originChannel | No | Optional channel hint, for example Web or Mobile. |
TDQS
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.
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.
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.
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.
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.
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? } }.
| Name | Required | Description | Default |
|---|---|---|---|
| caseId | Yes | Unique case identifier/handle to retrieve. | |
| viewType | No | Optional upstream view selector. Can be scalar or list depending on API behavior. | |
| pageName | No | Optional page/view name. Provide this together with viewType. | |
| originChannel | No | Optional channel hint, for example Web or Mobile. |
TDQS
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.
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.
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.
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.
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.
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? } }.
| Name | Required | Description | Default |
|---|---|---|---|
| caseId | Yes | Unique case identifier/handle. | |
| actionId | No | Optional action identifier. When provided, returns action-level details. | |
| viewType | No | Optional view type hint used when actionId is provided. | |
| excludeAdditionalActions | No | Optional flag used with actionId to exclude additional actions from the payload. | |
| originChannel | No | Optional channel hint, for example Web or Mobile. |
TDQS
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.
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.
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.
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.
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.
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? } }.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Optional max number of cases to return. |
TDQS
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.
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.
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.
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.
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.
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? } }.
| Name | Required | Description | Default |
|---|---|---|---|
| caseId | Yes | Unique case identifier/handle. | |
| viewId | Yes | View identifier/name to retrieve for the case. | |
| originChannel | No | Optional channel hint, for example Web or Mobile. |
TDQS
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.
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.
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.
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.
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.
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? } }.
| Name | Required | Description | Default |
|---|---|---|---|
| caseId | Yes | Unique case identifier/handle. | |
| action | Yes | Action identifier/name to execute. | |
| eTag | No | Optional optimistic-lock value sent as If-Match header. | |
| content | No | Optional action payload sent to the upstream endpoint. | |
| pageInstructions | No | Optional page instructions forwarded upstream. | |
| attachments | No | Optional action attachment operations. | |
| viewType | No | Optional response shape hint forwarded as query parameter. | |
| pageName | No | Optional page name query parameter used with viewType. | |
| originChannel | No | Optional channel hint, for example Web or Mobile. |
TDQS
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.
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.
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.
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.
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.
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.
6 tool updates
v0.1.0- First observed
pega.attach_document_to_case - First observed
pega.get_case - First observed
pega.get_case_actions - First observed
pega.get_case_views - First observed
pega.get_cases - First observed
pega.submit_case_action
TDQS
Scored across 6 tools
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.
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.
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.
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
Related MCP Connectors
SaaS intelligence for AI agents. 5 unified tools cover 1,000+ services with 91-96% token savings.
Governed retail, FMCG, and CPG operational tools: runs, cases, approvals, audit-ready execution.
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables 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-
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Salesforce data and services via custom MCP tools, including account analytics, opportunity queries, case creation, and AI agent invocation.4-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to perform CRUD operations, query data, fetch schemas, and execute custom operations on Microsoft Dynamics 365 CRM entities.202MIT

CaseMargin MCP Serverofficial
AlicenseAqualityAmaintenanceExposes support case reasoning tools — generate structured case briefs and check escalation readiness from any MCP-compatible AI client.2931MIT