Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"io-github-swap-api-mcp": {
"args": [
"-y",
"@swapapi/mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Executable token swap calldata in one GET request. No API keys. No accounts. No SDK bloat.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@swapapi/mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @swapapi/mcp against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in finance
Real-time financial market data: stocks, forex, crypto, commodities, and economic indicators
A Model Context Protocol (MCP) server that provides AI assistants with direct access to the Spreedly payments API. Enables LLMs to manage gateways, process transactions, tokenize payment methods, and more, through structured, validated tool calls.
MCP server for InsightSentry financial data API - market data, options, screeners, and more
Model Context Protocol for Actual Budget API
MCP Security Weekly
Get CVE alerts and security updates for Mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Executable token swap calldata in one GET request. No API keys. No accounts. No SDK bloat.
https://api.swapapi.dev
Swap 1 ETH for USDC on Ethereum:
curl "https://api.swapapi.dev/v1/swap/1?\
tokenIn=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&\
tokenOut=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&\
amount=1000000000000000000&\
sender=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
That's it. The response contains everything you need to sign and broadcast.
{
"success": true,
"data": {
"status": "Successful",
"tokenFrom": {
"address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"symbol": "ETH",
"name": "Ether",
"decimals": 18
},
"tokenTo": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6
},
"swapPrice": 2435.12,
"priceImpact": 0.0003,
"amountIn": "1000000000000000000",
"expectedAmountOut": "2435120000",
"minAmountOut": "2422947280",
"tx": {
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"to": "0x011E52E4E40CF9498c79e329EBc29ed08c8B5abB",
"data": "0x2646478b...",
"value": "1000000000000000000",
"gasPrice": 30000000000,
"gas": "250000"
}
},
"timestamp": "2026-03-12T00:00:00.000Z"
}
| Field | Description |
|---|---|
success | Boolean indicating request success |
data.status | "Successful", "Partial", or "NoRoute" |
data.tokenFrom/tokenTo | Token metadata (address, symbol, decimals) |
data.swapPrice | Exchange rate |
data.priceImpact | Slippage impact (0.001 = 0.1%) |
data.expectedAmountOut | Estimated output in token's smallest unit |
data.minAmountOut | Guaranteed minimum (respects your maxSlippage) |
data.tx | Transaction object ready to sign and send |
Endpoint: GET /v1/swap/{chainId}
Parameters:
| Param | Required | Description |
|---|---|---|
chainId | path | Chain ID (1=Ethereum, 8453=Base, 42161=Arbitrum, etc.) |
tokenIn | query | Input token address. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH |
tokenOut | query | Output token address |
amount | query | Input amount in smallest unit (e.g., wei for ETH) |
sender | query | Your wallet address (used to build the tx) |
maxSlippage | query | Optional. 0-1 (default: 0.005 = 0.5%) |
Response codes:
200 — Quote ready400 — Invalid params or unsupported chain429 — Rate limit exceeded (60/min per IP)502 — Upstream service errorcurl "https://api.swapapi.dev/v1/swap/8453?\
tokenIn=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&\
tokenOut=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&\
amount=500000000000000000&\
sender=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
curl "https://api.swapapi.dev/v1/swap/42161?\
tokenIn=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&\
tokenOut=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&\
amount=1000000000&\
sender=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&\
maxSlippage=0.01"
curl "https://api.swapapi.dev/v1/swap/1?\
tokenIn=0x6B175474E89094C44Da98b954EedeAC495271d0F&\
tokenOut=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&\
amount=1000000000000000000000&\
sender=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
curl "https://api.swapapi.dev/v1/swap/137?\
tokenIn=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&\
tokenOut=0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174&\
amount=10000000000000000000&\
sender=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
The API gives you an unsigned transaction. Sign it and broadcast:
cast# 1. Set swap parameters
CHAIN_ID
... [View full README on GitHub](https://github.com/swap-api/swap-api#readme)