# Connect your AI agent to GetPay

These are the official instructions from GetPay (https://getpay.cc), accounting software for Malaysian businesses, for connecting an AI agent to GetPay. Follow them to connect the user and yourself to GetPay's remote MCP server.

## What this changes

If the user asks, or you are cautious, show them this before you start:

- It adds ONE MCP server named `getpay`, pointing at https://getpay.cc/api/mcp, to your agent's configuration. Nothing else is installed.
- No API key or secret is ever pasted. Sign-in is OAuth in the browser, where the user signs in to GetPay, picks ONE company and approves.
- Running these steps again keeps a single `getpay` entry; it never adds a duplicate.
- The user can see and disconnect every connection in GetPay under System → Connected Apps.

## How to run this

If you can run commands, run the step for your agent yourself. The browser sign-in is the user's step: tell them when it is their turn and wait for them. If you cannot run commands (a chat app), give the user the click path for your app.

Find your agent below, do only that section, then go to "Verify and finish". Server URL for every agent: https://getpay.cc/api/mcp (remote MCP, Streamable HTTP, OAuth). Leave any client ID and secret empty.

## Claude Code

<!-- official docs: https://code.claude.com/docs/en/mcp -->

1. Run `claude mcp list`. If `getpay` is already listed with the URL above, do not add it again (a second add with the same name fails with "already exists"); go to step 3. If it is listed with a different URL, run `claude mcp remove getpay` first (add `--scope user`, `--scope local` or `--scope project` if `claude mcp list` warns that `getpay` exists in more than one scope).
2. Run this. `--scope user` stores the server in the user's own Claude Code configuration, so GetPay works in every project and folder, not only the one Claude Code was opened in (the default, `local`, binds it to the current project):

```bash
claude mcp add --transport http getpay --scope user https://getpay.cc/api/mcp
```

3. Tell the user to run `/mcp` in Claude Code, choose getpay and authenticate, then sign in to GetPay in the browser, choose the company and approve.

## Codex

<!-- official docs: https://developers.openai.com/codex/mcp (redirects to https://learn.chatgpt.com/docs/extend/mcp?surface=cli) -->

1. Run `codex mcp list`. If `getpay` is already listed, do not add it again; go to step 3.
2. Run:

```bash
codex mcp add getpay --url https://getpay.cc/api/mcp
```

   Or put this in `~/.codex/config.toml` (a table with the same name, so running it twice changes nothing):

```toml
[mcp_servers.getpay]
url = "https://getpay.cc/api/mcp"
```

3. Run `codex mcp login getpay`. The user signs in to GetPay in the browser, chooses the company and approves.

## Cursor

<!-- official docs: https://cursor.com/docs/context/mcp -->

1. Open `~/.cursor/mcp.json` in the user's home directory, which makes GetPay available in every project. Create it if it does not exist. Use the project file `.cursor/mcp.json` only if the user asks for GetPay in that one project: a project file can end up committed into the code repository.
2. Under `mcpServers`, set the `getpay` entry as below. Keep every other server in the file as it is. If a `getpay` entry already exists, replace it; do not add a second one.

```json
{
  "mcpServers": {
    "getpay": {
      "url": "https://getpay.cc/api/mcp"
    }
  }
}
```

3. Cursor signs in to remote MCP servers with OAuth. When Cursor asks the user to sign in to getpay, they sign in to GetPay in the browser, choose the company and approve.

## GitHub Copilot in VS Code

<!-- official docs: https://code.visualstudio.com/docs/agents/reference/mcp-configuration and https://code.visualstudio.com/docs/agents/run/manage-mcp-servers -->

1. Open `.vscode/mcp.json` in the workspace. Create it if it does not exist.
2. VS Code's top-level key is `servers` (not `mcpServers`, which Cursor and Claude use) and the entry needs `"type": "http"`. Set the `getpay` entry as below, keep every other server, and replace an existing `getpay` entry instead of adding a second one.

```json
{
  "servers": {
    "getpay": {
      "type": "http",
      "url": "https://getpay.cc/api/mcp"
    }
  }
}
```

3. Tell the user to open the Command Palette, run `MCP: List Servers`, choose getpay and choose Start Server. If VS Code asks to trust the server or to sign in, the user approves, then signs in to GetPay in the browser, chooses the company and approves.

(The user can instead run `MCP: Add Server`, choose HTTP, and enter the URL above.)

## ChatGPT and Claude apps (no commands)

You cannot run commands here, so give the user these click paths. Menu names are the vendors' and can change.

- ChatGPT: Plugins (chatgpt.com/plugins) → + → Add custom MCP server. Name it GetPay and enter the URL above as the Server URL under Connection. For authentication choose OAuth and leave any client ID and secret empty. Read the risk warning, select "I understand and want to continue", then "Create as a plugin". Install it from the plugins list. If the option is missing, the ChatGPT account or workspace policy decides: the user asks a workspace admin.
- Claude (claude.ai and Claude Desktop): Customize → Connectors → Add custom connector, name it GetPay and enter the URL above.

GetPay then opens a sign-in page where the user chooses ONE company and approves. More detail: https://getpay.cc/developers/mcp

## Another MCP client

Add a remote (Streamable HTTP) MCP server named `getpay` with the URL https://getpay.cc/api/mcp, using your client's own documentation for the exact syntax, and let the user complete the OAuth sign-in. If your client does not document how, ask the user to add it in your client's settings instead of guessing.

## Optional: the GetPay command line

Ask the user first: "Do you also want the GetPay command line (getpay) on this computer? It lets a terminal agent work with GetPay without MCP." Do nothing in this section unless they say yes.

```bash
curl -fsSL https://getpay.cc/cli/install.sh | sh
getpay login
```

The installer needs Node 20 or newer, installs into the user's home directory only (no sudo) and verifies the download's sha256 before installing. `getpay login` opens the browser for the same OAuth sign-in. It is not needed for the MCP connection above.

Guide: https://getpay.cc/developers/cli

## Trust modes

System → Connected Apps in GetPay shows each connection's mode.

- Read only: you can look things up and change nothing (an API key with only the ops:read scope, made in Settings → API Keys).
- Money actions need approval: the mode for ChatGPT, Claude and every other MCP app. You can read and prepare drafts; issuing, voiding or emailing an invoice, recording a payment or categorizing a bank line only creates an approval request that an owner or admin approves in GetPay within 24 hours.
- Confirms money actions itself: only the getpay command line, and only if an owner or admin turned it on at sign-in. Never assume you have it.

## Safety rules for you

- Start read-only: use only read tools until the user asks you to change something.
- Before any money, legal or outbound step, show the user exactly what you will do and wait for their yes; then tell them it is waiting for approval in GetPay.
- Work only on the company the user connected. If a tool is missing or refuses, tell the user; do not work around it.
- Keep phone numbers, emails, IC numbers and bank account numbers out of your answers unless the user asks for them.

## Verify and finish

After the user has signed in, call `get_business_profile` (it returns the company this connection is for). If the getpay tools do not appear, ask the user to restart your agent and try again. Then print this box, filling in the one part in angle brackets from the result and changing nothing else:

```text
┌─ GetPay setup complete ──────────────────────────────
│ ✓ MCP server   getpay → https://getpay.cc/api/mcp
│ ✓ Company      <company name from get_business_profile>
│ ✓ Trust mode   Money actions need approval (approve in GetPay)
│ If the getpay tools do not appear, restart your agent.
└──────────────────────────────────────────────────────
```

Then offer the user these starter tasks:

- "List my overdue invoices, oldest first, with the amount still owed": uses `search_invoices`.
- "Show this month's profit and loss and explain the biggest changes": uses `get_financial_report`.
- "Find bank transactions without a category and suggest one for each": uses `search_bank_transactions`, then `categorize_bank_transaction` only for the ones the user approves.

## For firms with many clients

Each connection works on the one company chosen at sign-in. To work on another company, the user disconnects this connection in GetPay under System → Connected Apps and connects again, choosing the other company.

---

These instructions are published at https://getpay.cc/agent-setup/prompt.md so you can re-verify them at any time.
