Tvijo wiki
Catalog

Topics

Xero and MCP: invoice and contact checks, with payments left to a person

Connect an agent to Xero for invoice and contact reads. Choose the right MCP server, restrict scopes, and keep posting and payments with a person.

🎯 For Small-team owners, bookkeepers and developers planning an agent that reads Xero data for drafts and checks.

πŸ“š You will learn
  • Distinguish hosted and local Xero MCP setup
  • Separate read scopes from data-changing tools
  • Connect an editor client and verify the organisation
  • Prepare a reviewable draft while keeping posting and payments human

Xero offers an official hosted MCP server that lets an AI agent read and change accounting data, alongside the local server in the XeroAPI repository. For invoice and contact checks, start with read-only permissions and produce a text draft; leave posting and payments to a person. The hosted option is documented in Xero Developer Remote MCP, as of 30 Oct 2026.

What it can do

Start with a question whose answer a bookkeeper can verify. For example, ask the agent to prepare a follow-up list from returned invoices, match customer names against contacts, or outline a message for an account manager. Require the organisation, reporting period, record identifiers and retrieval time alongside the answer.

A useful request is: prepare a review list for the selected organisation, show the invoice identifier and contact used for each entry, and flag missing information. Keep the proposed email in a local document until someone reviews its recipient and wording. Do not turn an accounting lookup into automatic customer communication.

A contact comparison can similarly produce possible duplicates for review. Similar names alone are insufficient evidence to merge or edit records. Ask for the identifiers behind each suggestion and let the person responsible decide whether anything needs changing.

For the broader distinction between an agent interface and the underlying service, see MCP versus APIs. Other application examples are in MCP servers for apps.

Which Xero connection are you using?

The hosted developer server and the local package have different setup paths. The official local repository documents Custom Connections using XERO_CLIENT_ID and XERO_CLIENT_SECRET, or a supplied token through XERO_CLIENT_BEARER_TOKEN. Do not transfer that configuration unchanged to the hosted service.

For the hosted server, Xero recommends OAuth 2.0 with PKCE. Web-app access tokens also work technically, but Xero does not recommend that option. Custom Connection apps are not eligible for the hosted server. As of 30 Oct 2026, Xero documents Core and above for real organisations, with Starter restricted to a demo organisation. Check eligibility in the Remote MCP FAQ before choosing a deployment route.

For the local route, a Custom Connection serves a single organisation and has its own subscription and regional conditions. Consult the Custom Integration FAQ; do not assume an existing Xero subscription includes every developer connection option.

What reads data and what changes it?

The following hosted tool and scope pairs come from Xero's tool table, as of 30 Oct 2026:

Purpose Read tool and scope Write tool and scope
Invoices list_invoices β€” accounting.invoices.read create_invoice β€” accounting.invoices
Contacts list_contacts β€” accounting.contacts.read update_contact β€” accounting.contacts
Payment records list_payments β€” accounting.payments.read create_payment β€” accounting.payments

These are selected examples, not the whole permission inventory. Request only the read scopes needed for the task. For local configurations, the repository documents XERO_SCOPES as an override; review its defaults rather than copying a broad example.

A draft in a text file is different from a DRAFT invoice saved in Xero. The latter creates an accounting-system record even though it awaits approval; see the Invoices API. In this workflow, a person creates or posts that record.

Likewise, the Payments API applies payment records to accounting documents. Never treat a successful accounting response as proof that a bank transfer occurred. Keep payment execution and its verification with a person.

How to connect it safely

  1. Define the permitted result. Write down the organisation, the period to inspect and the output: a review table or text proposal. Keep invoice creation, approval, contact edits and payment actions outside the agent's task. The permissions-first practice explains why a prompt alone is insufficient protection.

  2. Prepare the appropriate app. For this hosted walkthrough, choose a Xero developer app using OAuth 2.0 with PKCE and a client that supports that flow. Configure its redirect URL according to the current client documentation. Work against a demo organisation first. Keep access tokens and secrets out of prompts and committed project files.

  3. Add the remote endpoint in your editor client. In VS Code, open the Command Palette, run MCP: Add Server, choose HTTP and enter https://api.xero.com/mcp/v1. Select the configuration destination appropriate to your agent session and review authentication prompts. Follow the VS Code MCP setup documentation; editor configuration formats vary. The wiki's VS Code guide provides further context.

  4. Review consent and tool availability. Approve only the relevant read permissions. Inspect the tools exposed to the session and disable write tools where the client supports it. A client tool selection complements restricted OAuth access. If the setup requests unnecessary writes, stop and correct the configuration before using live data.

  5. Prove a narrow read works. Use the hosted get_connected_tenants tool to identify the organisation, then request a small invoice or contact lookup. Expand the tool result in the client. Verify that the response belongs to the intended organisation and that the answer follows the returned records.

  6. Review the output separately. Compare the proposed text or table with Xero before using it. Record which records supported it and what remained uncertain. Have a person perform posting, sending and payment work in the authorised workflow. Revoke the connection when the pilot ends; Xero documents disconnection through Connected Apps in its Remote MCP FAQ.

When this does not work

A connection succeeds but the answer lacks detail. The Invoices API distinguishes list summaries from detailed responses. Inspect what the tool actually returned before attempting a line-level check. Missing detail must remain unknown, rather than becoming an inferred tax treatment or amount.

An old recipe exposes different tools. The local README uses hyphenated command names; hosted tools use underscores. Match names and authentication to the server you selected, and check the current documentation when a recipe disagrees with discovery.

The workflow assumes confirmation is built in. Xero's Remote MCP FAQ says its tools do not themselves ask for confirmation before writes. Use restricted credentials and client controls. Keep production write access out of this read-and-draft pilot.

The records are incomplete or the request fails. Do not present a partial response as the whole ledger. Narrow the question, inspect the error and compare against Xero. Use the MCP security checklist before expanding access.

Where Tvijo fits

As of 30 Oct 2026, the DSHREM VS Code extension offers an editor entry point for a question with deliberately attached context. A practical accounting workflow is to submit an authorised, minimised extract for a draft explanation or a consistency check. Review permissions and data flow before sending customer information.

TvijoCode is a test build with the extension embedded. Tvijo MCP makes Tvijo consultation available to a compatible client; its prepared diff-review functionality awaits publication in the dated release description, and editor delegation remains planned. These capabilities do not establish a ready Xero connector or automatic access to another server's tools. Any direct Xero connection needs separately scoped implementation and testing. Posting and payments stay human.

The Tvijo workspace offers, as of 31 Oct 2026, show Try at $0: up to 50 tasks, 100,000 tokens or $0.05 of sponsored usage, whichever is reached first, from a shared $1 daily pool funded by TVIJO. Service credit is shown as $10 for requesting prepaid credit, with metered provider usage plus an 8% service markup. Payment collection is not activated; an order is not a charge.

FAQ

Is the Xero MCP server read-only?

It includes write tools. Read-only behaviour requires appropriate scopes and client controls; the scope examples above separate reads from changes.

Can an agent draft an invoice without creating one in Xero?

Yes: ask for a text proposal based on authorised reads. Have a person review it before creating a Xero record; saving a DRAFT invoice is still a write.

Does installing Tvijo connect my Xero account?

No ready Xero integration is established by the Tvijo capabilities described here. Use a separately authorised connection or a carefully selected extract for a draft or check.

Xero is a trademark of its owner. Tvijo is not affiliated with or endorsed by it.

Sources

Source links and observation dates are recorded below. Review status is stated for each material.

  1. Xero Developer Remote MCP Β· Checked 2026-10-31 Β· Hosted endpoint, tool names and read/write scope mappings; hosted setup and tenant discovery.
  2. Xero Remote MCP FAQs Β· Checked 2026-10-31 Β· PKCE recommendation, technically supported but discouraged web-app authentication, client OAuth support, plan eligibility, Custom Connection exclusion, lack of tool-level confirmation and disconnection.
  3. XeroAPI/xero-mcp-server Β· Checked 2026-10-31 Β· Official local implementation, authentication variables, XERO_SCOPES override and hyphenated local command names.
  4. Xero Accounting API: Invoices Β· Checked 2026-10-31 Β· Creating a DRAFT is a data write; invoice listing and detail responses differ.
  5. Xero Accounting API: Payments Β· Checked 2026-10-31 Β· Reading and applying accounting payment records to invoices and other documents.
  6. Xero Custom Integration FAQs Β· Checked 2026-10-31 Β· Single-organisation Custom Connections, regional/subscription conditions and scopes.
  7. Add MCP servers in VS Code Β· Checked 2026-10-31 Β· MCP: Add Server, HTTP connection path, configuration destinations and verification of tool results.

πŸ”— Article connections

Open the full knowledge graph β†—

Published article links. Select a node to open its article at the heading.

100%
β†’ Linked articles← Linked fromβ‹― Same topic
Article links Β· keyboard / text view

πŸ’¬ Comments

Comments are public and moderated. Do not post personal data.
  • No comments yet. Be the first!

Next steps