---
name: paybox
description: "Connect an AI agent to PayBox: CLI on Muse and Grok Bot, MCP on connector hosts."
---

<!--
Sitemap:
- [PayBox](/index): The non-custodial wallet for AI agents
- [Getting started](/getting-started)
- [Credentials & agents](/concepts/model): The PayBox model
- [Approvals](/concepts/approvals)
- [Request lifecycle](/concepts/requests): From intent to result
- [MCP connector](/connect/mcp)
- [OAuth 2.1](/connect/oauth)
- [MCP tools](/reference/mcp-tools): What an agent can call
- [API & endpoints](/api-reference)
- [SDK & CLI](/sdk-cli)
- [PayBox integration manual](/skill): Connect an AI agent to PayBox: CLI on Muse and Grok Bot, MCP on connector hosts.
-->

# PayBox integration manual

On Muse, Grok Bot, Grok Computer, or any agent on a computer with no connector screen, do not use MCP. Where the agent runs, including a hosted VM or sandbox, run `npm install -g @paybox-sh/sdk`, then follow the `SKILL.md` in the package (`paybox login --no-open`, then `paybox connect --no-open`). Never add a custom connector, ask for a Client ID, or use a host secrets store.

On a host with a connector screen, use `https://api.paybox.sh/mcp` as the MCP endpoint. The user completes OAuth 2.1 authorization with PKCE and selects the credentials and approval modes available to the agent.

## When to use PayBox

Use PayBox when a user wants an agent to pay, sign, swap, or use a credential through a scoped grant. The agent calls the MCP tools after the user authorizes the connection. PayBox does not give the agent a private key, card number, or password.

## Workflow

1. Configure the MCP endpoint in an MCP client.
2. Complete OAuth authorization in a browser.
3. Use the tools in [the MCP reference](https://docs.paybox.sh/reference/mcp-tools).
4. For `pending_approval`, show the approval URL to the user and poll `get_request` until the operation reaches a terminal state.

## Choose a plugin or service

For a job that needs a provider, such as a Solana limit order, a liquidity-pool
investment, or concert tickets, search both `discover_plugins` and
`discover_services` before choosing a route, even when one catalog has a match.
Use concise task keywords. If the user says "use Kamino", search both catalogs
for Kamino and keep routes that support the requested action and chain. Keep
default catalog filters unless the user restricted them; never use an empty
plugin query. Follow each tool's pagination guidance before claiming there is
only one match.

* Multiple relevant routes: show a short choice with provider names, plugin or
  service labels, supported actions, and any enablement requirement; ask which
  to use.
* Exactly one relevant route across both catalogs: state the route and continue
  without asking the user to choose again. One matching Kamino plugin and no
  matching Kamino services means use the plugin.
* No relevant routes: explain that neither catalog matched and offer a useful
  next step.

Include disabled official plugins as choices requiring enablement. If the
selected plugin is disabled, share its `enable_url`, wait for the user to enable
it, and discover it again before calling `use_plugin`.

After selection, read the returned `contract_uri` unchanged with `get_contract`
for an official plugin or a service; unofficial plugins include their tool
schemas in discovery. Continue through `use_plugin` or `use_service` using the
exact contract. Do not stop at a discovery summary. Ask for missing task details
and keep required approvals; selecting a route does not authorize spending or
signing. Do not browse catalogs for a connection-only request or a core wallet
operation that already has a dedicated tool.

## HTTP discovery

Use `https://api.paybox.sh/.well-known/api-catalog` to find the API contract and `https://api.paybox.sh/openapi.json` to read HTTP operations.

## Safety

PayBox does not give agents private keys, card numbers, passwords, or other raw credential material. Do not request those values from users.
