Skip to main content
The Flash MCP server (@definitive-fi/flash-mcp) lets an AI agent quote, execute, and manage Flash trades directly from any MCP client — Claude Code, Claude Desktop, Cursor, Codex, and others. It’s the fastest way to give an agent a working Flash integration: no code to write, no signing flow to implement. The server handles the entire order lifecycle for you — quote → wrap/approve → sign → submit → poll for fill — across both EVM wallets and Solana, routing over 200+ liquidity sources on 14 chains.

npm

@definitive-fi/flash-mcp

GitHub

Open source — MIT. Doubles as a reference implementation of the quote → sign → submit flow.

Tools

Install

The server is published to npm — no clone or build needed. Pick your client:
Or install the plugin, which bundles the server plus a trading-workflow skill:

First-run setup

Run the interactive wizard in your own terminal — it walks through everything in one pass:
1

Generate a Flash API key

The wizard opens the Definitive MCP setup page (app.definitive.fi/account/organization/mcp-setup). Log in, click Generate API Key, Copy & Close, and paste the key when prompted.
2

Add your funder wallet(s)

Paste your EVM funder wallet private key, your Solana funder wallet secret, or both. Press Enter to skip either — you can add one later. Secrets are typed into hidden prompts and written straight to the OS keychain; they never appear on screen, in shell history, or in any chat transcript.
3

(Optional) Set custom RPCs

Provide a personal RPC endpoint per chain. The public defaults work but are rate-limited — a personal endpoint is recommended if you trade often.
Then, in your MCP client: flash_status to confirm, flash_quote to price, flash_submit_order to trade.
Never paste a wallet private key into the chat — it would pass through the model and the conversation transcript. The flash_setup tool does not accept private keys; add wallets only via the setup wizard or the CLI. Your API key is safe to paste in chat if you prefer (flash_setup { "apiKey": "dpka_…" }) — it enables quoting and cannot move funds. Fund movement always requires your wallet’s per-order signature, which the API key can’t produce.

Individual CLI commands

Each wizard step is also available as a one-shot command (prompts are hidden, secrets go to the keychain):
If it isn’t on your PATH, run it via npx: npx -y @definitive-fi/flash-mcp set-key evm.

Credential storage

Secrets are stored in the macOS Keychain (service definitive-flash-mcp), encrypted at rest by the OS — never written to a dotfile in plaintext. On non-macOS hosts, or to inject credentials without running flash_setup, set environment variables (these take precedence over the keychain): RPC precedence, highest first: per-call rpcUrl argument → DEFINITIVE_RPC_<CHAIN> env var → flash_setup config (~/.config/definitive-flash-mcp/config.json) → public default.

Good to know

  • flash_submit_order spends real funds. It quotes fresh, signs with your stored key, and submits. For market orders it polls until the order reaches a terminal status.
  • EVM trades may send a one-time ERC-20 approve (and a wrap tx for native-asset trades) before signing — your wallet needs a little gas for those.
  • qty is the amount being spent: contraAsset units for buys, targetAsset units for sells. See Placing Orders for the target/contra model.
  • Supported chains: ethereum, optimism, bsc, polygon, base, arbitrum, avalanche, hyperevm, robinhood, plasma, monad, ink, arc, solana.
Prefer to build the flow yourself instead of running the server? The MCP is a reference implementation of the same three steps documented in AI Integration: quote → sign → submit.