This knowledge-sharing article shows how to connect two different Pega applications using the Model Context Protocol (MCP). The target app acts as an MCP server and exposes case operations as tools. The source app acts as an MCP client, and its AI agent calls those tools to create, query and work cases in the target app.
Pega Infinity version used: 26.1.1
How to configure (MCP server)
Note: Grant Management is used as the target app that serves as the MCP server in this example.
Step 1 – Create an MCP tool for the Application Intake case type.
Select the case type.
Enter the parameters that the MCP client will provide when invoking this tool.
Step 2 – Create an MCP Service rule that exposes the MCP tools to MCP clients.
Select the tool created in Step 1 above.
In addition, under the Tools tab, I selected multiple OOTB tools.
Step 3 - Create an OAuth 2.0 client registration.
This client registration is used to authenticate and authorize requests from the MCP client when connecting to the MCP server.
Click the View & download button before saving the rule. Save the client credentials file, which will be provided to the MCP client later.

In the Supported grant types section, select Client credentials and Operator ID.
Other configurations:
How to configure (MCP client)
Step 1 - Create an Authentication Profile rule.
Enter the client identifier and client secret from the client crecentials file downloaded and provided by the MCP server above.
Enter the Access token endpoint from the client credentials file.
Configurations under the Advanced configuration section:
Step 2 - Create an MCP Connector rule.
Enter the Provide URL, which can be obtained from the MCP Service rule created above.
https://<your host address>/prweb/app/grant-management/api/service/v1/mcp/Rule-Service-MCP!PegaMCPServer
Select the authentication profile created in the previous step.
Click the Test connectivity button. When successful, it will display the available tools.
Step 3 - Create a new AI agent.
Under the Advanced Tools section, enter the MCP Connector rule created in the previous step.
Select additional OOTB tools as needed in the Actions section.
Step 4 - Add the new AI agent to a case type that needs to perform case-related actions in the target app, which serves as the MCP server.
In this example, I am using the General Work case type.
Open the case type, go to the UX tab, and select the new AI agent created in the previous step as shown below.
Runtime behaviors (case processing)
Step 1 - In the source app (acting as an MCP client), launch a new General Work case.
Click the Chat with AI icon to launch the Agent chat window and select Fullscreen.
Step 2 - Enter the following prompt to create a new grant application case in the target app (MCP server) and submit.
Create a new grant application for "Northern State Law Enforcement Consortium" applicant organization using bogus data. Save all data.
The agent responds with a message that a new grant case has been created.
Login to the target app and verify.
Step 2 - Enter the following prompt to update contact email and contact phone number fields in the new grant case and submit.
Change the contact email to “[email protected]” and contact phone number to “8001112222” in the A-15001 grant case.
The agent responds with a confirmation message.
Verify in the target app.
Step 3 - Enter the following prompt to add a Pulse comment to the grant case and submit.
Add a note to the Pulse: “This grant application will be processed remotely.”
The agent responds with a confirmation message.
Verify in the target app.
Step 4 - Enter the following prompt to get the current assignment details of the grant case and submit.
Get the current assignment details.
The agent responds with the requested information.
Verify in the target app.
Step 5 - Enter the following prompt to process the current assignment and submit.
Proceed with this assignment. Change 'Compliance Certification' to 'No (False)'.
The agent responds with a confirmation message.
Verify in the target app. Notice that the Compliance certifiation field has been updated to 'No’, and the case has moved onto the next assignment.
Step 6 - Enter the following prompt to resolve the grant case and submit.
Change the case stage to Resolve with a comment: “Resolved the case remotely.”
The agent responds with a confirmation message.
Verify in the target app.
Step 7 - Enter the following prompt to attach the grant case details to the current General Work case in a PDF document and email the PDF file to the current Operator with key highlights and submit.
Capture all the grant case details in a PDF file and attach the PDF file to this General Work case. Email the PDF file to the current Operator with key highlights.
The agent responds with a confirmation message.
Verify the PDF file attached to the General Work case.
Here is the PDF file generated - GrantCase A-15001 Details.pdf (25.1 KB)
Verify the email received.
Runtime behaviors (various queries)
Step 1 - Enter the following prompt to query all grant applications submitted by “Northern State Law Enforcement Consortium” organization and submit.
List all grant application cases submitted by "Northern State Law Enforcement Consortium" organization. Include case ID, date created, applicant organization, application title, grant requested amount, and contact email. List the results in descending order of date created. Exclude results that have empty application title.
The agent responds with a query result.
Step 2 - Enter the following prompt to query how many grant applications have been created past 7 days and submit.
How many grant application are created past 7 days? List case ID, date created, application title, grant amount requested, and contact email. List the results in descending order of date created. Exclude results that have empty application title.
The agent responds with a query result.
Step 3 - Enter the following prompt to query the large amount grant cases and submit.
List all grant applications where grant requested amount requested is greater than $500,000. Include case ID, date created, application title, grant requested amount, and contact email. List the results in descending order of date created. Exclude results that have empty application title.
The agent responds with a query result.
Step 4 - Enter the following prompt to query a weekly case volume and submit.
Show weekly case volume of grant applications.
The agent responds with a query result.
Step 5 - Enter the following prompt to query the operational insights from the existing grant cases and submit.
Provide Top 3 key insights based on all grant applications created and how to improve timely submission and resolution of grant applications. Be concise. Email the current Operator with the result.
The agent responds with a query result.
Verify the email received.
Some *takeaways* from using MCP
- It’s agentic - The user stated the goal, and the agent worked out which actions to take in the target app and completed them. The user never had to log in to the target app or move between its screens. The agent authenticated through the MCP connection and worked the case on the user’s behalf.
- Chat prompts ran a case from start to finish - The agent created a grant case, updated it, completed an assignment and resolved it. It then saved the details as a PDF and emailed them, all from chat.
- Build it once, reuse it for every scenario - The target app exposes its capabilities once, and the agent finds them at runtime, so there’s no custom integration for each use case. Its own security, rules and audit trail still apply. Users work across both apps in one conversation, and adding a scenario takes only a new MCP tool.
- Access is controlled with OAuth 2.0 and an Operator ID - The client signs in with the server’s credentials, and the agent acts as an operator. That operator’s access decides what the agent can do and cannot.
- It also answers reporting questions - The agent handled filtered and sorted lists, case volume over time, and a short summary of insights. We didn’t have to configure data pages, report definitions, data models, and other rules to process a query.
- (Drawback) The same prompt can get different answers - The agent didn’t always handle the same prompt the same way - e.g. sometimes it updated the “applicant organization” field on the first prompt, but other times I had to send a second prompt to update it. For repeatable work, use precise prompts and verify the results.
Key design decision (deterministic vs agentic)
With Pega Infinity’s agentic capabilities, the key design decision is where a process needs a deterministic step and where it benefits from agentic reasoning. Let the case workflow and business rules own what must be consistent, compliant, and auditable, and let agents handle what requires judgment, with a human-in-the-loop safeguard where it matters. The right balance delivers predictable outcomes with real AI leverage.
Other references (MCP)
- How to expose Pega as MCP server for external AI clients (Infinity '26)
- How to connect Pega AI Agent to external MCP server
===
Please feel free to leave any question or comment.










































