This article walks through wiring the PEX MCP Server into a Microsoft Copilot Studio agent so the agent can read your PEX account data and call PEX tools on your behalf. By the end you will have an agent that can answer questions like “what is my business profile?” or “list all my PEX cards” directly from live PEX data.Documentation Index
Fetch the complete documentation index at: https://support.pexcard.com/llms.txt
Use this file to discover all available pages before exploring further.
Heads up — Beta feature.Authorized apps and the PEX MCP Server are currently labeled Beta in the PEX dashboard. Behavior and field names may change.About the screenshots. The example uses an internal sandbox tenant and a placeholder user account. Your screen will show your own org, environment, agent name, and account data in the same positions.
What you will need before you start
- An admin account in the PEX dashboard. Production:
https://dashboard.pexcard.com. Sandbox:https://sandbox-dashboard.pexcard.com(this is what the screenshots show). - Access to Microsoft Copilot Studio in the correct Power Platform environment for your org.
- An existing or new agent in Copilot Studio that you want to extend with PEX tools.
- A few minutes — the whole flow takes under five minutes once you know where everything lives.
Step 1. Create or open your Copilot Studio agent
In Copilot Studio, open the agent you want to extend. If the agent was just created, wait for the “Getting things ready…” spinner to finish — the agent must be fully provisioned before you can add tools. When provisioning completes you will see a green confirmation banner near the top of the page: “Your agent has been provisioned.”
Step 2. (Optional) Enable Web Search
If you want the agent to also be able to search public websites — useful for general questions that fall outside PEX data — flip the Web Search toggle to Enabled.
Step 3. Add the PEX MCP Server as a tool
In the Tools section, click + Add tool, then choose Model Context Protocol in the picker that appears. You will be taken to the Add a Model Context Protocol server form. Fill it in like this:| Field | Value |
|---|---|
| Server name | A name for this connection, e.g. My-PEX-MCP-Server. This is the label your agent will see. |
| Server description | Plain-English description, e.g. “This is the set of tools to manage the PEX account.” |
| Server URL | The PEX MCP endpoint. Production: https://marketplace.pexcard.com/mcp. Sandbox: https://sandbox-marketplace.pexcard.com/mcp. |
| Authentication | Select API key. |
| Type | Header |
| Header name | X-Pex-Api-Token |

Common mistake.The header name is case-sensitive and must be exactly
X-Pex-Api-Token. If the header name is wrong, the connection will fail silently when the agent tries to call a tool.Step 4. Generate an API token from the PEX dashboard
In a new browser tab, sign in to the PEX dashboard and open your user profile (click your avatar in the top-right and choose your name). Click the Authorized apps tab (marked Beta).
Treat this token like a password.Anyone with the token can call PEX tools as you. If you suspect it has been exposed, revoke it on this same page and generate a new one. PEX support contact for anything unusual:
adminsupport@pexcard.com.Step 5. Connect the MCP Server with your token
Switch back to the Copilot Studio tab. After clicking Continue on the form, Copilot Studio will open the Connect to <Server name> dialog. Paste the API token into the credential field and click Create.

Step 6. Verify the connection in Manage Connections
This is the step that catches most people. Adding the tool registers the connection but does not always activate it. Open the Power Platform connections manager (Copilot Studio links to it directly when you try to use the tool the first time). If the connection shows Not Connected, click the Connect link in that row and follow the prompt. You only need to do this once per environment.
Step 7. Test the agent
Open the Test your agent panel on the right side of Copilot Studio and try a prompt that exercises the new tool, for example:can you see the My-PEX-MCP-Server tool?If the connection has not been activated yet, the agent will respond with a prompt to open the connection manager and retry — finish Step 6 and click Retry.

- Card tools — list cards, card orders, card spend rules, scheduled funding, load limits.
- Transaction tools — cardholder transactions, network transactions, transaction details, attachments.
- Business tools — business profile, admins, billing, linked accounts, one-time transfers.
- Spending rulesets — list rulesets, ruleset cards.
- Other — vendors, bills, payments, invoices, callback subscriptions, MCC categories, groups & cardholders.

what is my business?The agent will call
pex_get_business_profile and return your live business profile — Business Account ID, name, address, contact info, etc. The middle pane in Copilot Studio shows the raw tool output and the agent’s formatted response side-by-side.

Bonus: Make the agent smarter with the PEX support site
The MCP server gives the agent live access to your account data (cards, transactions, business profile, etc.). It does not, by itself, teach the agent how PEX works — what features exist, what fields mean, or what the recommended way to do something is. For that, point the agent athttps://support.pexcard.com as a Knowledge source. Once added, the agent can ground its answers in the same help articles a PEX customer would read, and questions like “how do I issue a virtual card?” or “what’s the difference between a vendor card and a cardholder card?” will get accurate, sourced answers.
Heads up — data flow.Adding a public website as a Knowledge source uses Microsoft Grounding with Bing Search / Bing Custom Search. That means search queries leave your Copilot Studio tenant and hit Microsoft’s Bing service. Confirm this is acceptable under your org’s compliance policy before enabling.
Step A. Open the Add knowledge picker
On your agent’s Overview page, find the Knowledge section and click + Add knowledge. You will see a picker with the available source types — file upload, OneDrive/SharePoint, Public websites, SharePoint, Azure AI Search, Dataverse, Dynamics 365, Salesforce, ServiceNow, Azure SQL. Click the Public websites tile.
Step B. Enter the PEX support site URL
In the Add public websites dialog, pastehttps://support.pexcard.com into the Public website link field, then click Add.

Step C. Confirm the source and add it to the agent
Copilot Studio creates an entry with a default Name and Description. Both fields are editable — tweak them if you want the agent to refer to this source as something specific (for example, “PEX Help Center”). Click Add to agent to finish.
support.pexcard.com as a connected source. From this point on, the agent will consult those help articles whenever a question looks like a “how do I” or “what does X mean” question, and will cite the article in its response.
Tip — combine with the MCP tools.The most useful agent has both: the MCP server for “what is in my account right now” and the support site for “how does PEX work.” Asked something like “why was this transaction declined?”, the agent can look up the live transaction (MCP) and explain the relevant policy from the help center (Knowledge) in the same answer.
Troubleshooting
The agent says it cannot see the tool. The connection is most likely in Not Connected state. Open Manage Connections (Step 6), click Connect on the row, and retry the prompt. Tool calls return 401 / Unauthorized. The API token is invalid, expired, or was pasted with leading/trailing whitespace. Regenerate the token in Authorized apps and update the connection. Tool calls return data from the wrong account. Tokens are scoped to the user who generated them. If you generated the token under one PEX user, the agent will see that user’s account. Generate the token under the correct user. The header name field rejects what I typed. The required header name is exactlyX-Pex-Api-Token (capital X, capital P, capital A, capital T). Other casings will not work.
I don’t see the Authorized apps tab.
The feature is in Beta. If your dashboard does not yet show the tab, contact PEX support to confirm your account is enabled for the beta.
Revoking access
To revoke an agent’s access to PEX:- Open the Authorized apps tab in the PEX dashboard.
- Revoke the token associated with PEX MCP Server.
- (Optional) Remove the tool from the agent in Copilot Studio under Tools.
Need more help?
- For PEX-side issues (tokens, account access, MCP server availability), email
adminsupport@pexcard.com. - For Copilot Studio issues (agents, connections, environments), see Microsoft’s Copilot Studio documentation.