Appearance
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.
| Access | The tool can read | The tool cannot read |
|---|---|---|
| Balances, activity and payments | Each account and its balance. The money in and out. The status of a payment | A phone number, a payer's message, a chat |
| Integration setup | The secret key's prefix, last four characters and dates. Webhook endpoints. Recent webhook deliveries | The 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
- Open the hub. Open Settings. Find AI Tools.
- Start a new key. Give it a name, such as the tool that will use it.
- Choose what it can read.
- Choose how long it lasts: 7, 30 or 90 days.
- 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
| Role | Can make a key for |
|---|---|
| Owner | Balances, activity and payments. Integration setup |
| Developer | Integration setup only |
| Member, Accountant, Viewer | Nothing |
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
| Event | Result |
|---|---|
| You revoke it in the hub | It stops on the next request. Revoke needs no PIN |
| It reaches its end date | It stops |
| The person who made it changes or resets their PIN | Every key that person made stops |
| The account closes | Every key stops |
| In an organisation, the person who made it leaves or loses the role | The 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.