# Build a Valsight agent in Microsoft Copilot Studio
URL: https://docs.valsight.ai/build-copilot-studio-agent/
Description: Create a Copilot Studio agent that works with your Valsight projects through the Valsight MCP server, and publish it to Microsoft 365 Copilot and Teams.
## Goal

You will have your own agent in Microsoft Copilot Studio that is connected to the [Valsight MCP server](/valsight-mcp-server/), published to **Microsoft 365 Copilot** and **Teams**, and able to read and change your Valsight projects with your permissions. Setup takes about 15 minutes.

> **Prerequisites**
>
> * A Valsight account with administrator permissions
> * Network access to your Valsight instance

Verify access programmatically before proceeding: `GET {base_url}/api/v1/health` must return HTTP 200 with a valid API key in the `X-API-Key` header.

You also need:

* **A Valsight account** on the instance the agent should work with. You copy the instance's MCP server address from your Valsight profile in [step 5](#enter-the-server-details).
* **Access to [Copilot Studio](https://copilotstudio.microsoft.com)** with permission to create agents in an environment.
* **Copilot credits** for that environment. Without credits the agent cannot answer, not even in the test preview.
* **MCP connections allowed** by your organization's Power Platform data policy (DLP). If adding the tool fails, ask your Power Platform admin.

*Note: The screenshots show Copilot Studio in German. Each step names the English label first and the German label in brackets. Microsoft changes these screens often — if a label differs in your version, look for the closest match.*

## Steps

### Open Copilot Studio and check the environment

Open [copilotstudio.microsoft.com](https://copilotstudio.microsoft.com). Bottom left, check that the environment you want to build in is selected — click it to switch.

![Copilot Studio start page with the environment switcher at the bottom left](./images/copilot-studio-01-start-page.png)

### Create a new agent

1. In the left bar, click **Agents** (*Agenten*).
2. Open the arrow next to **New agent** (*Neuer Agent*) and choose **Agent** — the one marked *Uses Copilot Credits* under *Streamline business processes* (*Geschäftsprozesse optimieren*).

![New agent menu with the Agent option highlighted](./images/copilot-studio-02-new-agent.png)

### Name the agent and write its instructions

1. Click the title **Untitled agent** (*Unbenannter Agent*) and name it, for example `Valsight`.
2. Replace the placeholder text under **Instructions** (*Anweisungen*) with your own. Good instructions for a Valsight agent say:
   * **Role and scope** — who uses the agent and for what (for example: understanding models, simulating scenarios, building dashboards).
   * **Use the tools for facts** — never invent model names, nodes, or values; if a tool returns nothing, say so.
   * **Use the Valsight documentation search** for how-to and methodology questions before general knowledge.
   * **Confirm before changing** — describe the plan for larger changes and ask before anything that changes or deletes existing content.
   * **Check the result** after a change with a read tool, and report honestly what worked.
   * **Tone and language** — for example: concise, numbers with unit and period.
3. In the right panel, under **Tools** (*Werkzeuge*), remove the preset **Work IQ** tool (click its **×**) unless the agent also needs your Microsoft 365 data.

![New agent with the title field, the instructions placeholder and the preset Work IQ tool](./images/copilot-studio-03-name-and-instructions.png)

### Add the Valsight MCP server as a tool

1. In the right panel, click **+** next to **Tools** (*Werkzeuge*).
2. In the **Add a tool** (*Tool hinzufügen*) dialog, click **+ Add** (*Hinzufügen*) and choose **Model Context Protocol (MCP)**.

![Right panel with the Tools section](./images/copilot-studio-04-tools-section.png)

![Add a tool dialog with Model Context Protocol (MCP) selected in the Add menu](./images/copilot-studio-05-add-mcp-tool.png)

### Enter the server details

First, copy your MCP server address from Valsight. Every Valsight instance has its own address, so don't copy one from a colleague at another company or from an example.

1. In Valsight, click your avatar at the bottom of the navigation bar. Your user profile opens.
2. Under **AI Clients (MCP)**, click **Connect an AI Client**.
3. Click the copy button next to **Your server address**.

If your profile has no **AI Clients (MCP)** section, or you are on Valsight 7.3.0 or 7.3.1, see [Your MCP server address](/connect-ai-client-to-valsight-mcp/#your-mcp-server-address).

Then fill in the **Add MCP server** (*MCP-Server hinzufügen*) form:

| Field                                         | Value                                                                                                                                                     |
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Server name** (*Servername*)                | `Valsight MCP-Server`                                                                                                                                     |
| **Server description** (*Serverbeschreibung*) | `Valsight: models, nodes, scenarios, dashboards and documentation search` — the agent reads this to decide when to call Valsight, so keep it descriptive. |
| **Server URL** (*Server-URL*)                 | Paste the server address you just copied — one continuous string, no trailing space.                                                                      |
| **Authentication** (*Authentifizierung*)      | **OAuth 2.0**                                                                                                                                             |
| **Configuration type** (*Konfigurationstyp*)  | **Dynamic discovery** (*Dynamisch (mit Ermittlung)*) — no client ID or secret needed.                                                                     |

Click **Add** (*Hinzufügen*).

![Add MCP server form with name, description, server URL, OAuth 2.0 and dynamic discovery](./images/copilot-studio-06-mcp-server-form.png)

### Create the connection

1. In **Choose connection** (*Verbindung auswählen*), open the **Not connected** list and click **Create new connection**.
2. Click **Create**. A browser window opens for the sign-in.

![Connection list showing Create new connection](./images/copilot-studio-07-create-connection.png)

![Create connection dialog for the Valsight MCP server](./images/copilot-studio-08-confirm-connection.png)

### Approve access and sign in to Valsight

1. The window shows an **Authorization Request** from **id.valsight.com** — Valsight's own identity service. Click **Approve**.
2. Sign in with your **existing** Valsight account — your work e-mail and password, or your company's single sign-on. Never click **Register**; your account already exists.

![Valsight authorization request with the Approve button](./images/copilot-studio-09-approve-access.png)

### Add the tool to the agent

Back in Copilot Studio, the connection now shows **Valsight MCP-Server** with a green check. Click **Add** (*Hinzufügen*). The tool appears under **Tools**, and a message confirms *Valsight MCP-Server added*.

Under **Knowledge** (*Wissen*), remove **Search all websites** (the globe entry) if the agent should answer only from Valsight and its documentation.

![Choose connection dialog with the connected Valsight MCP server](./images/copilot-studio-10-add-connected-tool.png)

![Right panel with the Valsight MCP server listed under Tools](./images/copilot-studio-11-tool-added.png)

### Choose a model

At the top of the right panel, open **Model** and pick a fixed model from *Most powerful at complex tasks* or *Versatile and highly intelligent* instead of **Auto**.

Building and changing Valsight models means many tool calls in a row. **Auto** may switch to a smaller model for single steps, which follows tool calls less reliably. Keep **Auto** only if credits are tight and the agent mostly reads.

![Model menu listing Auto and the available models](./images/copilot-studio-12-choose-model.png)

### Save the agent

Click the **Save** icon (*Speichern*, `Ctrl+S`) at the top right.

![Save icon in the top bar](./images/copilot-studio-13-save.png)

### Test the agent in the preview

Open the **Preview** tab (*Vorschau*) and ask something that needs live data, for example `List my projects`. The first time the agent calls Valsight it may ask you to sign in or confirm the connection.

![Preview tab with the agent's greeting](./images/copilot-studio-14-test-preview.png)

### Publish to Teams and Microsoft 365 Copilot

1. Click **Publish** (*Veröffentlichen*) at the top right.
2. In the dialog, click **+ Add channel** (*Kanal hinzufügen*) and choose **Teams + Microsoft 365**.
3. Under **Available in** (*Verfügbar in*), keep **Microsoft 365 Copilot and Microsoft Teams** and click **Add channel** (*Kanal hinzufügen*). This setting cannot be changed after publishing.
4. Click **Publish agent** (*Agent veröffentlichen*).

![Publish dialog without a channel yet](./images/copilot-studio-15-publish-no-channel.png)

![Add a channel dialog with Teams + Microsoft 365](./images/copilot-studio-16-add-channel.png)

![Availability setting: Microsoft 365 Copilot and Microsoft Teams](./images/copilot-studio-17-channel-availability.png)

![Publish dialog with the Teams + Microsoft 365 channel and the Publish agent button](./images/copilot-studio-18-publish-agent.png)

### Open the agent in Microsoft 365 Copilot

Add the agent to Microsoft 365 Copilot with its sharing link. The **See in Teams + Microsoft 365** link and the **Open with Copilot** button do not reliably add it.

1. When the agent is published, click **Share** (*Teilen*). Later, you reach the same dialog with the **Share** icon at the top right.
2. Click **Copy sharing link** → **Copy can use link** → **Copilot**. The link is now on your clipboard.
3. Paste the link into your browser's address bar and open it. Microsoft 365 Copilot opens with the agent.
4. From now on, find the agent in Microsoft 365 Copilot under **Agents** in the left bar.

Changes to the instructions, model, or tools reach Teams and Microsoft 365 Copilot only after you **publish** again.

![Agent published successfully, with the Share button](./images/copilot-studio-19-published.png)

![Share dialog with Copy can use link and the Copilot option](./images/copilot-studio-23-share-agent.png)

![Microsoft 365 Copilot Agents menu listing the Valsight agent](./images/copilot-studio-21-agent-in-copilot.png)

### Share the agent with colleagues (optional)

In the **Share** dialog, add your colleagues under **Add a name, group, or email** so they may use the agent, then send them the same **Copy can use link** → **Copilot** link. If each colleague should work with their own Valsight account and permissions, have them build their own agent with this guide instead.

## Verify

Ask the agent in Microsoft 365 Copilot to list your projects. A list of your real Valsight projects confirms that the connection works.

![Microsoft 365 Copilot answering with the projects from Valsight](./images/copilot-studio-22-first-answer.png)

To check the limits in force, ask the agent to show the session's access settings — it reports the account, instance, access level, data access, and project scope. How to restrict a session is covered in [Control the session](/connect-ai-client-to-valsight-mcp/#control-the-session).

## Troubleshooting

| Problem                                                                       | Cause                                                            | Fix                                                                                                                                 |
| ----------------------------------------------------------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| *Couldn't load MCP tools – HTTP 401*                                          | Sign-in missing or expired, or no Valsight user on the instance. | Create the connection again and sign in. Check that you can log in to Valsight directly.                                            |
| Adding the MCP tool fails                                                     | Your organization's data policy (DLP) blocks MCP connections.    | Ask your Power Platform admin to allow them.                                                                                        |
| The agent does not answer, even in the preview                                | No Copilot credits for the environment.                          | Ask your Power Platform admin for credits.                                                                                          |
| The agent invents models or values                                            | Web search on or instructions missing.                           | Remove *Search all websites* and add the instructions from [step 3](#name-the-agent-and-write-its-instructions).                    |
| The agent doesn't appear in Microsoft 365 Copilot after **Open with Copilot** | That route doesn't reliably add the agent.                       | Open the agent with its sharing link instead ([Open the agent in Microsoft 365 Copilot](#open-the-agent-in-microsoft-365-copilot)). |
| Changes don't show in Teams or Copilot                                        | The agent was not published again.                               | Click **Publish** again.                                                                                                            |

Login trouble on the Valsight side? Contact your Valsight admin or <support@valsight.com>. Copilot Studio licenses, credits, and policies are handled by your IT department.

## Related

* [Connect an AI client to the Valsight MCP server](/connect-ai-client-to-valsight-mcp/): your server address, the sign-in flow, and session limits for every supported client.
* [Valsight MCP integration](/valsight-mcp-server/): what the server can do and how session scope keeps a connection contained.
* [FAQ: Valsight MCP integration](/frequently-asked-questions-valsight-mcp-integration/).
