agentis-pay 0.1.1

Agentis Pay CLI — AI-agent payments over PIX with MCP server support
Documentation
# agentis-pay

## Install

Build and install the CLI locally with:

```bash
./scripts/install-agentis-pay.sh
```

Options:

- `--bin-dir` to change the binary destination (default: `~/.local/bin`).
- Shell completion installation is currently not bundled in this CLI package.

## Usage

Discover available commands with:

```bash
agentis-pay --help
agentis-pay pay --help
```

Example commands:

```bash
agentis-pay signup --email user@example.com --cpf 123.456.78901 --phone "+55 (11) 99999 0000"
agentis-pay pay --key 12345678901 --amount 12,34 --note "coffee"
agentis-pay pay --key 12345678901 --amount-cents 1234 --note "coffee"
agentis-pay keys
agentis-pay history --limit 10
```

## MCP

Install and run the local MCP server:

```bash
agentis-pay login
agentis-pay mcp install --client claude
```

The generated JSON can be pasted directly into Claude Desktop config.
For local MCP clients, `agentis-pay mcp serve` automatically reuses the session already saved by the CLI in `~/.agentis-pay/credentials.json`, including refreshable auth state and the persisted installation/device identity.

The local MCP server currently exposes these agent-facing tools:

- `agentispay_whoami`
- `agentispay_account`
- `agentispay_balance`
- `agentispay_history` (supports `id?` and `limit?`)
- `agentispay_brcode_decode`
- `agentispay_deposit`
- `agentispay_pix_keys`
- `agentispay_limits`
- `agentispay_pay` (and alias `agentispay_pix_send`)

Host/bootstrap commands such as `login`, `verify`, `logout`, `mcp serve`, and `mcp install` remain CLI-only.
Trust-related tools are intentionally omitted from MCP for now.

Most local agents should use the saved-login flow above and avoid embedding JWTs in config files. For advanced cases, MCP still supports explicit env overrides:

```bash
AGENTIS_PAY_OUTPUT=json \
AGENTIS_PAY_JWT=<token> \
AGENTIS_PAY_AGENT_NAME=<name> \
AGENTIS_PAY_DEVICE_ID=<device-id> \
agentis-pay mcp serve --stdio
```

Include a `request_id` and optional `idempotency_key` for production-safe retries:

```json
{
  "name": "agentispay_pay",
  "arguments": {
    "key": "alice@pix",
    "amount_cents": 1250,
    "request_id": "request-123e4567",
    "idempotency_key": "idem-123e4567"
  }
}
```

`agentispay_pay` returns the transfer result:

```json
{
  "request_id": "request-123e4567",
  "status": "paid",
  "key": "alice@pix",
  "owner_name": "Alice Cooper",
  "key_type": "pix",
  "amount_cents": 1250,
  "amount_brl": "R$ 12.50",
  "note": ""
}
```