原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

SwapChan

作者:TSavo版本 0.3.0i★ –i在云端运行
注册名称io.github.TSavo/swapchan

安装

概览

作者提供的说明(英文原文)

Find money in any wallet, best-price swaps, simulate, PnL, pools, whales, contract and bridge tools.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

你需要

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

适用于网页版、桌面版和手机版 Claude:

  1. 打开 Settings → Connectors
  2. 点击 Add custom connector
  3. 粘贴下面的地址,然后点击 Add
  4. 如果要求登录,请登录作者的服务
SettingsConnectors1+ Add2https://…3
https://mcp.swapchan.com/mcp

在终端中运行这条命令

claude mcp add --transport http swapchan https://mcp.swapchan.com/mcp

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "swapchan": {
      "url": "https://mcp.swapchan.com/mcp"
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "swapchan": {
      "type": "http",
      "url": "https://mcp.swapchan.com/mcp"
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

ChatGPT 只能连接互联网上的服务器:

  1. 打开网页版 ChatGPT → Settings → Connectors (Apps)
  2. 点击 Create 或 Add(部分套餐需要先在 Advanced 中开启 Developer mode)
  3. 粘贴下面的地址,起个名字,然后保存
  4. 如果要求登录,请登录作者的服务
SettingsConnectors1+ Create2https://…3
https://mcp.swapchan.com/mcp

菜单名称可能因套餐和版本不同而略有差异。

你的选择通过 Cookie 保存在这台设备上,无需账户。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

工具名称和描述与服务器在 2026年11月7日 报告的完全一致。这些内容由作者撰写,不是我们写的;我们以纯文本形式显示。

  • get_supported_chains

    List the chains SwapChan routes on, each with its chain-chan mascot. Swap-chan says: pick your departure gate! Result includes `display` markdown with chan images and a swapchan.com link: show it to the user. How to combine this with the other tools: swapchan_playbook (workflows:

  • get_utxo_deposit

    Send Litecoin, Dogecoin or Bitcoin Cash through THORChain from any wallet that can add an OP_RETURN memo. Returns THORChain's vault, the exact amount, the REQUIRED memo with its byte count, the minimum (minimumDisplay: the larger of the dust threshold and practicalMinimum, which

  • track_utxo_swap

    Read-only progress of a THORChain swap by its inbound txid: waiting, seen, swapping, paid_out, refunded or failed, with a THORChain link and the payout tx link when there is one. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebala

  • get_supported_tokens

    List tokens SwapChan knows (address, symbol, decimals), optionally for one chain or filtered by symbol/name. Swap-chan keeps the coin purse tidy. Result includes `display` markdown with chan images and a swapchan.com link: show it to the user. How to combine this with the other t

  • get_quote

    Get SwapChan's single best quote (most value landing in the wallet after gas and fees) for a same-chain or cross-chain swap. Read-only, no transaction. Swap-chan checks every counter so you don't have to. Result includes `display` markdown with chan images and a swapchan.com link

  • compare_routes

    Compare every route SwapChan found, ranked best-first by net USD received, across aggregators and bridges. Pass extra destination chains in alsoToChainIds to compare same-chain vs cross-chain outcomes side by side. Swap-chan lines up the whole cast. Result includes `display` mark

  • build_swap_tx

    Build the UNSIGNED transaction for the best (or chosen) route, plus any ERC-20 approval needed first and an eth_call simulation when an RPC is configured. Never signs, never holds keys or funds, never asks for keys: hand the result to the user's wallet (broadcast_tx can then rela

  • get_route_status

    Track a submitted swap or cross-chain transfer by source tx hash: pending, done, failed or not_found, plus the destination tx hash once it lands. Swap-chan waves from the arrival gate. Result includes `display` markdown with chan images and a swapchan.com link: show it to the use

  • build_limit_order

    Build a gasless CoW Protocol limit order (sell an ERC-20 for at least a target amount, valid until expiry). Returns EIP-712 typed data for the user's wallet to sign, the ERC-20 approve tx for CoW's vault relayer if the allowance is short, the current market amount for reference,

  • list_limit_orders

    List a wallet's CoW limit orders on one chain with status (open, fulfilled, cancelled, expired), amounts filled and an explorer link. Result includes `display` markdown with chan images: show it to the user. How to combine this with the other tools: swapchan_playbook (workflows:

  • cancel_limit_order

    Get the EIP-712 OrderCancellations typed data to cancel a CoW limit order off-chain (gasless). The owner signs it; POST {chainId, orderUids:[uid], signature} to /limit/cancel on the SwapChan API. Never signs. How to combine this with the other tools: swapchan_playbook (workflows:

  • scan_new_tokens

    Newest token pairs (GeckoTerminal new pools + DexScreener latest profiles), youngest first. Each token has price, liquidity, volume, price change, age, a quick risk badge (low/medium/high + flags) and a swapUrl that opens a prefilled best-price swap on swapchan.com. Extremely ris

  • scan_trending

    Trending tokens (GeckoTerminal trending pools + DexScreener top boosts), most boosted/traded first. Each token has price, liquidity, volume, price change, age, a quick risk badge (low/medium/high + flags) and a swapUrl that opens a prefilled best-price swap on swapchan.com. Extre

  • scan_movers

    Tokens with the biggest absolute price change over `window` among new and trending pairs. Each token has price, liquidity, volume, price change, age, a quick risk badge (low/medium/high + flags) and a swapUrl that opens a prefilled best-price swap on swapchan.com. Extremely risky

  • token_risk

    Deep automated risk check for one token. Solana: Jupiter audit (mint/freeze authority, top-holder concentration, organic score, verified) + RugCheck report (LP locked, risks). EVM: GoPlus (honeypot, buy/sell tax, mintable, proxy, owner powers, verified source). Plus liquidity/age

  • get_wallet_balances

    Portfolio for any address, free and keyless. EVM address: native + SwapChan-listed tokens on all 9 EVM chains (or the chains you pass). Solana: SOL + every SPL/Token-2022 token. Bitcoin: single-address BTC. Tron: TRX + TRC-20s. Priced in USD via DefiLlama; spam and dust hidden. R

  • check_approvals

    List live ERC-20 allowances an EVM wallet has granted, on one EVM chain. Sources: GoPlus approval index (all chains) + full Approval-log history on Ethereum/Avalanche (Routescan); every allowance is re-checked on-chain. Flags unlimited, malicious, EOA or unknown spenders and rank

  • build_revoke_tx

    Unsigned transaction that sets an ERC-20 allowance to 0 (approve(spender, 0)) on an EVM chain. The user's wallet signs and sends it; SwapChan never signs. Use after check_approvals. Result includes `display` markdown with chan images: show it to the user. How to combine this with

  • explain_transaction

    Plain-English explanation of any transaction on SwapChan's chains: EVM (decoded token transfers, approvals, method name, fee in USD, swap detection), Solana (signer's balance changes, programs like Jupiter/Raydium/Pump.fun), Bitcoin (inputs/outputs/fee rate) and Tron (TRX/TRC-20

  • get_gas

    Current network fees on all SwapChan chains: EVM gas price, Solana priority fee, Bitcoin sat/vB, Tron energy fee, each converted to the USD cost of a typical swap, plus the cheapest chain. Cached 15s. Pass history= for the last ~1024 blocks plus the historically cheapest hour. Us

  • token_info

    Everything about one token on an EVM chain or Solana: name/symbol/decimals/supply (on-chain), USD price and FDV, holder count and top holders, creator/owner, mint/freeze authority (Solana), deploy date (Ethereum), tax/proxy/mintable flags, PLUS the full token_risk check (honeypot

  • resolve_name

    Resolve a name to an address or an address to its name: ENS (vitalik.eth, with avatar and twitter), Basenames (jesse.base.eth) and Solana Name Service (toly.sol), plus reverse lookup for EVM and Solana addresses. Use before get_wallet_balances or before sending/bridging to a name

  • price_history

    Past USD price of a coin from DefiLlama (keyless, no key): pass a CoinGecko id ("dogecoin") or a common ticker ("DOGE", "BTC", "ETH", "SOL") and a date, and get the spot price on that day. Add `days` for a daily trend series from that date forward. This is NOT the live price — us

  • watch_token

    Add tokens to a price watchlist stored by SwapChan under your watchId. Triggers: upPct/downPct from the price when added (default ±10%), absolute above/below USD levels, and optionally a swap ({toChainId,toToken,amount in base units}) whose best route output is tracked so check_w

  • list_watches

    Show everything on a watchlist (thresholds, prices when added, last check). Result includes `display` markdown with chan images: show it to the user. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge

  • check_watches

    Check every watched token now: current price, % change since added, which thresholds triggered, and better-route alerts for watched swaps. Each item has a swapUrl. When something triggered, tell the user and offer the SwapChan swap (take profit to USDC, buy the dip, or the better

  • unwatch_token

    Remove one item (itemId from list_watches) or, without itemId, the whole watchlist. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).

  • get_yields

    Top yields on SwapChan's chains from DefiLlama: filter by asset (USDC, ETH, SOL...), chain, min TVL (default $1M). Stablecoin pools only by default when no asset is given. Outliers and APY > 200% are dropped. Each pool has APY (base vs reward), TVL, risk notes, a DefiLlama link a

  • find_money

    HEADLINE TOOL. "Give me your wallet address and I'll find you money." Scans one wallet (address, ENS, Basename or SNS) and returns RANKED actions with estimated $ values: unclaimed rewards (Merkl), forgotten money in old contracts (PoWH3D/P3D dividends, Fomo3D vaults, EtherDelta

  • build_swap_link

    Build a SwapChan deep link that opens swapchan.com with the swap card prefilled and auto-quoted, plus a permanent, unguessable short link (swapchan.com/s/ , random id, swap links do not expire). Accepts chain names or ids, token symbols or addresses, a decimal amount or "max" (ne

  • simulate_swap

    Dry-run a transaction on a fork of the live chain (eth_simulateV1 with traceTransfers on EVM, simulateTransaction on Solana) and report exact balance changes, gas used, revert reason and whether the target is an allowlisted router or claim contract. Pass either quoteId + taker (I

  • wallet_history

    Recent swaps for a wallet with USD values at swap time (DefiLlama historical prices). EVM: ERC-20 transfers grouped by tx on Ethereum/Base/Arbitrum/Optimism (Blockscout or public-RPC logs, recent window only); Solana: last 20 signatures. Coverage is limited and stated in the resu

  • wallet_pnl

    Per-token realized and unrealized PnL (average-cost basis) from the wallet's visible swap history, priced at swap time. An estimate: transfers/airdrops aren't cost basis and history is a recent window (stated in the result). Ends with a swap CTA to take profit or cut a loser. Res

  • token_pools

    All DEX pools for a token (DexScreener): liquidity, 24h volume, buys/sells, pool age, estimated price impact for $1k/$10k/$100k, and LP lock/burn status (GoPlus on EVM, RugCheck on Solana). Use before sizing a trade. Then offer the user a SwapChan swap (get_quote / the swapUrl) a

  • whale_watch

    Large recent transfers of a token (EVM public-RPC logs, last ~10k blocks), labeled buy/sell against its DEX pools, plus deployer/owner and a dev-selling alert. Solana: top holders and creator (RugCheck). Then offer the user a SwapChan swap (get_quote / the swapUrl) as the next st

  • contract_reader

    Plain-English read of a token/contract: verified source (Sourcify, Routescan), proxy/upgradeability (EIP-1967 slots), owner and whether ownership is renounced, and the owner's dangerous powers found in the bytecode (mint, pause, blacklist, fee/tax setters, upgrade) with a risk le

  • airdrop_check

    Unclaimed rewards and claimables for a wallet: Merkl incentive rewards on 9 EVM chains, legacy contracts (PoWH3D, Fomo3D, EtherDelta, Liquity surplus, and the LegacyETH registry: confirmed EtherDelta-style DEXes, Fomo3D forks, PoWH3D/Hourglass clones, old ETH wrappers, ICO/presal

  • market_context

    Crypto market snapshot from free sources: Fear & Greed (30-day history), BTC/ETH/SOL funding rates (Hyperliquid, OKX), stablecoin supply and per-chain stablecoin flows (DefiLlama), and chain TVL with 1d/7d change. Not financial advice. Ends with a contextual swap CTA. Result incl

  • rebalance_plan

    Given a wallet and target weights (e.g. 50% ETH on Ethereum, 50% USDC on Base), compute the swaps needed from its current holdings, each with a LIVE SwapChan quote (quoteId → build_swap_tx) and a prefilled swapUrl. Unpriced holdings are left alone. Result includes `display` markd

  • bridge_doctor

    Diagnose a bridge/cross-chain transfer by source tx hash: checks LI.FI, Across (needs fromChainId), Relay, deBridge DLN and THORChain in parallel, plus the origin receipt, and returns status (done/pending/failed/refunded/not_found), destination tx and what to do next. Then offer

  • best_time_to_swap

    Gas history for an EVM chain: base fee now vs the last ~1024 blocks (p10/median/p90 + series), a cheap/normal/expensive signal, and the historically cheapest hour (UTC) from SwapChan's own 10-minute gas samples (accumulating since deploy; historyDays says how much). Then offer th

  • verify_tx

    Run SwapChan's calldata guard + simulation on any unsigned tx and return a verdict (ok / caution / danger), findings, balance-diff simulation and a plain-language summary for human sign-off. Covers unlimited approvals, approvals to a spender other than expected.spender, including

  • broadcast_tx

    Relay a transaction the user's wallet already signed, unchanged, to 51 chains. SwapChan never signs, never holds keys and cannot alter signed bytes; it only relays. 51 chains. EVM (23): Ethereum, Base, Arbitrum One, OP Mainnet, Polygon PoS, BNB Smart Chain, Avalanche C-Chain, Lin

  • tx_status

    Confirmation status for a hash previously returned by broadcast_tx (or any hash): confirmed / pending / failed / not-found. EVM receipt, Solana signature status, Tron gettransactioninfobyid, Bitcoin mempool.space. Result includes `display` markdown with chan images: show it to th

  • signing_guide

    FULL in-context playbook. Signing starts with "do you have the key?" Step 1 key recovery (complete BIP39, missing word, passphrase, keystore v3, 2014-15 Ethereum presale, Electrum, wallet.dat, blockchain.info, hardware, raw key, password-hints) with blocktools commands the human

  • recovery_guide

    Step 1 of signing_guide, also callable alone. Returns the COMPLETE recovery playbook in-context (or one branch via situation=): BIP39 scan across MetaMask/Ledger Live/Ledger legacy/Trezor/Phantom/Solflare/Trust/Exodus/TronLink and BTC BIP44/49/84/86 paths, missing-word checksum b

  • read_chain

    Generic read-only chain reader for every SwapChan chain. EVM: op=balance | nonce | token_balance {token, owner} | call {address, function:"balanceOf(address) view returns (uint256)" or abi, args} with ABI-decoded result | storage {address, slot} | code | logs {address?, event:"Tr

  • find_money_batch

    Paste a list of PUBLIC addresses (any mix: EVM 0x…, ENS/Basenames, .sol, Solana, Tron, Bitcoin; commas/newlines/whatever) and SwapChan auto-detects each chain (EVM addresses are scanned on every EVM chain) and runs find_money on all of them in the background. Returns a jobId imme

  • find_money_status

    Poll a find_money_batch job: status (running/done), progress {done,total,percent}, running total, per-wallet results, ranked items, the verbatim 'summary' and the 'plan'. While running, wait pollAfterSeconds and call again; tell the user progress. When done, relay summary verbati

  • swapchan_playbook

    START HERE. Long-form guidance for agents: principles (trustless, human sign-off on every tx, verify before sign, confirm with read_chain, never touch seed phrases, always give short + full links), the full tool catalog with when-to-use, and end-to-end workflows: find-money (find

  • address_tool

    Work with public crypto addresses: op=detect (every chain/format an address fits; forks share version bytes, so expect several, e.g. a D... address returns doge, dgb and pivx; detect/validate support does not mean SwapChan can scan or sweep that chain), validate (address + chain)

  • xpub_addresses

    List public addresses from an extended PUBLIC key (xpub/ypub/zpub/tpub…): chain (e.g. btc, ltc), kind (p2pkh | p2wpkh | p2sh-p2wpkh | p2tr), branch 0=receive 1=change, start, count ≤ 20. Private keys (xprv etc.) and seed phrases are refused. Pure, offline computation (blocktools)

  • solana_address

    Solana address math: op=pda (program + seeds as hex strings → program-derived address and bump), ata (owner + mint [+ token_program] → associated token account), on_curve (address → is it an ed25519 point), anchor_disc (instruction name, e.g. initialize → 8-byte discriminator). P

  • substrate_tool

    Substrate helpers: op=ss58_decode (address → account public key hex + network prefix), ss58_encode (account hex + prefix → address), ss58_convert (address + prefix → same account under another network), storage_key (account address → System.Account storage key hex), decode_accoun

  • hash_tool

    Hashing and encoding of PUBLIC data: op=blake2b (hex data, out_len bytes 1-64, optional personal), twox128 (text, Substrate xxHash), base58_encode (hex data), base58_decode (base58 text; plain Base58, no checksum). Pure, offline computation (blocktools); nothing is fetched or sto

  • chain_params

    Chain parameter table (reference data only; a listed chain is not a signing or recovery claim): 80 chains; Base58 version bytes, bech32 HRP and WIF byte for the 34 Bitcoin-family ones, checksum/SLIP-44/tx format for all. chain= for one, omit for all. Pure, offline computation (bl

  • tron_tx

    Tron transaction inspection on UNSIGNED raw_data hex (tronweb raw_data_hex): op=decode (contracts, owner/to, amount_sun, TRC-20 call, ref block, expiry, fee limit, txid), txid (sha256 of raw_data). A tx that carries signatures is refused (signed_tx_refused); signed bytes stay in

  • multisig_address

    Bitcoin m-of-n P2WSH multisig (wsh(multi(..)), unsorted) from compressed PUBLIC keys: threshold + pubkeys (hex, order is consensus-significant) + network (bitcoin default, testnet, signet, regtest). Returns address, witness_script and descriptor. Pure, offline computation (blockt

  • taproot_multisig_address

    Bitcoin Taproot script-path m-of-n multisig: one CHECKSIGADD leaf under the BIP341 NUMS internal key (no key path), from x-only or compressed PUBLIC keys + threshold + network (bitcoin default, testnet, signet, regtest). Returns address, leaf_script, control_block, merkle_root, i

  • combine_psbts

    Merge cosigners' partially signed PSBTs (base64 or hex) for the same transaction and finalize once the threshold is met. Returns signed_tx (hex of the finalized tx, ready for the user's own broadcast) and psbt (base64 of the combined PSBT). Errors: no_psbts, not_a_psbt, psbts_do_

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 TSavo 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • ✓ 通过

    端点有响应

    在 174 毫秒内响应(HTTP 200)

  • – 不适用

    使用 OAuth 登录

    无需登录

  • ✓ 通过

    工具描述中没有隐藏指令

    已读取 60 个工具描述,未发现针对 AI 的隐藏指令

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32742 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32742 个服务器的 72% 更新
  • 基础检查结果等于或优于此分类中其他 32742 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

SwapChan 安全吗?

它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在作者的云端运行。通过互联网连接,无需安装,但你发送的内容会经过作者的服务器。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.3.0)于15天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,所以接受远程 MCP 服务器的应用也可以使用,例如开启开发者模式的 ChatGPT。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, Asset Notation

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211前天更新
安装

Asset Notation

作者:assetnotation

Read and maintain an Asset Notation file on disk: net worth, holdings, valuations, CSV import.

在你的电脑上运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

@swapchan/mcp — SwapChan MCP server

Swap-chan for AI agents: best-price same-chain and cross-chain EVM swap quotes, route comparison and unsigned swap transactions over the Model Context Protocol.

  • Official MCP TypeScript SDK v2 (@modelcontextprotocol/server 2.3.1, spec 2026-07-28; stateless, also serves 2025-era clients).
  • Transports: Streamable HTTP at /mcp (remote, API-key auth + per-key rate limits) and stdio (--stdio, local).
  • Talks to apps/api over HTTP using the frozen contract in packages/shared/README.md. No chain keys, no signing, no custody, ever. broadcast_tx only relays a transaction the user already signed locally, unchanged; it cannot alter it.

Tools

ToolWhat it does
get_supported_chainsChains + their chain-chan mascots
contract_abiContract ABI from Sourcify / Etherscan (or pasted), proxies followed (5 kinds)
contract_readeth_call a view function and decode it (failed read = error, never zero)
contract_encode_callUnsigned call data + decoded view for your own wallet to send
contract_approve_callPre-signing verdict (blocktools approve + verifyTx); do not send on fail
contract_build_creationUnsigned contract creation: initcode, keccak, predicted address
get_supported_tokensToken list, optional chainId / search
get_quoteSingle best route (net USD after gas + fees)
compare_routesAll routes ranked; alsoToChainIds compares same-chain vs cross-chain destinations
build_swap_txUnsigned tx for best/chosen route + exact-amount ERC-20 approve tx if needed + eth_call simulation (when RPC_URL_ is set)
get_route_statuspending / done / failed / not_found + destination tx hash

Amounts: pass amount as a decimal string ("1.5", converted with token decimals) or amountBaseUnits (wei). Slippage is in bps, default 50, hard-capped by MCP_MAX_SLIPPAGE_BPS (default 300). All failures come back as isError tool results with a readable reason.

permit2 is currently always null: the API contract v1 has no Permit2 typed data yet. When apps/api adds it, it will be passed through.

Run

pnpm --filter @swapchan/mcp build

SWAPCHAN_API_URL=http://localhost:8787 MCP_API_KEYS=key1,key2 pnpm --filter @swapchan/mcp start # http://127.0.0.1:8788/mcp SWAPCHAN_API_URL=http://localhost:8787 node apps/mcp/dist/index.js --stdio # stdio node apps/mcp/dist/mockApi.js # fake API on :8787 for local play

EnvDefault
SWAPCHAN_API_URLhttp://localhost:8787apps/api base URL (falls back to NEXT_PUBLIC_API_URL)
SWAPCHAN_API_KEY–sent upstream as x-api-key if set
MCP_HOST / MCP_PORT127.0.0.1 / 8788set MCP_HOST=0.0.0.0 behind a TLS proxy in prod
MCP_API_KEYS–comma-separated keys; clients send x-api-key: or Authorization: Bearer
MCP_ALLOW_ANONYMOUSoffallow keyless HTTP (rate-limited per IP)
MCP_RATE_LIMIT_PER_MIN60per key token bucket; 429 + Retry-After
MCP_MAX_SLIPPAGE_BPS / MCP_DEFAULT_SLIPPAGE_BPS300 / 50
RPC_URL_ –enables allowance check + simulation in build_swap_tx

Client config

Claude Code

claude mcp add --transport http swapchan https://mcp.swapchan.com/mcp --header "x-api-key: YOUR_KEY"

Claude Desktop (claude_desktop_config.json, local stdio)

{

"mcpServers": { "swapchan": { "command": "node", "args": ["/path/to/SwapChan/apps/mcp/dist/index.js", "--stdio"], "env": { "SWAPCHAN_API_URL": "https://api.swapchan.com" } } } }

Cursor (~/.cursor/mcp.json or .cursor/mcp.json)

{

"mcpServers": { "swapchan": { "url": "https://mcp.swapchan.com/mcp", "headers": { "x-api-key": "YOUR_KEY" } } } }

MCP Inspector

npx @modelcontextprotocol/inspector --cli http://127.0.0.1:8788/mcp --transport http --header "x-api-key: key1" --method tools/list

Registry

server.json (schema 2025-12-11, validated) publishes the remote as io.github.TSavo/swapchan via mcp-publisher publish. Hosted at https://mcp.swapchan.com/mcp.

Tests

pnpm --filter @swapchan/mcp test boots a mock of the API contract (src/mockApi.ts) and drives the real HTTP server with the SDK Client over Streamable HTTP: tool listing, every tool, auth 401s, 429 rate limiting, slippage cap, input validation and upstream errors.

问 PopNx