Skip to content

Read-only keys ​

A read-only key lets an AI tool read your own MOOKHPay account through the MCP server. The tool can then answer questions such as "How much is in my Rent pocket?" and "Did this payment go through?".

A read-only key starts with mcp_read_, then the country (ke_ or ug_), then 52 characters.

A read-only key is not a secret key. It cannot open a checkout, and a secret key cannot read your account.

What a key can read ​

Choose one or both when you make the key.

AccessThe tool can readThe tool cannot read
Balances, activity and paymentsEach account and its balance. The money in and out. The status of a paymentA phone number, a payer's message, a chat
Integration setupThe secret key's prefix, last four characters and dates. Webhook endpoints. Recent webhook deliveriesThe secret key. A signing secret

A read-only key cannot move money, change a setting or make another key. Every other MOOKHPay route refuses it.

Make a key ​

  1. Open the hub. Open Settings. Find AI Tools.
  2. Start a new key. Give it a name, such as the tool that will use it.
  3. Choose what it can read.
  4. Choose how long it lasts: 7, 30 or 90 days.
  5. Enter your PIN.

The hub shows the key once. Copy it then. The hub stores a hash and cannot show the key again.

An account can have 3 live keys. To make a fourth, revoke one first.

MOOKHPay sends you an email when a key is made and when a key is revoked.

In an organisation ​

RoleCan make a key for
OwnerBalances, activity and payments. Integration setup
DeveloperIntegration setup only
Member, Accountant, ViewerNothing

An Owner finds AI Tools in the organisation's Settings. A Developer finds it on API Integrations.

Connect with the key ​

Put the key in the environment variable MOOKHPAY_MCP_TOKEN. Do not write the key into a file that a repository holds.

Claude Code ​

Put this in .mcp.json in your project. Claude Code reads the variable when it connects.

json
{
  "mcpServers": {
    "mookhpay": {
      "type": "http",
      "url": "https://mcp.mookhpay.co/mcp",
      "headers": {
        "Authorization": "Bearer ${MOOKHPAY_MCP_TOKEN}"
      }
    }
  }
}

Cursor ​

Put this in .cursor/mcp.json in your project:

json
{
  "mcpServers": {
    "mookhpay": {
      "url": "https://mcp.mookhpay.co/mcp",
      "headers": {
        "Authorization": "Bearer ${env:MOOKHPAY_MCP_TOKEN}"
      }
    }
  }
}

VS Code ​

Put this in .vscode/mcp.json in your project. VS Code asks for the key and does not write it to the file.

json
{
  "servers": {
    "mookhpay": {
      "type": "http",
      "url": "https://mcp.mookhpay.co/mcp",
      "headers": {
        "Authorization": "Bearer ${input:mookhpay-token}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "mookhpay-token",
      "description": "MOOKHPay MCP read token",
      "password": true
    }
  ]
}

When a key stops working ​

EventResult
You revoke it in the hubIt stops on the next request. Revoke needs no PIN
It reaches its end dateIt stops
The person who made it changes or resets their PINEvery key that person made stops
The account closesEvery key stops
In an organisation, the person who made it leaves or loses the roleThe key stops

There is no cache. A revoked key does not work for an extra minute.

Keep a key safe ​

A read-only key reads real balances and payments

Treat it as private. A person who holds it can read what it reads until you revoke it.

  • Keep the key in an environment variable or a password prompt.
  • Make one key for each tool. Name it for that tool. Then you can revoke one without the others.
  • Choose the shortest life that fits the work.
  • Revoke a key when you stop using the tool.
  • If a key leaks, revoke it. It cannot move money.

Errors ​

See MCP tools for what a tool answers when a read fails.

Staging documentation. A checkout made with a secret key on staging charges a real phone. See Environments.