In Copilot Studio, I’m trying to connect Copilot to Pega using MCP. I successfully created a new MCP connector by entering the Pega’s MCP service URL. Now I’m trying to connect to Pega but it fails. I’ve already added Microsoft under Network > External Services and the status shows OK. Any help is appreciated.
After further debugging, this is the error message that i see:
“?error=invalid_request&error_description=Invalid+value+provided+for+redirect_uri+parameter”
Where can we find the correct redirect uri?
Hi @Will_Cho , Redirect URI will be shown while adding the MCP url once after you configure the Oauth credntials
@Will_Cho It seems like authorisation is working, but converting the auth code to access token is failing. It would be good to get the Pega logs for the same timestamp to find the actual error.
Hi @Will_Cho : I hope this is the MCP for your application. If this is the case, can you try to add the localhost (http://IP of localhost:1987/mcp/oauth/callback) to the list of redirect URIs in the OAuth 2.0 Client of the Service MCP rule.
IP for localhost is standard. I cannot add this here beucase the forum treats it as a proprietary info.
Thanks.
@Murali.Krishnan.D this is the error message in the Pega log.. do you see any clue? This happens each time I retest.
2026-09-11 17:22:47,034 [se-nio-9443-exec-270] [ STANDARD] [ ] [ ] ( services.http.HTTPService) ERROR lab-20067-us-east-1|127.0.0.1 - Resource not found
com.pega.pegarules.pub.PRException: Couldn't find Rule-Service-Rest instance for the following uri:/oauth2/v1/pzpega_fingerprint_11780680302!!.js
There is a typo in the port in my initial reply. The port should be 19876. This is for the AI harness which im using. Based on my checks, Cloilot studio might have given you a callback URL during configuration.
In this case, you should be adding the callback url generated in the above step in Pega OAuth Client registration.
Thanks.



