DeepLedger
Menu

Connect an agent

Connect Microsoft Copilot to Xero with Copilot Studio

Build a Copilot Studio agent that reaches every Xero (beta) organisation through DeepLedger's MCP, publish it to Teams, and switch clients by asking.

Published by DeepLedgerUpdated 7 min read

Microsoft Copilot connects to Xero through an agent you build in Copilot Studio: add DeepLedger's MCP server as the agent's tool, and the agent can work in every Xero organisation a user can access, switching clients when asked. You can then publish the agent to Microsoft 365 Copilot and Teams. This guide is for firms and finance teams that live in Microsoft 365 and want one Xero agent for the whole team.

Xero support in DeepLedger is in beta. If Connect to Xero is not offered on a company's Connections tab, contact support.

The QuickBooks Online version, with more detail on Teams publishing, is Connect Microsoft Copilot to QuickBooks Online. The agent below serves clients on both ledgers.

Which Copilot does what?

Microsoft uses the Copilot name for several products. Only some of them can add an MCP server.

ProductXero route in this guide
Copilot StudioAdd DeepLedger as an MCP tool on an agent
Microsoft 365 CopilotUse the published Copilot Studio agent
Microsoft TeamsUse the same agent in a one-to-one chat
GitHub Copilot in VS CodeAdd DeepLedger as a remote MCP server

This guide does not cover the consumer Copilot app. Reach DeepLedger through one of the routes above.

Why one sign-in for all your Xero organisations

A Teams agent is shared by many people, and they do not all work for the same clients. If the agent were bound to one Xero organisation, you would need an agent per client, each with its own connection to maintain.

With DeepLedger, the agent is built once and the company comes from the person using it:

  • Each user brings their own access. With end-user credentials, every call runs as that person and reaches only the companies they are assigned to in DeepLedger.
  • Each user switches independently. "Switch to Alder & Finch LLP" moves that person's active company, not a colleague's.
  • Xero and QuickBooks Online in one agent. The same tool serves both ledgers.
  • One review trail. Tasks and Audit history in DeepLedger record work per company, whichever app it came from.

Before you start

  • A DeepLedger account with each Xero organisation connected: Companies → the company → Connections → Connect to Xero.
  • Pricing: $20 per Xero connection per month, the same as QuickBooks Online, with unlimited users and a 14-day free trial with no credit card. See pricing.
  • A Copilot Studio environment where you can create or edit an agent.
  • A personal DeepLedger API key: Settings → API keys → Create key, then choose All my companies (so the agent can switch) and an expiration. The value is shown once.

A key acts as the person who created it and has no read-only setting of its own. A One company key works only in that company and cannot switch.

How do I connect Copilot Studio to Xero?

These steps follow Microsoft's guide to adding an existing MCP server.

  1. Open your agent in Copilot Studio.
  2. Go to Tools, select Add a tool, New tool, then Model Context Protocol.
  3. Give it a name and a description such as "Xero and QuickBooks bookkeeping across our client companies through DeepLedger".
  4. For Server URL, enter https://mcp.deepledger.ai/mcp.
  5. For authentication, choose API key, then Header, with the header name Authorization.
  6. Select Create, then create a connection. For the key value, enter Bearer followed by your DeepLedger key.
  7. Add the tool to the agent.
  8. In the tool's settings, under Credentials to use, choose End user credentials before you share the agent.

Then test in Copilot Studio's test pane:

Which company am I in? List the Xero companies I can access.

Switch companies by asking

The agent uses DeepLedger's companies tool: current, list, and switch by name or company id.

List my companies.

Switch to Alder & Finch LLP and show unpaid bills over 30 days.

Now do the same for Alder & Finch Services Ltd.

Add a line to the agent's instructions telling it to name the active company at the start of every answer that uses Xero data. Instructions guide the model; the company name in each DeepLedger result is the evidence.

Publish to Microsoft 365 Copilot and Teams

  1. Publish the agent in Copilot Studio.
  2. Under Channels, select Teams and Microsoft 365 Copilot and add the channel.
  3. Install it for yourself and repeat the company check in Teams.
  4. Share it only with the people who should use it.

Two sign-ins are involved. Signing in to the agent in Teams is Microsoft's side: see Microsoft's Teams SSO guide, which notes that SSO works in one-to-one chats with the agent, not group chats or channels. The DeepLedger connection is separate: with end-user credentials, each person is asked once for their own DeepLedger key. Test as a non-maker user before rollout.

Multi-organisation prompts to try

Review before a client meeting

Switch to Alder & Finch LLP. Summarise year-to-date profit and loss against last year, the five largest overdue invoices and any open Tasks. Keep it to one screen.

AP across clients

For each Xero company I can access, list bills due this week over $5,000. Group by company.

Intercompany

Show the balance on the intercompany account in Alder & Finch LLP and the matching account in Alder & Finch Services Ltd at October 31, and whether they agree.

Staff workload

Which of my Xero companies have open Tasks waiting for a person? List the oldest three in each.

Draft, then hand over

In Alder & Finch Services Ltd, draft a sales invoice to Rowan Interiors for 12 hours of design at $150. Leave it as a draft and tell me the invoice number.

Budget variance

Show budget against actual for October in each Xero company and flag lines more than 10% over.

Use GitHub Copilot in VS Code instead

GitHub Copilot in Visual Studio Code is a separate MCP client that signs in with OAuth. Add this to .vscode/mcp.json or your user configuration:

{
  "servers": {
    "deepledger": {
      "type": "http",
      "url": "https://mcp.deepledger.ai/mcp"
    }
  }
}

Start the server and sign in to DeepLedger in the browser. VS Code's MCP configuration reference covers remote servers and authorization.

Is it safe to give a Copilot agent Xero access?

  • End user credentials, always, for shared agents. Maker-provided credentials let everyone act with the maker's companies and write access.
  • Drafts by default for new invoices, bills, credit notes and manual journals; payments, spend money, receive money and transfers post straight away.
  • Confirmation for Xero actions that cannot be undone, such as voids.
  • Per-person limits in DeepLedger. Read-only members cannot write; owners and admins can make chosen areas read-only for one member; Audit history records each call per company.
  • Revocation. Revoke a key under Settings → API keys; owners and admins can see and revoke every key in the firm.

Troubleshooting

401 or unauthorized. The connection value must be Bearer plus the full DeepLedger key, with the header name Authorization.

The agent has no Xero tools. Re-open the tool and check the URL ends in /mcp, then refresh the tool list.

Colleagues are asked to create a connection. That is expected with end-user credentials; each person enters their own key once.

"Switch not allowed." The key was created for One company. Create one for All my companies.

"Reconnect Xero." An admin reconnects that organisation on its Connections tab.

Frequently asked questions

Can Microsoft Copilot connect to Xero?

Yes, through an agent. In Copilot Studio, add DeepLedger's MCP server, https://mcp.deepledger.ai/mcp, as a tool. Test the agent, then publish it to Microsoft 365 Copilot and Teams. Each person who uses it works in the Xero organisations their own DeepLedger access allows.

How does a Copilot Studio agent switch between Xero organisations?

Ask it. DeepLedger's companies tool lists the companies the user's key can reach and switches to one by name or id. The switch applies to that person only, so two colleagues using the same agent can work in different organisations.

Which credentials should a shared Copilot agent use?

End user credentials. Each person creates their own DeepLedger API key under Settings, API keys, and the agent calls DeepLedger as that person. Maker-provided credentials would give every user the maker's company access and write ability.

Does GitHub Copilot work with Xero?

Yes, as a separate setup. In Visual Studio Code, add https://mcp.deepledger.ai/mcp as an HTTP server in mcp.json. VS Code supports remote MCP servers with OAuth, so you sign in to DeepLedger in the browser instead of storing a key.

See AI platforms and integrations for every supported app and pricing for connection costs.

Ready to get started?

Connect QuickBooks and try your first task with an AI agent.

Create an Account