Swap Api
@Swap-API
About Swap Api
Free token swaps for AI agents. No API keys. Returns executable transaction calldata for 40+ EVM chains.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"swapapi": {
"command": "npx",
"args": [
"@swapapi/mcp"
]
}
}
}Tools
No tools detected
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Overview
What is Swap Api?
Swap Api is a Model Context Protocol (MCP) server that provides AI agents with executable token swap calldata for any EVM chain. It is designed for developers building AI‑powered trading or DeFi assistants.
How to use Swap Api?
Install the package globally with npm install -g @swapapi/mcp or run it on the fly with npx @swapapi/mcp. Configure the server in any MCP‑compatible client (e.g., Claude Desktop, Cursor) using the command npx @swapapi/mcp. The server exposes a single tool, swap_tokens, which accepts parameters such as chain ID, token addresses, amount, sender address, and optional slippage.
Key features of Swap Api
- Single tool:
swap_tokensfor swap calldata - Supports any EVM chain (Ethereum, Base, Arbitrum, etc.)
- Returns raw transaction data (to, data, value, gas, guaranteedOut)
- Configurable slippage tolerance (default 0.5%)
- Includes native token address constant for ETH/MATIC/etc.
Use cases of Swap Api
- AI agents executing token swaps on Ethereum mainnet
- Building a trading assistant that swaps ETH to USDC on Base
- Automating swaps on Arbitrum with custom slippage
- Generating calldata for DeFi liquidity management
FAQ about Swap Api
How do I get swap transaction data?
Call the swap_tokens tool with required parameters (chainId, tokenIn, tokenOut, amountIn, sender). It returns the calldata and other transaction details.
Which EVM chains are supported?
The README explicitly lists chain ID 1 (Ethereum), 8453 (Base), and 42161 (Arbitrum), and states “etc.” implying additional EVM chains.
What pre‑flight steps should I take before submitting a swap?
Check ERC‑20 approval for non‑native tokens, verify sender balance, estimate gas with a 20% buffer, simulate the transaction with eth_call, and submit within 30 seconds of fetching the quote.
Does the server require any authentication or API key?
No, the README does not mention any authentication or API key requirement for the MCP server.
What is the native token address?
Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE as the token address for native tokens (ETH, MATIC, etc.).
Frequently asked questions
How do I get swap transaction data?
Call the `swap_tokens` tool with required parameters (chainId, tokenIn, tokenOut, amountIn, sender). It returns the calldata and other transaction details.
Which EVM chains are supported?
The README explicitly lists chain ID 1 (Ethereum), 8453 (Base), and 42161 (Arbitrum), and states “etc.” implying additional EVM chains.
What pre‑flight steps should I take before submitting a swap?
Check ERC‑20 approval for non‑native tokens, verify sender balance, estimate gas with a 20% buffer, simulate the transaction with `eth_call`, and submit within 30 seconds of fetching the quote.
Does the server require any authentication or API key?
No, the README does not mention any authentication or API key requirement for the MCP server.
What is the native token address?
Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as the token address for native tokens (ETH, MATIC, etc.).
Basic information
More Developer Tools MCP servers
ZeroBeacon — 1000-Tool Collision-Proof Commerce Router
DavidFox998ZeroBeacon.ai — Collision-proof commerce router for AI agents. 1000 MCP tools: commerce, trust, billing, sovereign ID + everyday tools. LIVE.

PuzzleTide Puzzle Generator
Caravaca-LabsWord search generator, crossword generator, and sudoku generator + solver as a local-first MCP server. 15 deterministic tools: printable PDF puzzle worksheets, themed word banks, and verifiable LLM evals. From the makers
FastAPI-MCP
tadata-orgExpose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
Vibgrate MCP
VibgrateQuery your team's drift, vulnerability, and migration data from any AI assistant. Vibgrate MCP connects Cursor, Claude, ChatGPT, Windsurf, or VS Code to Vibgrate Cloud: 51 tools for DriftScores, CVEs and EOL runtimes, up
MCP Inspector
modelcontextprotocolVisual testing tool for MCP servers
Comments