Connect Microsoft Copilot Agent to Your DataSelf Data Warehouse

This explains how to build your own AI agent on top of your DataSelf MCP+ for Data Warehousing using Microsoft Copilot Studio or a Microsoft 365 Copilot custom agent (declarative agent).

A custom agent differs from simply adding the connector to Copilot chat (see Connect Microsoft Copilot to Your DataSelf Data Warehouse). With a custom agent you also control the agent's name, instructions, tone, scope, and who in your organization can use it — so business users get a purpose-built assistant such as Sales Analyst or Inventory Advisor instead of a generic chat.

Which Option Should I Use?

 

Copilot Studio agent

Microsoft 365 Copilot custom agent

Best for

Low-code / no-code builders, business analysts, IT

Developers who want the agent to live natively inside Microsoft 365 Copilot

Where you build

Browser: copilotstudio.microsoft.com

Visual Studio Code + Microsoft 365 Agents Toolkit

Where it runs

Microsoft 365 Copilot, Teams, web chat, and other channels

Microsoft 365 Copilot (m365.cloud.microsoft/chat), Teams, Outlook

Licensing

Copilot Studio license or Copilot Credits

Microsoft 365 Copilot license

Both options connect to the same DataSelf MCP+ server. You can build both if you want.


Before You Start

DataSelf MCP+ is not published in the Microsoft connector catalog. Do not look for it in the list of pre-built or featured connectors — it isn't there. In both options below you add it as a custom MCP server by entering its URL manually.

  • Your DataSelf MCP+ endpoint and credentials. Unless DataSelf gave you a dedicated URL, use:

https://mcp.dataself.com
  • Permission in your Microsoft tenant to create agents. Copilot Studio requires a Power Platform environment; Microsoft 365 Copilot custom agents require Custom App Upload and Copilot Access to be enabled for your account.

  • DataSelf MCP+ uses the Streamable HTTP transport, which is the transport Microsoft supports. SSE is deprecated and is no longer supported.


Option 1: Build the Agent in Copilot Studio

Step 1 — Create the agent

  • Open https://copilotstudio.microsoft.com and sign in with your Microsoft 365 account.

  • Confirm the correct environment is selected in the top-right corner.

  • Select CreateNew agent.

  • Either describe the agent in your own words or select Skip to configure to fill in the fields directly.

  • Give the agent a Name and Description, for example:

Name:        DataSelf Analyst
Description: Answers business questions using the DataSelf data warehouse
             (DS DW) — sales, customers, inventory, and financials.
  • Add Instructions. These matter more than anything else for answer quality. A good starting point:

You are a business intelligence analyst for our company.
Answer questions using only the DataSelf MCP+ data warehouse (DS DW) tools.

- Always discover the available tables and columns before writing a query.
- Never invent table names, column names, or numbers. If the data isn't
  available, say so.
- Prefer aggregated results. Limit exploratory queries to the rows needed.
- State the period and the filters you applied with every answer.
- Return results as a table when comparing values, and add one or two
  sentences of interpretation.
- Amounts are in USD unless the data says otherwise.
  • Select Create.

Step 2 — Add DataSelf MCP+ as a custom MCP server

DataSelf MCP+ is not in the connector catalog, so skip the featured/pre-built connector list and register it yourself with the MCP onboarding wizard.

  • Open the Tools page for your agent.

  • Select Add a toolNew toolModel Context Protocol. The MCP onboarding wizard appears.

  • Fill in the required fields — this is where you supply the custom URL:

Field

Value

Server name

DataSelf MCP+ Data Warehouse DS DW

Server description

Queries the DataSelf data warehouse (DS DW). Lists databases and tables, retrieves metadata, and runs SQL queries against SQL Server.

Server URL

https://mcp.dataself.com

Write the description carefully. The agent's orchestrator reads this text to decide whether to call DataSelf MCP+ at runtime. A vague description is the most common reason an agent ignores the tool.

  • Select the Authentication type for your DataSelf MCP+ endpoint:

    • OAuth 2.0 → Dynamic discovery — recommended. DataSelf MCP+ registers the client automatically, so you don't enter any IDs or secrets.

    • API key — if DataSelf issued you a key. Choose Header or Query and enter the header/parameter name DataSelf provided.

    • OAuth 2.0 → Manual — if you were given a client ID, client secret, authorization URL, token URL, and refresh URL. After you select Create, copy the callback URL that appears and add it to your app registration with your identity provider.

  • Select Create, then Next. The Add tool dialog appears.

  • Select Create a new connection (or reuse an existing one), sign in if prompted, and select Add to agent.

Step 3 — Enable all actions

Open the tool from the Tools page and review the tools DataSelf MCP+ exposes. We recommend enabling all of them so the agent can:

  • Discover available databases and tables

  • Retrieve metadata and column definitions

  • Execute SQL queries

  • Analyze data and return reports and summaries

If any tool is disabled, the agent may report that it cannot see your data even though the connection is healthy.

Step 4 — Test the agent

  • Use the Test your agent pane on the right.

  • Ask: What tables are available in the DataSelf data warehouse?

  • The first call may prompt you to connect or sign in. Select Allow / Connect.

  • Expand the tool call in the test pane to review the exact query the agent executed.

Step 5 — Publish and share

  • Select Publish.

  • Open Channels and add where the agent should appear — Microsoft 365 Copilot, Teams, a website, and so on.

  • Under Availability / Share, choose who can use it. Publishing to Microsoft 365 Copilot or Teams may require admin approval in the Microsoft 365 admin center.

  • Each user who runs the agent creates their own connection to DataSelf MCP+ the first time they use it and signs in with their own credentials.


Option 2: Build a Microsoft 365 Copilot Custom Agent

MCP support in Microsoft 365 Copilot declarative agents is generally available. The Microsoft 365 Agents Toolkit reads your MCP server, generates the plugin manifest, and wires up authentication — you only supply a URL and a few settings.

Step 1 — Install the prerequisites

Step 2 — Scaffold the agent

  • In Visual Studio Code, select the Microsoft 365 Agents Toolkit icon in the Activity Bar.

  • Select Create a New Agent/AppDeclarative Agent.

  • Select Add an ActionStart with an MCP Server.

  • Enter your DataSelf MCP+ server URL manually — there is nothing to pick from a list:

https://mcp.dataself.com
  • Select the authentication type:

    • OAuth (with dynamic registration) — recommended when DataSelf MCP+ supports dynamic client registration. No client ID or secret required.

    • OAuth (with static registration) — enter the client ID and client secret DataSelf provided. Register https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect as the redirect (callback) URL with your identity provider first.

    • Entra SSO — if your DataSelf MCP+ endpoint is fronted by Microsoft Entra single sign-on. Supply the Entra app client ID.

    • None — only for endpoints that require no authentication.

  • Press Enter at the scopes prompt unless DataSelf gave you specific scopes.

  • Choose a project location and enter a name, for example DataSelf Analyst.

The toolkit generates the project and updates manifest.json, ai-plugin.json, and declarativeAgent.json for you. No manual JSON editing is required.

Step 3 — Add your instructions

Open appPackage/declarativeAgent.json and set the instructions field (or the referenced instruction file). Use the same guidance as in Option 1 — tell the agent to explore the schema first, never invent column names, and always state the period and filters it used.

By default the plugin is configured for dynamic tool discovery, so the agent resolves the DataSelf MCP+ tool list at runtime and you don't add tools by hand. To lock the agent to a fixed set of tools, configure pinned tools instead.

Step 4 — Provision and sideload

  • In the Accounts pane, select Sign in to Microsoft 365.

  • Confirm that Custom App Upload Enabled and Copilot Access Enabled both appear under your account. If they don't, contact your Microsoft 365 admin.

  • In the Lifecycle pane, select Provision, then Confirm.

  • Wait for the toolkit to report that provisioning is finished.

Step 5 — Run the agent

  • Go to https://m365.cloud.microsoft/chat.

  • Find your agent in the Agents section of the sidebar. During development its name has dev appended.

  • Ask a question. When prompted, select Sign in to {agent name} and authenticate against DataSelf MCP+.

Step 6 — Deploy to your organization

  • Deploy internally — hand the app package to your IT admin, who deploys it to all or selected employees from the Microsoft 365 admin center. MCP-based agents are managed exactly like REST API agents.

  • Publish to the Agent Store — submit the package through Partner Center for validation if you want it listed publicly.


Start Asking Questions

Open your agent and reference the warehouse explicitly the first time — include DataSelf, MCP+, DS DW, or data warehouse in the prompt. Start broad, then drill into the results.

  • “What tables are available in the DataSelf DW?”

  • “Show me total sales by month for the past 12 months.”

  • “How many active customers do we have by region?”

  • “What is the current inventory level by warehouse?”

  • “Compare this year’s sales with last year’s by product category.”

  • “Which customers dropped more than 20% year over year?”

  • “Summarize the key business trends over the last six months.”

The first time the agent uses a DataSelf MCP+ tool in a new conversation, it may ask for permission. Select Allow to proceed. You can expand the tool call to review the exact query that was executed.