Custom plugins, and the oddity of having to build a Microsoft agent just to carry one

Custom plugins, and the agent you have to build to carry one: an MCP plug, an agent adapter and the Copilot Chat socket

The short version

We wanted our own tools inside Microsoft 365 Copilot Chat. Microsoft’s plugins live inside agents, so we had to build an agent whose only job is to carry the plugin. A declarative agent failed on sign-in. A Copilot Studio agent worked. If you plan a custom plugin, plan the agent first.

 

What we wanted

Our people already work in Copilot Chat and Teams. They have Copilot licenses. So, when we looked at where our own agents’ tools should show up, the answer was easy: right there. No new app, and no new license.

The tools sit behind an MCP server. Claude uses the same server as a connector. So, the plan looked simple: add the server to Copilot as a plugin, and let people ask for what they need in Chat.

It was not that simple. We found no way to hand a plugin to Copilot Chat on its own. It wanted an agent first. So, we built one, and its only job was to hold the plugin.

Attempt 1: a declarative agent with an MCP plugin

We built a declarative agent, added our MCP server as a plugin with OAuth sign-in, and published it through Microsoft Graph. No browser was needed.

Copilot failed before it asked anyone to sign in. The message said the plugin’s tools could not be loaded from the MCP server because a token store error occurred.

Nothing reached our server. Entra, which handles our sign-ins, logged no attempt. We tried a static tool list. We turned app restrictions on and off. Same error every time. We saw the same problem raised on Microsoft Q&A, still open when we checked today.

Microsoft’s plugin documentation helps explain where this lives. When you set up sign-in for a plugin, it is stored as an authentication configuration in the Microsoft Enterprise token store, and Copilot reads it from there at runtime. Our failure happened at that step. That is our reading of it. We cannot see inside the store.

So, we dropped that route.

Attempt 2: a Copilot Studio agent

Copilot Studio lets you give an agent an MCP server as a tool. You choose OAuth 2.0, and each person signs in as themselves. You can pick dynamic discovery, dynamic registration, or enter every OAuth setting by hand. Streamable HTTP is the only transport it supports, because it dropped SSE after August 2025.

We built an agent there and gave it our server. That worked. The first call reached our server as the person who asked, not as a shared account. The agent sees what that person can see. That is what we wanted.

One more thing from Microsoft’s page: if a Power Platform data policy governs connectors in your environment, it also governs the MCP server. Check that before you start.

Why the agent has to be there

Here is what Microsoft says about plugins. MCP and API plugins “provide actions within declarative agents. They’re not standalone installable plugin packages: only the containing agent can access their functions and tools.”

Read that twice. The plugin has nowhere else to live. You do not build the agent to make the plugin better. You build it because the plugin needs a carrier.

In our case the carrier brought three things, and that is my read, not a Microsoft claim:

  1. A slot for the tool.
  2. A sign-in per person, so the tool runs as that person.
  3. A way to publish the whole thing to Copilot and Teams.

That is a lot of machinery for what we thought was a connector.

Diagram: an MCP server feeds a plug, a travel adapter labeled agent sits between the plug and the Copilot Chat and Teams wall socket. The agent adds a tool slot, sign-in as you, and a way to publish.

How a custom plugin reaches Copilot Chat: the plugin is the plug, and the agent is the adapter.

What an admin has to allow

An agent is not visible to users until an admin approves it. In the Microsoft 365 admin center, the admin goes to Agents, then All agents, then Requests, and selects Publish to store. Microsoft says the agent isn’t visible to users until that approval happens.

If you build the declarative agent route with the Microsoft 365 Agents Toolkit, your tenant also needs Custom App Upload and Copilot Access turned on. Microsoft’s walkthrough tells you to check both and ask your admin if they are missing.

If you bring your own MCP server through Agent 365, an AI Administrator or Global Administrator has to approve it. After consent, Microsoft says it can take up to 30 minutes to show up in your Copilot Studio environments.

Getting ours published took more effort than we expected. Copilot Studio’s own Submit to org catalog button did nothing for us, so we put the Teams app package into the org catalog through Graph. After any catalog change, Copilot took 10 to 30 minutes to show it. Plan for that wait before you decide something is broken.

What we learned

An agent only knows what its tools expose. We asked ours about alerts and it answered from an old design note, because the server had no alerts tool. We added one, and then opened up everything our own panel shows.

Copilot’s debug detail lives in its websocket traffic. The new chat has no debug card.

For people with a Microsoft 365 Copilot license, this front door is included.

What to take away

If you plan a custom plugin for Copilot, plan the agent first. Test the sign-in path before anything else, because that is where ours failed. Decide up front who the agent signs in as.

The agent is a front door. The agents that do the work still run on Claude Code, and a person approves every change.

I wrote about where models, harnesses, and agents differ in LLM vs harness vs agent. This one is the plumbing side of the same idea. Your thoughts?

Sources

All pages were read on November 29, 2026. Page dates are Microsoft’s own.

  1. Microsoft Learn, “MCP and API plugins for declarative agents,” Microsoft 365 Copilot extensibility. Updated November 16, 2026.
  2. Microsoft Learn, “What Is a Microsoft 365 Copilot Plugin?” Updated November 16, 2026.
  3. Microsoft Learn, “Configure authentication for MCP and API plugins in agents in Microsoft 365 Copilot.” Updated November 16, 2026.
  4. Microsoft Learn, “Build a plugin for a declarative agent from an MCP server.” Updated November 16, 2026.
  5. Microsoft Learn, “Connect your agent to an existing Model Context Protocol (MCP) server,” Microsoft Copilot Studio. Updated November 18, 2026.
  6. Microsoft Learn, “Understand Agents in Microsoft Copilot” (agent store and admin approval). Updated November 12, 2026.
  7. Microsoft Learn, “Manage plugins, skills, and MCP servers,” Microsoft Agent 365 admin. Updated November 24, 2026.

What we saw ourselves: the token store error, the Copilot Studio sign-in, the unresponsive catalog button, and the 10 to 30 minute catalog delay. We tested these in our own tenant in November 2026.

Leave a Reply

© Copyright 2021 Distributed Logic Corp.

contact via web form  |  info@distributedlogic.com   |    (866) 229-8621