# x402_pay

Pay an external API or service via the x402 protocol (HTTP 402). MIDAS handles payment signing and settlement automatically using your Base wallet USDC.

Agent View of the PolicyLayer registry record for `x402_pay`. HTML page: https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/x402-pay

## Facts

- Tool: `x402_pay`
- Server: MIDAS Protocol (`https://mcp.midasprotocol.org/mcp`) — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol.md
- Homepage: https://github.com/BbrainFrance/Agent_payment_protocol
- Risk category: Financial (Critical risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 4 (1 required)
- Recommended policy verdict: Approval-gated

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes |  |
| `body` | string | no |  |
| `method` | string | no |  |
| `headers` | object | no |  |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "x402_pay",
    "arguments": {
      "url": "<url>"
    }
  }
}
```

## Why x402_pay is rated Critical

This tool moves money (USDC tokens) from a wallet, committing financial obligations and transferring value. Financial transactions represent the highest-severity category and carry critical risk if an AI agent misuses them without proper authorization or context—funds could be transferred to unintended recipients or for unintended services.

From the tool's own definition: "Tool description explicitly states: 'Pay an external API or service via the x402 protocol' and 'using your Base wallet USDC.' The tool name 'x402_pay' directly indicates payment functionality."

Risk signals: Accepts URL/endpoint input (url) · Accepts raw HTML/template content (body)

## Use case

AI agents use x402_pay to commit financial operations through MIDAS Protocol, usually the final step of a payment, billing, or trading workflow. A call moves real money.

## Recommended policy (PolicyLayer)

Verdict: **Approval-gated**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches MIDAS Protocol:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "x402_pay": {
      "deny_if": [
        {
          "conditions": [],
          "on_deny": "Requires human approval."
        }
      ]
    }
  }
}
```

## Other tools on MIDAS Protocol (43)

- `accept_bet` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/accept-bet.md
- `accept_negotiation` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/accept-negotiation.md
- `book_and_pay` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/book-and-pay.md
- `borrow` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/borrow.md
- `cancel_subscription` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/cancel-subscription.md
- `counter_offer` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/counter-offer.md
- `create_bet` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/create-bet.md
- `create_contract` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/create-contract.md
- `create_loan_offer` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/create-loan-offer.md
- `create_subscription` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/create-subscription.md
- `fulfill_condition` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/fulfill-condition.md
- `human_approve_negotiation` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/human-approve-negotiation.md
- `reject_negotiation` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/reject-negotiation.md
- `repay_loan` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/repay-loan.md
- `send_payment` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/send-payment.md
- `sign_contract` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/sign-contract.md
- `start_negotiation` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/start-negotiation.md
- `withdraw_usdc` — Financial — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/withdraw-usdc.md
- `blockchain_wallet_info` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/blockchain-wallet-info.md
- `check_balance` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/check-balance.md
- `check_inbox` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/check-inbox.md
- `check_reputation` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/check-reputation.md
- `discover_services` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/discover-services.md
- `get_quote` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/get-quote.md
- `get_service` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/get-service.md
- `list_blocked_agents` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/list-blocked-agents.md
- `list_loan_offers` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/list-loan-offers.md
- `list_open_bets` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/list-open-bets.md
- `my_bets` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/my-bets.md
- `my_contracts` — Read — https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol/my-contracts.md
- …and 13 more: https://policylayer.com/tools/io-github-bbrainfrance-midas-protocol.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=io-github-bbrainfrance-midas-protocol · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-bbrainfrance-midas-protocol
