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 mcp add --transport http 17711 https://api.17711.xyz/mcp{
"mcpServers": {
"17711": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.17711.xyz/mcp"]
}
}
}{
"mcpServers": {
"17711": { "url": "https://api.17711.xyz/mcp" }
}
}{
"servers": {
"17711": { "type": "http", "url": "https://api.17711.xyz/mcp" }
}
}[mcp_servers.17711]
url = "https://api.17711.xyz/mcp"https://api.17711.xyz/mcpDespué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.
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