MCP.so
登录

Swap Api MCP Server

@Swap-API

基本信息

分类

开发工具

传输方式

stdio

作者

Swap-API

提交者

mino

关于 Swap Api MCP Server

Free token swaps for AI agents. No API keys. Returns executable transaction calldata for 40+ EVM chains.

Swap Api MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "swapapi": {
      "command": "npx",
      "args": [
        "@swapapi/mcp"
      ]
    }
  }
}

Swap Api MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

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_tokens for 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

常见问题

1

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.

2

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.

3

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.

4

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.

5

What is the native token address?

Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as the token address for native tokens (ETH, MATIC, etc.).

评论

开发工具 分类下的更多 MCP 服务器