# x402mcp

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add algo-wallet/x402mcp

# Browse available tools
npx -y @smithery/cli@latest tool list algo-wallet/x402mcp

# Get full schema for a tool
npx -y @smithery/cli@latest tool get algo-wallet/x402mcp check_balance

# Call a tool
npx -y @smithery/cli@latest tool call algo-wallet/x402mcp check_balance '{}'
```

## Direct MCP Connection

Endpoint: `https://x402mcp--algo-wallet.run.tools`

**Optional config:**
- `X402_AGENT_ID` (query) — Your agent ID registered at ai-agentic-wallet.com
- `X402_PORTAL_KEY` (query) — pk_live_... key from your dashboard → API Keys

## Tools (3)

- `check_balance` — Check USDC and ALGO balances for your agent wallet and mandate contract.
- `check_mandates` — List active spending mandates — per-tx cap, daily cap, expiry.
- `pay_with_x402` — Pay for x402-gated APIs. Requires STDIO transport for non-custodial signing.

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get algo-wallet/x402mcp <tool-name>
```
