Skip to main content
Glama
MYOB MCP Server

MYOB MCP Server

by dwadlane
README.md
# MYOB MCP Server

Built by Gaps2Gains. We cut a moving company's inquiry reply time from 13.8 hours to 9 seconds. [Book a Free Discovery Call](https://gaps2gains.com/diagnosis)

![MYOB MCP: Who owes us money? Claude finds $28,680 overdue across 4 invoices](docs/hero.svg)

[![CI](https://github.com/dwadlane/myob-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/dwadlane/myob-mcp/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/github/license/dwadlane/myob-mcp)](LICENSE) [![Release](https://img.shields.io/github/v/release/dwadlane/myob-mcp)](https://github.com/dwadlane/myob-mcp/releases)

Ask Claude who owes you money. "What's overdue?" "How much came in this month?" "What does Keilor Builders owe us?"

An [MCP](https://modelcontextprotocol.io) server by [Gaps2Gains](https://gaps2gains.com) that connects Claude to MYOB AccountRight, the accounting system used by hundreds of thousands of Australian and New Zealand businesses. Read-only, so it can never change your books.

## What an Owner Can Ask

> **You:** Who owes us money?
>
> **Claude:** $28,680 is overdue across 4 invoices. The oldest is 96 days late: Keilor Builders, INV00004, $14,000. Want me to draft reminder emails, firmest for the oldest?

> **You:** How's cash looking?
>
> **Claude:** Customers owe $34,300, and $28,680 of it is overdue. $1,250 came in over the last 30 days.

## Tools

| Tool | What it does |
|---|---|
| `overdue_invoices` | Unpaid invoices past due, most overdue first, with ageing: 1 to 30, 31 to 60, 61 to 90 and over 90 days |
| `cash_summary` | Total owed, overdue, not yet due, and payments received over recent days |
| `customer_balance` | One customer's balance and open invoices |
| `list_invoices` | Invoices newest first, Open or Closed, searchable by number or customer |
| `recent_payments` | Customer payments received over recent days |
| `chase_plan` | For every open invoice: Chase 1 (friendly, 7 to 20 days late), Chase 2 (firmer, 21 to 40), Call the customer (over 40, the Owner phones), or Skip. Each row has the reason in one line |
| `draft_reminder` | Writes the reminder email for one invoice, using only amounts and dates from the books. Dry run unless `confirm=true`. It never sends email: MYOB has no send endpoint. Only registered when `MYOB_ALLOW_WRITES=1` (always on in demo) |

Pair it with Claude's writing and you get the full collections loop: find what's overdue, draft the right reminder for how late it is, and keep the Owner out of the spreadsheet.

### Chasing Overdue Invoices

> **You:** Who should we chase today?
>
> **Claude:** 4 invoices to chase: 1 friendly reminder, 1 firm reminder, 2 calls for you. 2 skipped. The two calls are Keilor Builders, INV00004 (96 days) and INV00005 (64 days). I've left the two invoices that aren't due yet alone.

> **You:** Draft the reminder for Northside Cafe.
>
> **Claude:** Here's a dry run for INV00002, $5,800, 36 days overdue. Nothing has been sent. Say the word and I'll give you the final email to copy.

Skip a disputed invoice by setting `MYOB_SKIP_INVOICES` to a comma separated list of invoice numbers or UIDs, or by passing `skip` to `chase_plan`. A customer who logged a payment in the last 7 days is paused automatically.

## Try It in 2 Minutes, No Account Needed

With no API key it runs on demo books for a fictional Melbourne electrician.

```bash
git clone https://github.com/dwadlane/myob-mcp.git
cd myob-mcp
npm install && npm run build
claude mcp add myob -- node "$(pwd)/dist/index.js"
```

Or add it to Claude Desktop's `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "myob": { "command": "node", "args": ["/full/path/to/myob-mcp/dist/index.js"] }
  }
}
```

## Connect Your Real MYOB File

You'll need an API key from the [MYOB developer portal](https://developer.myob.com) and an OAuth access token for your my.MYOB login.

| Variable | What it is |
|---|---|
| `MYOB_API_KEY` | Your developer API key |
| `MYOB_COMPANY_FILE_URI` | The company file URI, e.g. `https://api.myob.com/accountright/<file-id>` |
| `MYOB_ACCESS_TOKEN` | OAuth access token |
| `MYOB_REFRESH_TOKEN` and `MYOB_CLIENT_SECRET` | Optional. The server refreshes the token by itself when it expires |
| `MYOB_CF_USERNAME` and `MYOB_CF_PASSWORD` | The company file login, if your file has one |

For a desktop file on the same machine, set `MYOB_COMPANY_FILE_URI` to `http://localhost:8080/accountright/<file-id>`.

Credentials stay on your machine and go only to MYOB.

## When It Stops

We built the chaser to hand off, not to push on.

- **Over 40 days goes to the Owner as a call.** At that point an email is the wrong tool, so `chase_plan` flags the invoice for a phone call and `draft_reminder` writes no email.
- **Disputed invoices are skipped.** Put them on the skip list and they are left for the Owner.
- **Recent payments pause the chase.** If the customer logged a payment in the last 7 days, we wait. Invoices not yet due, or only a few days late, are also left alone.
- **Nothing is ever sent without confirm.** `draft_reminder` defaults to a dry run, and even with `confirm=true` it only returns the text. This server cannot send email, so a person always presses send.
- **Writes are off by default.** `draft_reminder` is only registered when `MYOB_ALLOW_WRITES=1`. It never changes your books.

## How It's Built

- TypeScript on the official [MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk).
- MYOB API v2 with OData filters, and paging that follows `NextPageLink`.
- Refreshes an expired OAuth token once and retries, so long sessions don't break.
- Plain-English errors for bad credentials (401) and missing permissions (403).
- 16 tests on every tool and the HTTP layer: `npm test`.

## Also From Us

[ServiceM8 MCP Server](https://github.com/dwadlane/servicem8-mcp): jobs, quotes and schedules for trade businesses. Run both and Claude can match completed jobs to unpaid invoices.

## Want This Wired Into Your Business?

We build Claude connectors, AI receptionists and back office systems for service businesses, including MYOB migrations. [Book a Discovery Call](https://gaps2gains.com/diagnosis).

Not affiliated with or endorsed by MYOB.

## License

MIT