flash-trade-MCP/
├── cli/ # Rust CLI — direct SDK interaction, local signing
├── mcp/ # TypeScript MCP Server — AI agent interface via REST API
Native Rust CLI using flash-sdk directly for instruction building. Wallet management, position trading, LP operations, and FAF staking.
cd cli
cargo build
cargo run -- --help
cargo test # 41 testsSee cli/CLAUDE.md for architecture and conventions.
Model Context Protocol server that wraps the Flash Trade REST API. Designed for AI agents (Claude, GPT, etc.) to read market data and build unsigned transactions.
Quick start — just add to your editor config:
{
"mcpServers": {
"flash-trade": {
"command": "npx",
"args": ["-y", "flash-trade-mcp"],
"env": {
"FLASH_API_URL": "https://flashapi.trade"
}
}
}
}Works with Claude Code, Claude Desktop, Cursor, and Windsurf. No cloning or building needed.
See mcp/README.md for full tool catalog and mcp/CLAUDE.md for AI agent integration guide.
- Non-custodial: Transaction tools return unsigned base64 transactions. The user's wallet signs and submits separately.
- Perpetuals on Solana: Leveraged long/short positions on SOL, BTC, ETH, and more via Flash Trade's on-chain program.
- Pyth Oracle Prices: All prices from Pyth Lazer (200ms updates). Mainnet only — devnet returns stale/zero.
- SOL positions use JitoSOL as underlying collateral on-chain.
Both projects need a Solana RPC endpoint. Set via environment variable:
export SOLANA_RPC_URL=https://api.mainnet-beta.solana.comFor better performance, use a dedicated RPC (Helius, Triton, etc.).
All changes go through pull requests — direct pushes to main are blocked.
- Create a feature branch
- Make changes, push, open a PR
- CI runs automatically (typecheck, unit tests, build)
- PR can only merge once CI passes
Publishing is not automatic on merge. It only happens when you push a version tag:
# 1. Bump version in mcp/package.json (in a PR, merge it)
# 2. Tag the merge commit on main:
git tag v0.1.0
git push origin v0.1.0
# 3. The publish workflow triggers automatically → builds → publishes to NPMNo tag = no publish. Merging PRs only runs CI checks.