anchor-x402
v0.3.2x402-paid agent tools: 18 over HTTP, 14 over stdio.
Values you need
| Variable | What it is | |
|---|---|---|
ANCHOR_WALLET_PRIVATE_KEY | required secret | EVM private key (0x-prefixed hex). The wallet pays for x402 calls in USDC on Base mainnet. Fund with USDC before use. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add anchor-x402 -e 'ANCHOR_WALLET_PRIVATE_KEY=<ANCHOR_WALLET_PRIVATE_KEY>' -- npx -y anchor-x402-mcp@0.2.3Add to
claude_desktop_config.json{
"mcpServers": {
"anchor-x402": {
"args": [
"-y",
"anchor-x402-mcp@0.2.3"
],
"command": "npx",
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "<ANCHOR_WALLET_PRIVATE_KEY>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"anchor-x402": {
"args": [
"-y",
"anchor-x402-mcp@0.2.3"
],
"command": "npx",
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "<ANCHOR_WALLET_PRIVATE_KEY>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "ANCHOR_WALLET_PRIVATE_KEY",
"id": "anchor-wallet-private-key",
"password": true,
"type": "promptString"
}
],
"servers": {
"anchor-x402": {
"args": [
"-y",
"anchor-x402-mcp@0.2.3"
],
"command": "npx",
"env": {
"ANCHOR_WALLET_PRIVATE_KEY": "${input:anchor-wallet-private-key}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.anchor-x402]
command = "npx"
args = ["-y", "anchor-x402-mcp@0.2.3"]
env = { "ANCHOR_WALLET_PRIVATE_KEY" = "<ANCHOR_WALLET_PRIVATE_KEY>" }Remote (hosted)
Run in a terminal
claude mcp add --transport http anchor-x402 https://api.anchor-x402.com/mcpAdd to
Settings → Connectors → Add custom connector (or claude_desktop_config.json via mcp-remote){
"mcpServers": {
"anchor-x402": {
"args": [
"-y",
"mcp-remote",
"https://api.anchor-x402.com/mcp"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"anchor-x402": {
"url": "https://api.anchor-x402.com/mcp"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"anchor-x402": {
"type": "http",
"url": "https://api.anchor-x402.com/mcp"
}
}
}Add to
~/.codex/config.toml[mcp_servers.anchor-x402]
command = "npx"
args = ["-y", "mcp-remote", "https://api.anchor-x402.com/mcp"]For AI agents
- Ask the user for: ANCHOR_WALLET_PRIVATE_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- 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).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: anchor_hash, screen_wallet, attest_decision, decode_tx, resolve_name, token_price, decode_calldata, parse_datetime, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json