# Connect Copilot Studio to the eGain MCP

Use this guide to connect **Microsoft Copilot Studio** (Power Platform) to your eGain MCP server. You add the MCP tool to a **Standard Agent** so the agent can search and act on your eGain knowledge.

## Prerequisites

- An **eGain Knowledge tenant**. If you do not have one, sign up for a free trial of **AI Knowledge Hub** or **AI Developer** on [eGain.com](https://www.egain.com/), or ask your eGain administrator to create an account for you in your team's existing tenant.
- **Administration Console access** for the partition you want Copilot Studio to read from (needed to enable Remote MCP).
- **Copilot Studio access** with permission to create **Standard Agents** and add tools. MCP access mirrors your eGain user's permissions — Copilot Studio can only access the portals and articles that your eGain user account can access.


**Contact Support before you set up Remote MCP**
For versions 21.24 and earlier, Remote MCP is not available in all customer environments. [Contact Support](https://media.egain.com/support/self-provisioned.asp) to enable Remote MCP for your tenant or to confirm availability for your environment.

## Step 1: Enable Remote MCP in your eGain tenant

1. Sign in to your eGain Administration Console. Your tenant URL follows the pattern `https://<your-eGain-hostname>/<your-tenant-id>` — for example, `https://ai.egain.cloud/a1b2` or `https://aidev.egain.cloud/a1b2`.
2. Go to **Partition** → **Integration** → **MCP**.
3. Turn on the **Enable Remote MCP** toggle.
4. Select one of the available tabs for your use case:


- **Agent:** for agent-only MCP access.
- **Authenticated Customer:** for authenticated customer access.
- **Anonymous Customer:** for anonymous customer access.


1. Click the copy icon next to the **MCP Server URL** field to copy the URL. You will paste this into Copilot Studio in the next step.
![](/assets/mcp-claude-admin.5faba482f5a31be95a654a72a125fd0f38ccd71e71ac6fc34f533e70948451cd.afe294b5.png)


## Step 2: Add the eGain MCP to Copilot Studio

1. Open [Copilot Studio](https://copilotstudio.microsoft.com/) and go to the **Agents** tab. Click the dropdown beside **New Agent**, then select **Agent (Standard)**.
![](/assets/mcp-copilot-agent.1c8eb6f3427f610f23e9dc6033d2d6b0845aa09902f874db8d84afdfe217f180.afe294b5.png)
2. Name your agent and complete the initial setup.
3. In the top navigation bar, go to **Tools** and click **Add a tool**.
![](/assets/mcp-copilot-tools.256adf84d6a821e13a0bc0bd228ac7a8028f6c2509a1d3adb2e26f9acc38d996.afe294b5.png)
4. In the popup, select **Model Context Protocol**.
![](/assets/mcp-copilot-popup.0a2106caf25833f33e58f35ae8903f251840357a772bc17259acfbe38eb95174.afe294b5.png)
5. Enter a tool name and paste the **MCP Server URL** you copied from the Administration Console into the **URL** field.
6. Set **Authentication** based on the MCP URL you copied:


* **Anonymous MCP URL:** set **Authentication** to **None**, then save. You can skip the remaining steps in this section.
* **Authenticated MCP URL:** set **Authentication** to **OAuth 2.0** and **Manual**, then continue below.
![](/assets/mcp-copilot-general.891e0f0797035ef7fb7421bb3ce952869c3539c1693cbba43976cb3d7d31797a.afe294b5.png)


1. In the eGain Administration Console, register Copilot Studio as an MCP client:
2. Browser to **Integration > MCP**. On the **Agent** tab, click **Add**.
3. Enter a **Name** (for example, Copilot), a **Description**, and a temporary *https://* URL in **Redirect URL**. Click **Save**.
4. Copy the client credentials from eGain into Copilot Studio:
5. Under **MCP: Registered Clients**, click **Options > Edit** for the Copilot client. Copy the **Client ID**.
6. In the **Secret** section, create one with a **Name** and turn on the **Status** toggle.
7. Copy the secret value right away, because it is not displayed again. Click **Save**.
8. Return to the Copilot Studio agent and paste the client ID and client secret into their respective fields.
![](/assets/mcp-copilot-config.e4d9bec4d6ad89b68e8a61e62f754022cff356df5e6c95d0419661e1aa500805.afe294b5.png)
9. Return to the eGain Administration Console and navigate to the **Client Application** page, click **Metadata** to open your OAuth endpoints. See [Find Your API Endpoints (Metadata)](/developer-portal/guides/authentication/metadata) for details.


Copy these values into the Copilot Studio MCP configuration:

* **Authorization URL** — from **Authorization URL** in Metadata
* **Token URL** — from **Access Token URL** in Metadata
* **Refresh Token URL** — use the same value as **Access Token URL**
![](/assets/mcp-copilot-fields.c25ad4f155b057bc89c621708c23c5a1503303449782598a141cc70cfd2075b3.afe294b5.png)


1. Save the MCP tool in Copilot Studio. Copilot Studio now displays the **redirect URL**. Copy it, return to the eGain registered client, replace the temporary **Redirect URL** with Copilot Studio's value exactly, and save.
![](/assets/mcp-copilot-redirect.27d132ebbcd39e0b86cb0b5541d8e00757e8a27a74f493c3d4883da6ef142dcd.afe294b5.png)
2. In Copilot Studio, click **Create new connection**. Sign in with your eGain account when prompted. After successful login, the connection is ready and you can **Add and configure** the MCP to your agent.
![](/assets/mcp-copilot-connection.10f164062345869e90cb85693de1b37c19be64f6120e6902360d98a1b1d44a0b.afe294b5.png)


For Copilot Studio MCP and agent details, see Microsoft's [Model Context Protocol in Copilot Studio](https://learn.microsoft.com/en-us/microsoft-copilot-studio/agent-extend-action-mcp) documentation.

## Step 3: Test the connection

Open your agent in Copilot Studio and ask something like:

> *"What does our master knowledge base say about refunds?"*


## Authentication & Permissions

- **Authentication:** Copilot Studio authenticates using OAuth 2.0 with your eGain account. Copilot Studio never sees your account password.
- **Visibility:** Copilot Studio can only see the portals and articles your eGain user is allowed to see.
- **Revoking access:** Revoke access at any time from Copilot Studio by removing or updating the MCP connection, or from your eGain account settings.
- **Anonymous access:** If your portal allows it, you can skip sign-in entirely. Copilot Studio will see only what unauthenticated visitors see on your portal.


## Troubleshooting

- **Connection fails after OAuth setup.** Verify the Authorization URL, Token URL, and Refresh Token URL match the values in your registered client's **Metadata**. Confirm the **Redirect URL** in eGain matches the redirect URL from Copilot Studio exactly.
- **Anonymous MCP still prompts for sign-in.** Confirm **Authentication** is set to **None** in the Copilot Studio MCP configuration.
- **"No portals found".** Confirm that the eGain account you signed in with has access to at least one portal.
- **Changed eGain tenants.** Remove the MCP tool and reconnect using the new tenant's MCP Server URL.
- **Sign-in loop in the browser.** Disconnect the connection and recreate it, or try a private window or a different browser.


For more issues, see the [MCP Troubleshooting guide](/developer-portal/guides/mcp/troubleshooting).

## Support and privacy

- **Support:** For issues not covered above, [Contact Support](https://media.egain.com/support/self-provisioned.asp).
- **Privacy:** [eGain Privacy Policy](https://www.egain.com/privacy-policies/)