Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,34 +146,34 @@ paytaca pay https://api.example.com/v1/complete --method POST --body '{"prompt":
# → Handles 402 → pays → returns response
```

### AI Agent Integration
### AI Agent Integration (MCP + Paytaca AI)

Paytaca CLI provides AI agent skills for wallet operations. Install from GitHub (supports 45+ AI frameworks):
Configure an AI harness in one step. This installs the Paytaca MCP server and, for opencode, also the Paytaca AI provider (model catalogue + API key) so the Paytaca AI models are usable immediately:

```bash
# Install specific skill
npx skills add paytaca/paytaca-cli --skill <skill-name> -a <agent> -g
paytaca ai configure opencode # claude | opencode | cursor | codex | pi | generic
```

The command creates a wallet-bound API key against the Paytaca AI backend, writes the provider (base URL, models, key) and MCP server into the harness config, then checks your AI credits and offers to buy a plan when none are active.

# Install all skills
npx skills add paytaca/paytaca-cli --all
Re-running is idempotent: an existing provider API key is reused. Then run the server over stdio:

# Examples
npx skills add paytaca/paytaca-cli --skill paytaca-x402 -a opencode -g
npx skills add paytaca/paytaca-cli --skill paytaca-wallet -a claude-code -g
npx skills add paytaca/paytaca-cli --skill paytaca-send -a openclaw -g
```bash
paytaca mcp
```

**Available Skills:**
**Read-only wallets:** if the active wallet cannot sign (no seed phrase in the keychain), `ai configure` asks for an API key instead of creating one. Generate it from your full wallet and hand it over:

```bash
paytaca ai api-key create # full wallet: prints sk-pytc-… once
paytaca ai configure opencode --api-key sk-pytc-… # read-only wallet
```

| Skill | Purpose | Approval Needed |
|-------|---------|------------------|
| `paytaca-x402` | HTTP 402 payment handling | Yes (before payment) |
| `paytaca-wallet` | Balance, addresses, history, token info | No (read-only) |
| `paytaca-send` | Send BCH and CashTokens | Yes (before sending) |
Read-only wallets report credits from the shared wallet hash but can't buy plans — fund credits from the full wallet.

**Supported frameworks:** OpenCode, Claude Code, OpenClaw, Cursor, Cline, Windsurf, Roo, Gemini CLI, Codex, GitHub Copilot, Goose, Trae, Kiro CLI, and 30+ more.
**MCP tools:** wallet reads (`get_balance`, `get_transactions`, `get_receiving_address`, `get_tokens`, `send`) plus Paytaca AI (`get_models`, `get_plans`, `get_credits`, `buy_plan`, `auto_refill`, `get_help`).

See [skills/README.md](skills/README.md) for detailed skill documentation.
Spending tools (`send`, `buy_plan`, `auto_refill`) require host-level approval. By default MCP operates on your **main wallet** and can spend real funds.

## Network

Expand Down Expand Up @@ -224,6 +224,10 @@ src/
x402.ts x402 header parsing, payment requirement selection
types/
x402.ts x402 payment types (PaymentRequired, PaymentPayload, etc.)
ai/
client.ts Paytaca AI backend client (config, wallet status, chat)
oauth.ts BCH OAuth challenge -> access token -> API key
configure.ts Harness setup (MCP + Paytaca AI provider + credits offer)
```

## Key Dependencies
Expand Down
Loading
Loading