Ophis
About
MCP server for the Ophis intent-based DEX aggregator: quotes and gasless, MEV-protected swap orders across 11 chains.
Details
- Author
- ophis-fi
- Categories
- Finance, Other
Jump to
Setup
Install Ophis in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/ophis-fi/ophis
Follow the installation instructions in the repository README, then restart your MCP client.
Describe a trade in plain English. Ophis does the rest.
An intent-based DEX aggregator with a natural-language layer, built for humans and agents alike.
Swap App·Docs·Explorer·Agents·SDK·Security
Sayswap 100 USDC for ETH on Baseand Ophis resolves the tokens, chain, and amount, then fills the order through a competitive solver auction that settles on-chain. It is a fork ofCoW Protocol(orderbook, autopilot, driver, and baseline solver) with a natural-language intent layer over a rebranded CoW Swap UI. On Optimism, Ophis runs the whole stack under its own settlement contracts and keeps the full fee; on the other supported chains (Ethereum, Base, Arbitrum, and more) it routes through CoW Protocol's hosted network.
- Gasless, MEV-protected.Orders settle in a batch auction where every trade clears at one uniform price, so sandwiches and front-running are structurally absent, not best-effort.
- Solver-aligned pricing.On every supported chain the base fee is 1 bp and Ophis earns primarily when execution beats its reference quote: 80% of improvement on volatile pairs (99 bps cap), or 50% on stable pairs (20 bps cap). Hosted chains encode that policy in CIP-75 appData and separately pay CoW Protocol's upstream fees.
- Non-custodial, no account, no auth.Every order is signed in your own wallet (EIP-712 or ERC-1271). Ophis never holds keys or funds and cannot move, freeze, or recover them. The signature is the only trust boundary.
- Transparent, capped fees.A 0.01% (1 bp) base plus the capped improvement policy above, with a share returned monthly as WETH rebates plus an 8% referral on trades you bring.
Live across 13 EVM chains, with Ophis-operated settlement on Optimism (chain 10), Unichain (130), and Robinhood Chain (4663), plus CoW-hosted settlement on the other supported chains.
Ophis's one bespoke API turns natural language into a structured order. No key, no account, just POST your request:
curl -sS https://ophis.fi/api/intent \ -H 'content-type: application/json' \ -d '{"text":"swap 100 USDC for ETH on Base"}'
{ "ok": true, "data": { "intent": "swap", "entities": [ { "type": "amount", "value": "100", "raw": "100", "start": 5, "end": 8 }, { "type": "sellToken", "value": "USDC", "raw": "USDC", "start": 9, "end": 13 }, { "type": "buyToken", "value": "ETH", "raw": "ETH", "start": 18, "end": 21 }, { "type": "chain", "value": "base", "raw": "Base", "start": 25, "end": 29 } ] } }
Map the chain slug to a chain ID and hand the user a swap deep link to review and sign. The endpoint only normalizes text, it never places, signs, or executes a trade. It is rate-limited to 30 requests per minute per IP; non-browser callers (noOriginheader) are allowed, which is the path agents use. Full reference:docs.ophis.fi/intent-api.
Ophis is built to be traded by autonomous agents, not just people. Pick your integration depth, all of it non-custodial and keyless:
Point any MCP client (Claude, Cursor, a custom agent) at the hosted Model Context Protocol server:
It speaks Streamable-HTTP MCP and exposes 14 tools: intent parsing, canonical token resolution, chain discovery, quoting, bounded order build/validation and submission, rebate and integrator lookups, balances, portfolios, gas, charts, and expected-surplus comparison. The server holds no keys and never signs.build_orderreturns a bounded, ready-to-sign EIP-712 order with the receiver pinned to the owner; the agent signs locally with its own key and submits. See thecomplete tool reference. (A bare request without anAccept: text/event-streamheader returns HTTP 406, that is the transport negotiating, not an outage.)
For agents that build and sign CoW orders directly:
The SDK encodes four fork details that failsilentlyif you guess them:
- getOphisOrderbookUrl(chainId)picks the right host. Optimism self-hosts its orderbook (notapi.cow.fi); the wrong host bypasses the Ophis solver and zeroes the fee.
- getOphisOrderDomain(chainId)gives the EIP-712 domain with the correctverifyingContract. The OP settlement is non-canonical, so the cow-sdk default is rejected on-chain.
- buildOphisAppDataPartnerFee(chainId)builds the exact CIP-75 volume-fee fragment{ volumeBps, recipient }, not the price-improvement shape.
- assertReceiverIsOwner(owner, receiver)pins the order receiver. An unpinned receiver is the number one drain vector for an automated signer.
Ophis publishes machine-readable manifests for agent discovery underhttps://ophis.fi/.well-known/:mcp.json,ai-plugin.json,agent-skills/, andapi-catalog(RFC 9727), plus the root-servedauth.md,llms.txt, andopenapi.json.
These off-chain helpers make the safe path the easy path, but they are guards, not an authorization boundary: a prompt-injected agent can ignore them. For an agent that signswithout a human in the loop, enforce policy where the agent cannot reach it: funds in a Safe smart account, a deterministic policy gate (allowlisted tokens, pinned receiver and appData, an oracle-bounded limit price, spend caps), a guardian key, and the same policy checked again at orderbook ingestion. Full guide:docs.ophis.fi/ai-agents.
Ophis settles across two kinds of chains.
Ophis-operated(self-hosted orderbook, solver, and settlement; Ophis keeps the full fee):
CoW-hosted(orders route through CoW Protocol's settlement and solver network, with the partner fee disbursed by CoW): Ethereum, Base, Arbitrum, Polygon, BNB, Gnosis, Avalanche, Linea, and the other CoW-supported chains, all live.
OnBNB Smart Chain (BSC, chain ID 56)Ophis is live: orders placed through Ophis (SupportedChainId.BNBincowSdk.ts, mapped from thebnbslug inchainMap.ts) settle on-chain through CoW Protocol's GPv2Settlement at0x9008D19f58AAbD9eD0D60971565AA8510560ab41on BSC, giving gasless, MEV-protected swaps with no Ophis-side custody. Ophis does not deploy its own settlement on BSC; BNB trades use CoW Protocol's canonical BSC deployment.
The two have different settlement contracts and orderbook hosts, so resolve them per chain via@ophis/sdkor the MCPlist_chainstool rather than assuming. Full live status:docs.ophis.fi/status. Cross-chain destinations (Solana, Bitcoin) are surfaced via NEAR Intents. Canonical contract addresses and the disclosure policy live in[SECURITY.md.
Upstream subtrees are vendored as-is; Ophis changes are catalogued inapps/frontend/.ophis-divergences.mdandapps/backend/.ophis-divergences.mdsogit subtree pullstays tractable.
ophis/ ├── apps/ │ ├── frontend/ cowswap fork: swap UI + explorer + landing site │ ├── backend/ cowprotocol/services fork (Rust) │ ├── rebate-indexer/ tier + WETH rebate API, Safe batch proposer │ ├── docs-ophis/ Docusaurus docs portal │ └── mcp-server/ agent-facing MCP Worker (mcp.ophis.fi) ├── contracts/ GPv2 settlement contracts (+ per-network deployments) ├── packages/sdk/ @ophis/sdk ├── functions/ Cloudflare Pages Functions (intent API, bungee, middleware) ├── infra/ per-chain runtime stacks + rpc + cloudflare config ├── scripts/ repo utility scripts └── docs/ specs, plans, audits, operations runbooks
Root workspace (pnpm 9, Node 20.19+ or 22.12+, turborepo):
…
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



