MCP server for SWARM's x402 services: pay per call in USDC on Base, no account or API key.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add swarm-x402 --env SWARM_WALLET_KEY='<SWARM_WALLET_KEY>' -- npx -y swarm-x402-mcp~/.codex/config.toml
[mcp_servers.swarm-x402]
command = "npx"
args = ["-y", "swarm-x402-mcp"]
env = { SWARM_WALLET_KEY = "<SWARM_WALLET_KEY>" }
# codex mcp add swarm-x402 --env SWARM_WALLET_KEY='<SWARM_WALLET_KEY>' -- npx -y swarm-x402-mcp~/.cursor/mcp.json
{
"mcpServers": {
"swarm-x402": {
"command": "npx",
"args": [
"-y",
"swarm-x402-mcp"
],
"env": {
"SWARM_WALLET_KEY": "<SWARM_WALLET_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"swarm-x402": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"swarm-x402-mcp"
],
"env": {
"SWARM_WALLET_KEY": "<SWARM_WALLET_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"swarm-x402": {
"command": "npx",
"args": [
"-y",
"swarm-x402-mcp"
],
"env": {
"SWARM_WALLET_KEY": "<SWARM_WALLET_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"swarm-x402": {
"command": "npx",
"args": [
"-y",
"swarm-x402-mcp"
],
"env": {
"SWARM_WALLET_KEY": "<SWARM_WALLET_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"swarm-x402": {
"command": "npx",
"args": [
"-y",
"swarm-x402-mcp"
],
"env": {
"SWARM_WALLET_KEY": "<SWARM_WALLET_KEY>"
}
}
}
}需要的环境变量
SWARM_WALLET_KEY
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。