Soheil Router

fi.soheilPublished by soheil.fiOfficial publisherv1.0.1Updated Nov 7, 2026

Best-price token swaps on EVM networks through a non-custodial contract: quotes and trade status.

VerifiedStreamable HTTPWeb executableFinanceDeveloper Tools

Overview

AI-generated overview

Soheil Router MCP server gives an assistant best-price token swap and bridge quotes on EVM networks, plus the transaction to sign and trade status.

What you can do
  • List live EVM networks, router contract, fees and callable contracts
  • Read API info: version, router fee, integrator fee cap, docs and OpenAPI location
  • Get a swap or cross-chain bridge quote with minimum received, fees, approval address and the transaction to sign
  • Check a sent trade's status: pending, done, refunded, failed, not found or not ours
When to use it
Use it when an assistant needs to price a token swap or bridge on supported EVM networks, prepare a transaction for the user to sign in their own wallet, or follow up on a trade already sent.
Requirements
Remote Streamable HTTP endpoint; no local install. An API key sent as an Authorization Bearer header is needed for quotes and trade status (free from the provider's developer dashboard); listing networks and API info work without one. Network access to the provider's API.
Before you install
The Authorization header carries an API key; keep it on a server and out of shared logs. Quotes lead to real on-chain transactions the user signs, with a 0.1% router fee and any integrator fee added. Approve exactly the quoted fromAmount to the approval address, never unlimited. Amounts are integer strings in the token's smallest unit. Bridge transfers that are not filled are refunded on the source network.

Installation

In SourceWeft

  1. Open Soheil Router in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/fi.soheil%2Frouter/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "soheil-router": {
      "type": "http",
      "url": "https://api.soheil.fi/v1/mcp"
    }
  }
}

README

Soheil Router

[mcptry]

One API call for the best token swap price, and one transaction that makes it. Soheil Router compares prices across DEXes and aggregators on each network and executes the trade through its own contract: non-upgradeable, source verified on the explorers, and it holds no funds between trades.

Fees

0.1% (10 bps) to the router on each swap. You can add your own fee (up to 0.9%), paid to your wallet inside the same transaction: nothing to claim.

Install

bash
npm install github:soheil-fi/soheil-router

Quick start

ts
import { COIN, SoheilRouter } from "@soheil-fi/router";
const router = new SoheilRouter({ apiKey: process.env.SOHEIL_ROUTER_KEY }); // keep the key on your server
const quote = await router.getQuote({  fromChainId: 8453,                                       // Base  fromToken: COIN,                                         // ETH  toToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",   // USDC  fromAmount: 10n ** 15n,                                  // 0.001 ETH, in wei  fromAddress: "0xUserWallet",  integratorBps: 30,                                       // your fee: 0.3%});
// quote.approvalAddress → approve exactly quote.fromAmount first (null when selling the coin)// quote.transactionRequest → have the user's wallet send it unchangedconst status = await router.waitForTrade(8453, txHash);     // DONE, REFUNDED, FAILED or NOT_OURS

A whole swap with viem is in examples/swap-viem.ts.

MethodKeyReturns
getNetworks()noLive networks, our contract and the contracts a trade may call
getInfo()noFee, limits, docs
getQuote(request)yesPrice, minimum received, fees, approval address, transaction
getStatus(chainId, txHash)yesPENDING, DONE, REFUNDED, FAILED, NOT_OURS or NOT_FOUND
waitForTrade(chainId, txHash)yesgetStatus until the trade is final

Errors are thrown as SoheilRouterError with code (NO_ROUTE, RATE_LIMITED, UNAUTHORIZED…), the HTTP status and a message safe to show your users.

Bridge to another network

Set toChainId to another of the router's networks. The answer has type: "bridge", and the user still signs one transaction on the source network; the recipient is paid on the destination within seconds.

ts
const quote = await router.getQuote({  fromChainId: 8453,                                       // from Base  toChainId: 42161,                                        // to Arbitrum  fromToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base  toToken: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",   // USDC on Arbitrum  fromAmount: 100_000_000n,                                // 100 USDC  fromAddress: "0xUserWallet",});// quote.toAmount is what arrives; a transfer nobody fills is refunded to fromAddress on Base (status REFUND_PENDING until then)const status = await router.waitForTrade(8453, txHash);     // DONE (status.receiving = the payout) or REFUNDED

fromToken and toToken can be any token: what the bridge does not carry is swapped first on the source network, or bought on arrival on the destination (then toAmountMin is that swap's least; if the price moves past it, the recipient gets the bridged token, like USDC, instead). Still one transaction, fees taken once. Docs: https://soheil.fi/developers/docs/bridging/

Use it from an AI assistant (MCP)

The API is also an MCP server (Streamable HTTP) with the tools get_networks, get_api_info, get_quote and get_trade_status.

bash
claude mcp add --transport http soheil-router https://api.soheil.fi/v1/mcp \  --header "Authorization: Bearer $SOHEIL_ROUTER_KEY"
json
{ "mcpServers": { "soheil-router": { "url": "https://api.soheil.fi/v1/mcp", "headers": { "Authorization": "Bearer sk_your_key" } } } }

Good to know

  • Amounts are integer strings in the token's smallest unit; use bigint, never JavaScript numbers.
  • Approve exactly fromAmount, never an unlimited amount.
  • The user always signs in their own wallet: the API never holds keys or funds.

Built by Soheil.fi. Questions: [email protected]

License

MIT

Source: README.md at commit 0874a32

Tools

4

get_networks

Networks

The EVM networks where Soheil Router is live: chain id, name, our contract, its fee and fee wallet, and the contracts a trade may call. No API key needed.

Takes no parameters.

get_api_info

API info

What the Soheil Router API is: version, router fee, the most an integrator may add, how keys are given, and where the docs and OpenAPI spec are. No API key needed.

Takes no parameters.

get_quote

Get a quote

The best price for a token swap on one network, or a transfer to another network (bridge), and the transaction that makes it, through our contract. Returns toAmount, toAmountMin (enforced on-chain), the fees, approvalAddress (approve it for exactly fromAmount first unless fromToken is the coin) and transactionRequest for the user to sign. Needs an API key.

ParameterstoTokenrequiredfromTokenrequiredtoAddresstoChainIdfromAmountrequiredfromAddressrequiredfromChainIdrequiredslippageBpsintegratorBps

get_trade_status

Trade status

Where a sent trade stands, from its transaction on chain: PENDING, DONE (with what was paid and received; for a bridge, once paid on the destination), REFUNDED (a bridge transfer paid back on the source network), FAILED, NOT_FOUND or NOT_OURS. Needs an API key.

ParameterstxHashrequiredchainIdrequired

Version history

1
  1. v1.0.1LatestNov 7, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts