Connect Microsoft Copilot Studio
Connect Microsoft Copilot Studio
Give a Copilot Studio agent DataMagik's tools, then publish it to Teams or Microsoft 365 Copilot.
Copilot Studio agents use the DataMagik MCP server as a tool. You add it once with the MCP onboarding wizard; Copilot Studio creates a custom connector for it behind the scenes.
Before you start
- A Copilot Studio license and permission to create agents in a Power Platform environment.
- An agent with generative orchestration turned on (the default for new agents). MCP tools are only used by generative orchestration.
- If your organization uses Power Platform data policies (DLP), a Power Platform administrator may need to allow the DataMagik custom connector in that environment.
- A DataMagik account with the permissions the agent's users will need.
1. Add the DataMagik MCP server
- In Copilot Studio, open your agent and go to the Tools page.
- Select Add a tool, then New tool, then Model Context Protocol. The MCP onboarding wizard opens.
- Fill in the server details:
The description helps the agent decide when to use DataMagik, so describe what your users will ask about.Field Value Server name DataMagikServer description Plex ERP data, reports, scripts, documents, labels and apps from DataMagik. Use it for questions about production, inventory, shipping, quality and scrap.Server URL https://mcp.data-magik.com/mcp - Under Authentication, choose OAuth 2.0, then Dynamic discovery. Copilot Studio finds DataMagik's sign-in endpoints and registers itself. Do not enter a client ID or secret.
- Select Create.
2. Create a connection and add the tool
- In the Add tool dialog, open Connection and choose Create new connection.
- A DataMagik sign-in page opens. Sign in with your DataMagik account and approve access.
- Select Add and configure (or Add to agent). Copilot Studio reads DataMagik's tools and lists them under the agent's tools.
3. Choose whose DataMagik account the agent uses
On the tool's settings, choose the credentials it runs with:
- End user credentials (recommended) — each person signs in to DataMagik the first time the agent needs it, and the agent acts with that person's DataMagik permissions. Changes are recorded under that person's name.
- Maker-provided credentials — everyone uses the connection you created. Only choose this with a DataMagik user set up for the agent that has the narrowest permissions it needs (usually DataMagik - Viewer), never a personal administrator account.
4. Limit the tools
The DataMagik server offers many tools. On the agent's Tools page, open DataMagik and turn off the ones this agent does not need. A shop-floor or reporting agent usually needs only the read tools for SQL, data sources, dashboards and Shop Floor. Leaving out tools that create, update, delete, execute or send keeps the agent read-only.
For a single, well-defined job, consider a workflow or script that does exactly that job, and have the agent ask DataMagik to run it.
5. Test and publish
- In the Test pane, ask: "Which DataMagik company am I working in?", then a real question such as "What was scrap by workcenter yesterday?" Sign in to DataMagik when asked.
- Check the activity map to confirm the agent called DataMagik and not another source.
- Publish the agent and add it to the channels you want, such as Microsoft Teams or Microsoft 365 Copilot.
Troubleshooting
| Problem | What to do |
|---|---|
| The wizard asks for a client ID or secret | Check that authentication is OAuth 2.0 > Dynamic discovery and the URL is exactly https://mcp.data-magik.com/mcp. |
| The connection is blocked | A data policy blocks custom connectors in this environment. Ask your Power Platform administrator. |
| The agent answers without calling DataMagik | Make the server description more specific, and check generative orchestration is on. |
| Users are asked to sign in again | Expected the first time each user uses the agent with end user credentials, or after their DataMagik session or account changes. |
| A tool is refused | The signed-in DataMagik user lacks the permission or license. Ask your DataMagik administrator. |