MCP server for cross-chain token swaps between Solana and Base using x402 payments for fees
clawswap-mcp is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on base, cross-chain, mcp, mcp-server. It currently has 2 GitHub stars and 1 forks, and sits alongside related tools like 1ly-mcp-server, x402-deploy, tdm-integration-kit, TDM-Agent-Integration-Kit, chaingpt-claude-skill, x402-proxy.
Send, swap, and bridge tokens cross-chain between Solana and Base — gasless, in one tool call. Built for AI agents using the Model Context Protocol (MCP).
Ask your AI agent any of these:
The server handles the entire flow: quote → payment → signing → submission → settlement.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"clawswap": {
"command": "npx",
"args": ["-y", "@clawswap/mcp-server"],
"env": {
"SOLANA_PRIVATE_KEY": "your-base58-solana-private-key",
"BASE_PRIVATE_KEY": "0x-your-hex-base-private-key"
}
}
}
}
claude mcp add clawswap -- npx -y @clawswap/mcp-server
Then set environment variables:
export SOLANA_PRIVATE_KEY="your-base58-solana-private-key"
export BASE_PRIVATE_KEY="0x-your-hex-base-private-key"
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"clawswap": {
"command": "npx",
"args": ["-y", "@clawswap/mcp-server"],
"env": {
"SOLANA_PRIVATE_KEY": "your-base58-solana-private-key",
"BASE_PRIVATE_KEY": "0x-your-hex-base-private-key"
}
}
}
}
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"clawswap": {
"command": "npx",
"args": ["-y", "@clawswap/mcp-server"],
"env": {
"SOLANA_PRIVATE_KEY": "your-base58-solana-private-key",
"BASE_PRIVATE_KEY": "0x-your-hex-base-private-key"
}
}
}
}
codex mcp add clawswap -- npx -y @clawswap/mcp-server
Or add to ~/.codex/config.toml:
[mcp_servers.clawswap]
command = "npx"
args = ["-y", "@clawswap/mcp-server"]
env = { SOLANA_PRIVATE_KEY = "your-base58-solana-private-key", BASE_PRIVATE_KEY = "0x-your-hex-base-private-key" }
Add to ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"clawswap": {
"command": "npx",
"args": ["-y", "@clawswap/mcp-server"],
"env": {
"SOLANA_PRIVATE_KEY": "your-base58-solana-private-key",
"BASE_PRIVATE_KEY": "0x-your-hex-base-private-key"
}
}
}
}
npx -y @smithery/cli install @clawswap/mcp-server --client claude
Supports multiple clients: claude, cursor, windsurf, cline, vscode, and more.
clawswap_bridgeBridge tokens between Solana and Base. Handles the entire flow automatically.
| Parameter | Type | Required | Description |
|---|---|---|---|
amount |
string | yes | Human-readable amount, e.g. "100", "0.5" |
token |
string | yes | Token symbol: USDC, USDT, SOL, ETH, WETH |
from |
"solana" | "base" | yes | Source chain |
to |
"solana" | "base" | yes | Destination chain |
recipient |
string | no | Destination address (defaults to agent's own) |
destinationToken |
string | no | Destination token (defaults to same or USDC) |
slippage |
number | no | Slippage tolerance 0-1 (default 0.01) |
clawswap_quotePreview a bridge quote without executing. Free, no payment required.
Same parameters as clawswap_bridge minus recipient.
clawswap_statusCheck the status of a previously initiated bridge.
| Parameter | Type | Required | Description |
|---|---|---|---|
requestId |
string | yes | The requestId from clawswap_bridge |
| Variable | Required | Description |
|---|---|---|
SOLANA_PRIVATE_KEY |
For Solana→Base | Base58-encoded Solana private key |
BASE_PRIVATE_KEY |
For Base→Solana | 0x-prefixed hex Base/EVM private key |
SOLANA_RPC_URL |
No | Solana RPC (default: https://api.mainnet-beta.solana.com) |
BASE_RPC_URL |
No | Base RPC (default: https://mainnet.base.org) |
You only need keys for the direction(s) you want to bridge. The server starts with whatever is configured.
MIT
Enable AI agents to discover, launch tokens, pay for, and sell APIs and resources using x402
Turn any API or MCP server into a paid service with x402
Developer integration tools for adding TDM payments to AI agents, apps, and workflows. CLI, MCP server, and copy-paste examples
Developer integration tools for adding TDM payments to AI agents, apps, and workflows. CLI, MCP server, and copy-paste examples
154 Web3 MCP tools for Claude Code, custody-free. Plus an agent wallet prompt injection can't drain: per-tx, daily, and on-chain (ERC-4337) spending caps the model can't bypass. EVM + Solana + Tron DEX/DeFi, perps, prediction markets, contract deploy + audit.
curl for x402 and MPP paid APIs. CLI + MCP proxy that auto-pays any endpoint on Base, Solana, and Tempo. Zero crypto code on the buyer side.
Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes instantly, manages risk while you sleep. Agent commerce protocol for machine-to-machine payments. Self-hosted. Built on Claude.
The self-improving LLM router that optimize your agentic workflows with every runs, works with any harnesses, any models, any loops.