A-Pay Protocol

v0.1.8
io.github.neuralaisofficial-lang/apay Checked 2 days ago Published 2 months ago

Universal HTTP 402 Micropayment Protocol & Autonomous Economic Settlement Engine for AI Agents

Values you need

VariableWhat it is
APAY_PRIVATE_KEYoptional secret Agent private key for signing EIP-712 payment authorizations (auto-generates non-custodial session wallet if omitted)
APAY_NETWORKoptional Base network (base-mainnet or base-sepolia) Default: base-mainnet
APAY_CURRENCYoptional Preferred payment token (USDC, APAY, or DUAL) Default: DUAL
APAY_MAX_PER_CALLoptional Maximum allowed spend per single HTTP 402 request in USDC (default: 0.05) Default: 0.05
APAY_DAILY_BUDGEToptional Maximum 24-hour spending limit in USDC (default: 2.00) Default: 2.0

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add apay -- uvx apay==0.1.8 mcp
Add to claude_desktop_config.json
{
  "mcpServers": {
    "apay": {
      "args": [
        "apay==0.1.8",
        "mcp"
      ],
      "command": "uvx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "apay": {
      "args": [
        "apay==0.1.8",
        "mcp"
      ],
      "command": "uvx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "apay": {
      "args": [
        "apay==0.1.8",
        "mcp"
      ],
      "command": "uvx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.apay]
command = "uvx"
args = ["apay==0.1.8", "mcp"]

Remote (hosted)

Run in a terminal
claude mcp add --transport http apay https://apay-network.vercel.app/api/mcp
Add to Settings → Connectors → Add custom connector (or claude_desktop_config.json via mcp-remote)
{
  "mcpServers": {
    "apay": {
      "args": [
        "-y",
        "mcp-remote",
        "https://apay-network.vercel.app/api/mcp"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "apay": {
      "url": "https://apay-network.vercel.app/api/mcp"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "apay": {
      "type": "http",
      "url": "https://apay-network.vercel.app/api/mcp"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.apay]
command = "npx"
args = ["-y", "mcp-remote", "https://apay-network.vercel.app/api/mcp"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: apay_request, apay_get_wallet_status, apay_set_budget, apay_inspect_endpoint, apay_get_balance.
  4. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json