Toll402 SDKs, MCP server and docs — pay-per-call tools for AI agents via x402 (USDC on Base). https://toll402.dev
Setup
Choose your client, copy the config, then fill in any required environment variables.
Local
claude mcp add toll402 --env TOLL402_WALLET_KEY='<TOLL402_WALLET_KEY>' --env TOLL402_API_KEY='<TOLL402_API_KEY>' -- npx -y toll402-mcp~/.codex/config.toml
[mcp_servers.toll402]
command = "npx"
args = ["-y", "toll402-mcp"]
env = { TOLL402_WALLET_KEY = "<TOLL402_WALLET_KEY>", TOLL402_API_KEY = "<TOLL402_API_KEY>" }
# codex mcp add toll402 --env TOLL402_WALLET_KEY='<TOLL402_WALLET_KEY>' --env TOLL402_API_KEY='<TOLL402_API_KEY>' -- npx -y toll402-mcp~/.cursor/mcp.json
{
"mcpServers": {
"toll402": {
"command": "npx",
"args": [
"-y",
"toll402-mcp"
],
"env": {
"TOLL402_WALLET_KEY": "<TOLL402_WALLET_KEY>",
"TOLL402_API_KEY": "<TOLL402_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"toll402": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"toll402-mcp"
],
"env": {
"TOLL402_WALLET_KEY": "<TOLL402_WALLET_KEY>",
"TOLL402_API_KEY": "<TOLL402_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"toll402": {
"command": "npx",
"args": [
"-y",
"toll402-mcp"
],
"env": {
"TOLL402_WALLET_KEY": "<TOLL402_WALLET_KEY>",
"TOLL402_API_KEY": "<TOLL402_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"toll402": {
"command": "npx",
"args": [
"-y",
"toll402-mcp"
],
"env": {
"TOLL402_WALLET_KEY": "<TOLL402_WALLET_KEY>",
"TOLL402_API_KEY": "<TOLL402_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"toll402": {
"command": "npx",
"args": [
"-y",
"toll402-mcp"
],
"env": {
"TOLL402_WALLET_KEY": "<TOLL402_WALLET_KEY>",
"TOLL402_API_KEY": "<TOLL402_API_KEY>"
}
}
}
}Remote
claude mcp add --transport http toll402 https://toll402.dev/connector/mcp~/.codex/config.toml
[mcp_servers.toll402]
url = "https://toll402.dev/connector/mcp"
# codex mcp add toll402 --url https://toll402.dev/connector/mcp~/.cursor/mcp.json
{
"mcpServers": {
"toll402": {
"url": "https://toll402.dev/connector/mcp"
}
}
}.vscode/mcp.json
{
"servers": {
"toll402": {
"type": "http",
"url": "https://toll402.dev/connector/mcp"
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"toll402": {
"httpUrl": "https://toll402.dev/connector/mcp"
}
}
}claude_desktop_config.json · Customize › Connectors › Add custom connector
{
"mcpServers": {
"toll402": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://toll402.dev/connector/mcp"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"toll402": {
"url": "https://toll402.dev/connector/mcp"
}
}
}Environment variables
TOLL402_WALLET_KEYTOLL402_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.