Labsco
MCP SERVER

Fibrous MCP Server

by ahmetenesdur

Find and build multi-chain DeFi swap routes on Base, Starknet and Scroll through the Fibrous SDK.

Wallets, Signing & Transaction Execution
Summary
The routing half needs nothing; the execution half holds your keys.

Only `execute-swap` and `estimate-swap` are marked as requiring wallet configuration — the rest read. That matters, because configuring them means putting a private key in an environment variable and giving the agent the ability to move funds on Base, Starknet or Scroll. Batch routing and batch transactions are Starknet-only.

What it is

A TypeScript server over Fibrous, a DEX aggregator. It covers the read side — supported tokens, protocols and best routes — and the write side, building or executing transaction data once wallet credentials are configured.

What you get
  • The tokens and DEX protocols each network supports — `get-supported-tokens`, `get-supported-protocols`
  • The best route for a swap, with a Starknet-only batch variant — `get-best-route`, `get-best-route-batch`
  • Transaction data ready to sign, single or batched — `build-transaction`, `build-batch-transaction`
  • Token details by address, and conversion between human and wei amounts — `get-token`, `format-token-amount`
  • Swap execution and gas estimation, the two tools that require wallet configuration — `execute-swap`, `estimate-swap`
Requirements

Node.js 18+ and pnpm. Routing and quoting need no key. Anything touching a wallet needs an RPC URL and a private key per network: `BASE_RPC_URL` and `BASE_PRIVATE_KEY`, `STARKNET_RPC_URL`, `STARKNET_PRIVATE_KEY` and `STARKNET_PUBLIC_KEY`, `SCROLL_RPC_URL` and `SCROLL_PRIVATE_KEY`. `DEFAULT_SLIPPAGE` sets slippage tolerance and `FIBROUS_API_KEY` is optional. Build with `pnpm build` and point the client at `build/src/index.js`. Networks covered are Base, Starknet and Scroll; the Fibrous API allows 200 req/min.