# Connect Microsoft Copilot

> Add the CapaOne MCP server to a Copilot Studio agent, then ask it about your devices in Microsoft 365 Copilot and Teams.

Source: https://docs.capaone.com/capaone/mcp-and-api/connect-microsoft-copilot/  
Product: CapaOne — a separate CapaSystems product; do not apply this page to any other.

Use the CapaOne MCP server in Microsoft 365 Copilot and Teams through an agent you build in
Microsoft Copilot Studio. You add the server to the agent as a tool, then publish the agent.

Microsoft 365 Copilot can't add the server by itself, because its own ways of adding an MCP server
don't accept API keys. Copilot Studio can send the key in the `X-Api-Key` header.

:::note[Before you start]
- Access to [Microsoft Copilot Studio](https://copilotstudio.microsoft.com), with permission to
  create and publish agents in a Power Platform environment.
- A CapaOne API key. See [Authentication](/capaone/mcp-and-api/authentication/#create-a-key).
- To use the agent in Teams, your organization must allow Power Platform apps in Teams.
:::

These steps are for agents on Copilot Studio's standard harness, not the GitHub Copilot harness
(preview).

## Add the MCP server to an agent

1. In Copilot Studio, open your agent, or create a new one.
2. Go to the agent's **Tools** page and select **Add a tool**.
3. Select **New tool**. Under **Create new**, select **Model Context Protocol**.
4. Fill in the server details:

   | Field | Value |
   |---|---|
   | **Server name** | `CapaOne` |
   | **Server description** | `Reads our CapaOne organization: devices, inventory, patch compliance, vulnerabilities, Windows events and Admin On Demand elevations.` |
   | **Server URL** | `https://mcp.capaone.com/mcp` |

   The agent reads the description to decide when to call CapaOne, so keep it specific.
5. Select **API key** as the authentication type.
6. Set **Type** to **Header**, and enter `X-Api-Key` as the header name.
7. Select **Create**. The **Add tool** dialog appears.
8. Select **Create a new connection**, and enter your CapaOne API key.
9. Select **Add to agent**.

CapaOne appears on the agent's **Tools** page. Select it to see the CapaOne tools.

## Test the agent

In the agent's test pane, ask `Which organization are you connected to?`. The agent calls
`get_organization` and answers with the name of your CapaOne organization.

If the agent answers without calling CapaOne, check that generative orchestration is on in the
agent's settings. Copilot Studio only calls MCP tools with generative orchestration, which is on by
default.

## Choose whose key the agent uses

The **Authentication** setting under the tool's **Details** decides whose connection the agent
uses:

- **End user**, the default: each person who uses the agent connects with their own CapaOne API key.
- **Maker-provided**: the agent uses your connection, so everyone reads CapaOne with your key.

:::caution[A key reads the whole organization]
An API key reads every device in its organization, whatever the person's role in CapaOne. With
**Maker-provided**, share the agent only with people who may see that data.
:::

A key expires after 30 days, 90 days or 1 year. When it expires, or you revoke it, the CapaOne
tools stop working. [Create a new key](/capaone/mcp-and-api/authentication/#create-a-key), then
create a new connection with it.

## Publish to Microsoft 365 Copilot and Teams

1. Select **Publish** and publish the agent.
2. Select **Channels**, then the **Microsoft 365 and Microsoft Teams** tile.
3. Under **Turn on Microsoft 365**, make sure **Make agent available in Microsoft Copilot** is
   selected.
4. Select **Add channel**.
5. Select **See agent in Teams**, then **Add**.

The agent is installed for you in Teams and Microsoft 365 Copilot. In Microsoft 365 Copilot, enter
**@**, select the agent, and ask about your devices.

To give the agent to others, select **Availability options** in the same panel. You can copy an
installation link, show the agent to the people you shared it with, or submit it to your admin for
the whole organization. Microsoft's
[Connect and configure an agent for Teams and Microsoft Copilot](https://learn.microsoft.com/en-us/microsoft-copilot-studio/publication-add-bot-to-microsoft-teams)
describes each option.

All of the agent's users share your organization's
[rate limit](/capaone/mcp-and-api/rate-limits-and-errors/#rate-limits), and each tool call counts
towards it.

## If a data policy blocks the server

Copilot Studio reaches MCP servers through Power Platform connectors, so your organization's data
policies apply to CapaOne. If **Model Context Protocol** is unavailable, or the CapaOne tools are
blocked, ask your Power Platform administrator to allow the CapaOne connector in the environment's
data policy. See Microsoft's
[Configure data policies for agents](https://learn.microsoft.com/en-us/microsoft-copilot-studio/admin-data-loss-prevention).

## What to ask

Ask the agent the same questions as any other client.
[Connect an MCP Client](/capaone/mcp-and-api/connect-an-mcp-client/#example-prompts) has example
prompts, and [MCP Tools](/capaone/mcp-and-api/mcp-tools/) shows what the agent can fetch.
