Ophis: an intent-based DEX aggregator for humans and AI agents Ophis is an intent-based DEX aggregator that lets users and AI agents execute trades using natural language, such as 'swap 100 USDC for ETH on Base'. Built on a fork of CoW Protocol, it offers gasless, MEV-protected, non-custodial swaps with a competitive solver auction. The platform includes a keyless MCP server and TypeScript SDK for agent integration, and is live on about a dozen EVM chains. Most on-chain swap flows still ask you to think like a router: pick a pool, choose a route, set a slippage number, and hope a bot does not sandwich you on the way in. Ophis https://ophis.fi/ replaces all of that with one line of intent, swap 100 USDC for ETH on Base . The twist for developers: that same line is callable by software, so an AI agent can trade the exact same way you do. I build products for a living, and I built Ophis to collapse that friction into a single intent, then make that intent something an autonomous agent can call safely. In one paragraph: Ophis is an intent-based DEX decentralized exchange aggregator with a natural-language layer. You describe a trade, it resolves the tokens, chain, and amount, then fills the order through a competitive solver auction that settles on-chain. Every trade is gasless, MEV-protected, and non-custodial, and any price improvement is returned to you in full. It ships with a keyless MCP Model Context Protocol server and a TypeScript SDK, it is open source, and it is live on about a dozen EVM chains with its own self-hosted stack on Optimism. Ophis is an intent-based DEX aggregator . A DEX is a decentralized exchange: you trade tokens on-chain without handing custody to a company. "Intent-based" means you state the outcome you want instead of hand-coding the path to get there. An intent is a signed statement "I want ETH for my 100 USDC on Base" , not a transaction that pins down every hop. Solvers then compete to fill that intent at the best price they can find. Under the hood, Ophis is a fork of CoW Protocol https://cow.fi its orderbook, autopilot, driver, and baseline solver with a natural-language intent layer added on top of a rebranded CoW Swap UI. That lineage is deliberate. CoW's batch-auction settlement https://docs.cow.fi is what makes the MEV protection structural rather than a best-effort filter, and forking it let me spend my time on the parts that are new: the language layer, the agent tooling, and a self-hosted deployment. | Trade type | Fee | |---|---| | Any swap on volume | 0.10% 10 bps | | Same-chain stablecoin pair | 0.01% 1 bp | | Surplus / price improvement | 0% returned to you | | Ophis | A typical aggregator | | |---|---|---| | MEV protection | Structural: uniform-price batch auction | Best-effort: private relay or slippage guard | | Price improvement | Surplus returned to you in full | Often kept by the solver or skimmed by a bot | | Gas | Gasless: you sign an off-chain order | You broadcast the transaction and pay gas | | Custody | Non-custodial, keyless | Varies | | AI-agent access | Hosted MCP server + TypeScript SDK | Usually none | The one bespoke API Ophis adds to the CoW stack turns natural language into a structured order. No key, no account, just POST your text: 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 } } } The endpoint only normalizes text. It never places, signs, or executes a trade. It is rate-limited to 30 requests per minute per IP, and it accepts non-browser callers no Origin header , which is the path agents use. Your app maps the chain slug to a chain ID and hands the user a deep link to review and sign. How do AI agents trade on Ophis? This is where Ophis diverges from a typical aggregator: it was built to be traded by software, not only clicked by people. There are three integration depths, all non-custodial and keyless. Point any Model Context Protocol https://modelcontextprotocol.io https://modelcontextprotocol.io client Claude, Cursor, Cline, or a custom agent at the hosted server: It speaks Streamable-HTTP MCP and exposes about a dozen tools. For a swap, an agent chains just four of them: parse intent → get quote → build order → submit order The rest resolve token, expected surplus, list chains, lookup tier, get balances, get portfolio, get gas, get token chart are read-only helpers. submit order is the only state-changing tool. The server holds no keys and never signs: build order returns a bounded, ready-to-sign EIP-712 order with the receiver pinned to the owner, and the agent signs locally with its own key before submitting. In Claude Code, it is two commands: /plugin marketplace add ophis-fi/skills /plugin install ophis@ophis-fi Then just ask: "swap 100 USDC for ETH on Base." For any other MCP client, add it as a remote HTTP server. Cursor, in ~/.cursor/mcp.json: { "mcpServers": { "ophis": { "url": "https://mcp.ophis.fi/mcp" } } } The same endpoint works in VS Code, GitHub Copilot, Codex, Cline, Roo Code, and Goose. For a stdio-only client like Claude Desktop, bridge with npx -y mcp-remote https://mcp.ophis.fi/mcp https://mcp.ophis.fi/mcp . For agents that construct and sign CoW orders themselves: npm install @ophis/sdk The SDK is dependency-free and encodes four fork details that fail silently if you guess them: the per-chain orderbook host, the EIP-712 signing domain, the CIP-75 partner-fee appData, and a guard that pins the order receiver. End to end, the shape looks like this: js import { getOphisOrderbookUrl, getOphisOrderDomain, buildOphisAppDataPartnerFee, assertReceiverIsOwner, } from '@ophis/sdk' const chainId = 8453 // Base const owner = account.address // 1. Quote the parsed intent getQuote + order typing come from cow-sdk const quote = await getQuote { chainId, sellToken, buyToken, sellAmount } // 2. Build the order, pinning the receiver to the signer const receiver = owner assertReceiverIsOwner owner, receiver // throws if they differ const order = { ...quote, receiver, appData: buildOphisAppDataPartnerFee chainId , // CIP-75 volume fee } // 3. Sign the EIP-712 order with the agent's own key const domain = getOphisOrderDomain chainId // correct verifyingContract const signature = await wallet.signTypedData { domain, ...orderTypedData order } // 4. Submit to the correct per-chain orderbook host await fetch ${getOphisOrderbookUrl chainId }/api/v1/orders , { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify { ...order, signature } , } The four Ophis helpers are the fork-specific glue; the quoting and typed-data calls are standard cow-sdk. A runnable version lives in the docs. One helper is worth calling out: assertReceiverIsOwner owner, receiver pins the receiver, because an unpinned receiver is the most common drain vector for an automated signer. Ophis publishes machine-readable manifests under https://mcp.ophis.fi/ https://mcp.ophis.fi/ mcp.json, ai-plugin.json, agent-skills/, and an RFC 9727 api-catalog plus a root-served llms.txt and openapi.json, so an agent can discover the tools on its own rather than being hard-wired. After you sign: the order lifecycle Signing is not broadcasting, so the "what happens next" is worth spelling out. Once you sign, the order goes to the orderbook and competes in the next batch auction. A market order typically fills within a block or two, when a solver includes it in a winning settlement, and you can watch it resolve on the order explorer at https://explorer.ophis.fi https://explorer.ophis.fi . Every order carries an expiry validTo ; if no solver can fill a limit order at your price before it expires, the order simply lapses with nothing given up. Orders can be cancelled before they settle. Because a pending order is a signed off-chain message rather than a transaction in the public mempool, there is nothing sitting in the open for bots to react to. The safety model for autonomous signing Letting software sign trades is exactly where things go wrong, so it is worth being precise about what protects you. Ophis makes the safe path the default: But be clear-eyed: these off-chain helpers are guards, not an authorization boundary. A prompt-injected agent can ignore them. For an agent that signs without a human in the loop, the guidance is to enforce policy where the agent cannot reach it: keep funds in a Safe https://safe.global https://safe.global smart account behind a deterministic policy gate allowlisted tokens, pinned receiver and appData, an oracle-bounded limit price, spend caps , add a guardian key, and re-check the same policy at orderbook ingestion. The full write-up lives at https://docs.ophis.fi/ai-agents https://docs.ophis.fi/ai-agents . For the developers who want to read the source, the monorepo https://github.com/ophis-fi/ophis https://github.com/ophis-fi/ophis , GPL-3.0 is mostly Rust and TypeScript with Solidity contracts: On Optimism chain 10 , Ophis runs the whole stack under its own settlement contracts and keeps the full fee. On the other supported chains, it routes orders through CoW Protocol's hosted solver network. Upstream subtrees are vendored as-is and every divergence is catalogued, so pulling upstream stays tractable, which matters a lot when your backend is a fork you intend to keep in sync. Trading is live on about a dozen EVM chains, including Ethereum, Optimism, Base, Arbitrum, Polygon, and BNB Chain, with Solana and Bitcoin available as cross-chain destinations via NEAR Intents. Because the live set moves, the MCP list chains tool and the SDK's chain registry reports the authoritative list at runtime instead of hard-coding it. Optimism is the flagship self-hosted deployment; a couple of newer chains have their contracts deployed with the stack paused. Try it Whether you are a trader who wants a gasless swap or a developer wiring a trading tool into an agent, the same non-custodial path works. Tell it what you want in natural language, sign in your own wallet, keep your surplus. What is an intent-based DEX aggregator? It is a decentralized exchange where you submit the outcome you want a signed intent, like "buy ETH with 100 USDC on Base" instead of a fully specified transaction. Independent solvers then compete to fill that intent at the best available price across many liquidity sources, and the winning solution settles on-chain. Is Ophis a fork of CoW Protocol? Yes. Ophis forks CoW Protocol's orderbook, autopilot, driver, and baseline solver, and rebrands the CoW Swap UI. What Ophis adds is a natural-language intent layer, an agent-facing MCP server and SDK, and a self-hosted settlement stack on Optimism. Is Ophis custodial? No. Every order is signed in your own wallet, and Ophis never holds your keys or funds. It cannot move, freeze, or recover them. The signature is the only trust boundary. What does Ophis cost? A flat 0.10% 10 bps on volume, dropping to 0.01% 1 bp on same-chain stablecoin pairs. Price-improvement surplus is returned to you in full, and Ophis takes zero share of it. Can an AI agent really place trades safely? It can, if you keep policy outside the agent's reach. Ophis pins the order receiver to the owner and resolves token symbols to canonical addresses that fail closed. For headless signing, put funds in a Safe smart account behind a deterministic policy gate with spend caps and a guardian key, and re-check that policy at ingestion.