An MCP (Model Context Protocol) server that exposes KyberSwap trading, liquidity, and limit-order flows as 13 tools for LLM agents and developer workflows.
The server is read-only and calldata-building: it never holds private keys or signs transactions. It returns reviewable calldata or EIP-712 typed data, and you sign and broadcast with your own wallet (Foundry, viem, ethers, MetaMask, hardware wallet, etc.).
The server includes:
- Read-only market and portfolio tools
- Swap and zap calldata builders
- On-chain simulation and transaction status verifiers
- Gasless limit-order build/submit and cancel/submit flows
| Tool | Description |
|---|---|
get-quote |
Quote a swap with route details, gas, price impact, and trade economics |
token-info |
Resolve token metadata, USD price, verification status, and honeypot/FOT checks |
get-pool-info |
Inspect pools by address or token pair, with TVL, APR, volume, and fee data |
order-manager |
Query open, filled, cancelled, or expired limit orders for a wallet |
position-manager |
Query concentrated-liquidity positions, value, fees, and APR for a wallet |
| Tool | Description |
|---|---|
swap-build |
Build calldata (to, data, value) for a swap. Requires sender. |
zap |
Build calldata for zap in or zap out. Requires sender. |
| Tool | Description |
|---|---|
swap-simulate |
Dry-run swap calldata via eth_call. Returns success or decoded revert reason. |
swap-status |
Check receipt status of a submitted tx. Decodes revert reason on failure. |
| Tool | Description |
|---|---|
limit-order-build |
Build a gasless limit order. Returns EIP-712 typed data to sign. |
limit-order-submit |
Submit a signed limit order. Returns the order ID. |
limit-order-cancel-build |
Build a gasless cancel for one or more orders. Returns EIP-712 typed data. |
limit-order-cancel-submit |
Submit a signed cancel. Gasless window is ~90 seconds from order creation. |
The chain registry currently includes 18 EVM chains:
ethereumbscarbitrumpolygonoptimismbaseavalanchelineamantlesonicberachainroninunichainhyperevmplasmaetherlinkmonadmegaeth
- Node.js 18+
- npm
npm install
npm run buildnpm run devOr run the built server:
npm startThe server does not require any wallet secrets. There are no PRIVATE_KEY, KEYSTORE_PATH, or similar environment variables — the server never signs transactions.
Optional: override the default public RPC for any chain by setting RPC_URL_<CHAIN_SLUG_UPPER>, e.g.
export RPC_URL_ETHEREUM=https://eth.your-rpc.example
export RPC_URL_BASE=https://base.your-rpc.exampleThese are only used by swap-simulate and swap-status for eth_call and receipt lookups.
{
"mcpServers": {
"kyberswap": {
"command": "node",
"args": ["/path/to/kyberswap-mcp-server/dist/index.js"]
}
}
}No secrets in the config — the server is read/build only.
get-quote— inspect the route and economics.swap-build— passsender(your wallet address) to getto,data,value.swap-simulate— dry-run the calldata witheth_call. Confirmstatus: success.- Sign and broadcast the tx with your own wallet (
cast send, viem, ethers, etc.). swap-status— verify inclusion by passing the resultingtxHash.
Routes expire in ~30 seconds. If swap-simulate returns reverted with an expired-route reason, call swap-build again for a fresh route.
limit-order-build— returns the approval target and EIP-712 typed data to sign.- Ensure the maker has approved the approval target for the maker asset.
- Sign the typed data with your wallet (
eth_signTypedData_v4). limit-order-submit— pass the signature and order params to post the order.- Monitor with
order-manager.
limit-order-cancel-build— returns EIP-712 typed data for a gasless cancel.- Sign the typed data with your wallet.
limit-order-cancel-submit— post the signed cancel.
The gasless cancellation window is ~90 seconds from order creation. After that, an on-chain hard-cancel transaction is required (not provided by this server — use the KyberSwap UI or call the limit-order contract directly).
Useful for discovery before zapping.
- Supports
poolAddress - Supports pair search with
tokenIn/tokenOutortoken0/token1 - Supports
dex - Supports sorting by
tvl,volume,apr, orearnFee
Informational only — always confirm the exact pool with the user before calling zap.
- Requires
sender(the address that will sign and broadcast) - Resolves token symbols or addresses
- Applies token safety checks (honeypot, FOT)
- Uses smart slippage defaults when omitted
- Returns reviewable
to/data/value— does not broadcast
Supports both directions through action:
action: "in"for adding liquidityaction: "out"for removing liquidity from an existing position into a chosen token
For zap in, common inputs are:
sendertokenInamountInpool- one range mode:
tickLower/tickUpper,fullRange,priceLower/priceUpper, orpositionId
For zap out, common inputs are:
senderpositionIdpooltokenOut- optional
liquidityOut - optional
burnNft
Returns reviewable calldata. Does not execute on-chain.
Calls eth_call against the swap calldata — no gas, no wallet, no signature. Use after swap-build and before broadcasting. On revert, the tool decodes the reason and lists likely causes.
Pass a tx hash after broadcasting. For a successful tx, returns block number and gas used. For a failed tx, replays the call at the same block to decode the revert reason.
limit-order-buildblocks native ETH as maker asset — use WETH (or the wrapped native equivalent).- The approval target is the KyberSwap DSLO protocol contract; make sure the maker has approved it for the maker asset before submitting.
- Orders are EIP-712 typed data; sign with
eth_signTypedData_v4.
Get me a quote on Ethereum to swap 1 ETH to USDC.
Build a swap on Arbitrum from 0.1 ETH to USDC for sender 0xYourWallet...
Simulate the last swap calldata on Arbitrum before I sign it.
Check the status of tx 0xabc... on Base.
Show me the top USDT/WBNB pools on BSC sorted by TVL.
Build a zap-in on Ethereum using 1000 USDC into pool 0x... with full range for sender 0xYourWallet...
Build a zap-out on BSC for position 12345 in pool 0x..., withdraw everything into USDT for sender 0xYourWallet...
Build a limit order on Ethereum to sell 1000 USDC for 0.5 WETH at price $4000 for maker 0xYourWallet...
Show my liquidity positions on Ethereum for wallet 0xYourWallet...
- The runtime entrypoint is
dist/index.js. npm run buildcompiles TypeScript todist/.npm run devruns the server directly fromsrc/index.tsviatsx.- The repo is
type: "module"and uses Node ESM. - API requests time out after 15 seconds.