Conecta tu agente

1. Añadir el servidor MCP

Elige tu cliente, copia y pega. Sin clave ni registro: el servidor solo busca y describe; el pago queda en tu propia wallet.

Claude CodeClaude DesktopCursorVS CodeCodexOtro cliente
Terminal
claude mcp add --transport http 17711 https://api.17711.xyz/mcp
claude_desktop_config.json
{
  "mcpServers": {
    "17711": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.17711.xyz/mcp"]
    }
  }
}
.cursor/mcp.json
{
  "mcpServers": {
    "17711": { "url": "https://api.17711.xyz/mcp" }
  }
}
.vscode/mcp.json
{
  "servers": {
    "17711": { "type": "http", "url": "https://api.17711.xyz/mcp" }
  }
}
~/.codex/config.toml
[mcp_servers.17711]
url = "https://api.17711.xyz/mcp"
Cualquier cliente con MCP remoto por Streamable HTTP: solo dale esta URL.
https://api.17711.xyz/mcp

Después, pídeselo a tu agente

“Busca un servicio que compruebe si una dirección de wallet está sancionada y muéstrame su precio y cómo llamarlo.”

El agente usa las herramientas MCP para buscar, leer el esquema y el precio, y tu cliente x402 paga.

2. Pagar con un cliente x402

Usa el SDK oficial de x402: lee el desafío 402, firma la autorización USDC con tu wallet y reintenta.

TypeScript
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const pay = wrapFetchWithPayment(fetch, client);

const res = await pay("https://api.17711.xyz/registry/ping-service/v1/ping", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ echo: "hello" }),
});
console.log(await res.json());

Red: Base · activo: USDC · Wallet

3. O llamar directamente a la API REST