Clawswap

Clawswap

MCP server providing cross-chain swaps between Solana and Base for AI agents paid for via x402 micropayments.

Category
Visit Server

README

@clawswap/mcp-server

npm version License: MIT npm downloads

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).

What can it do?

Ask your AI agent any of these:

  • "Send 10 USDC from Solana to Base"
  • "How much would it cost to bridge 100 USDC to Base?"
  • "Transfer my SOL to Base as ETH"
  • "Swap 50 USDT from Base to Solana"
  • "Move my stablecoins cross-chain"

The server handles the entire flow: quote → payment → signing → submission → settlement.

Installation

Claude Desktop

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 Code

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"

Cursor

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"
      }
    }
  }
}

Windsurf

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"
      }
    }
  }
}

OpenAI Codex

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" }

Antigravity

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"
      }
    }
  }
}

Smithery

npx -y @smithery/cli install @clawswap/mcp-server --client claude

Supports multiple clients: claude, cursor, windsurf, cline, vscode, and more.

Tools

clawswap_bridge

Bridge 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_quote

Preview a bridge quote without executing. Free, no payment required.

Same parameters as clawswap_bridge minus recipient.

clawswap_status

Check the status of a previously initiated bridge.

Parameter Type Required Description
requestId string yes The requestId from clawswap_bridge

Environment Variables

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.

Fees

  • Solana → Base: $0.50 USDC (paid automatically via x402 protocol, gas sponsored by ClawSwap)
  • Base → Solana: Free (agent pays ~$0.001 Base gas directly)

Supported Tokens

  • Solana: USDC, USDT, SOL
  • Base: USDC, USDT, ETH, WETH

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured