Toreva MCP Server

Non-custodial DeFi execution primitives for Solana. Best-execution routing for perpetual futures across Jupiter Perps, Pacifica, Drift, and Flash Trade. 1 bps fee to open. Everything else is free. 20 MCP tools for perps, yield, scanning, simulation, and execution.

Documentation

Toreva

toreva kit

Non-custodial execution primitives for Solana.
Best-execution routing across Jupiter Perps, Pacifica, Drift, and Flash Trade.
1 bps to open. Everything else is free.

Your agent decides. Toreva executes. Every action receipted.

Establish your wallet

Use toreva_establish to attach a policy-controlled delegated authority to your Solana wallet. Your wallet stays the root owner — Toreva creates a bounded session key that enforces spend caps, allowed-token constraints, and revocation policy. Non-custodial: Toreva never holds private key material. Every establishment is receipted.

# Minimum — attach delegated authority to your wallet
toreva_establish({ walletAddress: "your-wallet-address" })

Once established, your agent can execute across all supported primitives — earn, perps, and more — without re-authenticating for each operation.

Earn

Deploy idle USDC to yield across supported venues with toreva_earn. Scan, compare, and execute from a single tool.

npx toreva earn-compare --asset USDC --venue kamino
npx toreva earn-compare --asset USDC --venue marginfi
VenueAsset
Kamino FinanceUSDC
MarginfiUSDC

Every earn execution returns a read-evidence receipt, a venue-intelligence receipt, and a sentinel review receipt.

Install

The fastest path — wires Toreva into your MCP-aware client (Claude Desktop, OpenClaw, Cursor) and authenticates you in two commands:

npx toreva init --client=claude-desktop   # or openclaw | cursor
npx toreva login

toreva init writes the Toreva MCP server stanza into your client's config file. toreva login runs the gateway's device-code flow and stores the resulting token at ~/.config/toreva/config.json (chmod 600).

Restart your MCP client and verify:

npx toreva doctor

You should see three [ OK ] lines: config_present, auth_token, mcp_call.

Per-client snippets live in examples/ — one folder per supported client (claude-desktop, openclaw, cursor).

Direct package installs (advanced)

npm install @toreva/sdk        # TypeScript client library
npm install -g @toreva/cli     # global `toreva` binary

MCP server (stdio, run-it-yourself)

TOREVA_AUTH_TOKEN=your_token npx @toreva/mcp

MCP server (remote, no install)

https://mcp.toreva.com

Authentication

toreva login is the standard path. For CI / power users, set TOREVA_AUTH_TOKEN directly to skip the device-code flow:

export TOREVA_AUTH_TOKEN=your_token
npx toreva login   # writes the token to ~/.config/toreva/config.json

Use toreva login for the standard device-code flow, or request an integration token from your Toreva contact. The Kit repository is the public source of truth for agent, SDK, CLI, Skills, and MCP integration details.

Environment variables

VarDefaultPurpose
TOREVA_MCP_URLhttps://mcp.toreva.comGateway URL
TOREVA_AUTH_TOKENSkip device-code flow, persist this token
TOREVA_CONFIG_DIR~/.config/torevaOverride on-disk config dir

Perps tools

Run toreva_establish first to attach a delegated authority before execution. For best fill, omit venue — Toreva compares enabled venues and routes by estimated all-in cost. Set venue only when you intentionally want a specific venue. Perps tools use fields: walletAddress, token, sizeUsd, leverage, collateralToken, and collateralAmount.

The public integration packet lives in this repo:

ToolFeeWhat it does
toreva_perps_long1 bpsOpen long — routes to better fill
toreva_perps_short1 bpsOpen short — routes to better fill
toreva_perps_closeFreeClose position at venue
toreva_perps_add_marginFreeAdd margin
toreva_perps_remove_marginFreeRemove margin
toreva_perps_cancel_orderFreeCancel order
toreva_perps_funding_settleFreeSettle funding
toreva_perps_simulateFreePreview before execution
toreva_perps_explainFreeExplain trade or position
toreva_perps_query_*FreePosition, funding, venues, markets

Venues

VenueFeeModel
Jupiter Perps6.0 bps flatOracle-based
Pacifica4.0 bps (Tier 1)Order book variant
Drift Protocol3.5 bps takerOrder book
Flash Trade4.0 bps (Tier 1)Order book variant

Trades routed to Drift via toreva receive a 5% fee discount.

Strategy tools

ToolWhat it does
toreva_strategiesBrowse strategy catalog with pricing
toreva_establishAttach a delegated agent authority and child capabilities to a wallet
toreva_earnDeploy USDC to yield across venues
toreva_scanSurvey portfolio state
toreva_simulateDry-run without execution
toreva_executeExecute a strategy
toreva_explainNarrate what happened
toreva_configureAdjust settings

Packages

PackageWhat
@toreva/sdkTypeScript client library
@toreva/cliCommand-line interface
@toreva/mcpMCP server for agent integration
@toreva/typesShared schemas and types

Regulatory notice

This software provides tooling for interacting with the toreva execution service. It does not provide financial advice, investment advice, trading advice, or any other form of advice. Use of this software does not create a fiduciary relationship, advisory relationship, or any other professional relationship between you and Toreva Pty Ltd.

Toreva Pty Ltd is not responsible for any modifications made to this software by third parties, including modifications that alter or remove compliance language, disclaimers, or risk warnings. If you use a modified version of this software, you do so at your own risk and are responsible for ensuring your use complies with applicable law.

License

MIT — see LICENSE