Connecter votre agent
1. Ajouter le serveur MCP
Choisissez votre client, copiez, collez. Ni clé ni inscription : le serveur cherche et décrit seulement — le paiement reste dans votre propre 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/mcpEnsuite, demandez simplement à votre agent
“Trouve un service qui vérifie si une adresse de wallet est sanctionnée, puis montre-moi son prix et comment l'appeler.”
L'agent utilise les outils MCP pour chercher, lire le schéma et le prix, puis votre client x402 paie.
2. Payer avec un client x402
Utilisez le SDK x402 officiel : il lit le challenge 402, signe l'autorisation USDC avec votre wallet et rejoue la requête.
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());Réseau : Base · actif : USDC · Wallet