Swap Api MCP Server

That's it. The response contains everything you need to sign and broadcast.

Local serverstdioTypeScript

What is the Swap Api MCP server?

If you already use Swap Api, the swap api mcp server is the piece that lets your assistant work with it directly. That's it. The response contains everything you need to sign and broadcast.

Installation

@swapapi/mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • Param — Required
  • chainId — path
  • tokenIn — query
  • tokenOut — query
  • amount — query
  • sender — query
  • maxSlippage — query

Credentials and setup notes

Configuration is passed through the environment: CHAIN_ID, PRIVATE_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Swap Api's toolset — Param, chainId, tokenIn and 4 more — is a fair guide to whether it matches your workflow. It is maintained by swap-api; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
ParamRequired
chainIdpath
tokenInquery
tokenOutquery
amountquery
senderquery
maxSlippagequery

How to install the Swap Api MCP server

Or add to Claude Desktop config:

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
CHAIN_IDConfiguration value read at startup.Optional
PRIVATE_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Swap Api to Param.
  • Use Swap Api to chainId.
  • Use Swap Api to tokenIn.

Frequently asked questions

It connects Swap Api to MCP-compatible AI assistants such as Claude and Cursor, exposing 7 tools (Param, chainId, tokenIn, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Swap Api directly.