@ophis/mcp-server
Agent-facing MCP server for the Ophis DEX, deployed as a Cloudflare Worker
with the Streamable-HTTP transport at https://mcp.ophis.fi/mcp.
Current server release: v0.2.0, with 13 tools across 15 configured EVM
chains (14 mainnets plus Sepolia).
It exposes the Ophis trading surface to autonomous agents and MCP clients
without making them re-derive the fork's non-obvious, easy-to-get-wrong details
(non-canonical settlement contracts on the Ophis-operated chains, the self
-hosted Optimism, Unichain, Robinhood Chain, and Arc orderbook hosts, the CIP-75 partner-fee appData shape, and
receiver pinning).
Arc (5042) charges the 1 bp base fee and supports routed-volume indexing and
referral attribution. Server referral defaults apply; a per-call code overrides
the default, and an empty string opts out. After an order is accepted,
submit_order enrolls the owner for indexing and the live trade-rewards campaign.
The tools operate on configured EVM orderbooks. list_chains reports configuration,
not a live availability probe. The standalone app's externally funded NEAR
source flow is separate; these tools do not create or fund those deposits.
See network and funding coverage.
Security model
The server holds no private keys and never signs. build_order returns a
bounded, ready-to-sign EIP-712 payload with the order receiver pinned to the
owner (the #1 autonomous-agent drain vector); the agent signs with its own key
and submits. This is the V1 "bounded capability" pattern, an off-chain misuse
guard, not an on-chain authorization boundary. It is public and unauthenticated:
every backing endpoint is already public, and the tools are read/build-only.
Tools
Typical agent flow
Develop
dev / deploy / dry-run auto-build the workspace SDK first (pre* scripts),
so a clean checkout works without a manual @ophis/sdk build.
Deploy
Auto-deploys on push to main via .github/workflows/mcp-deploy.yml, using the
least-privilege CLOUDFLARE_WORKERS_TOKEN secret (Workers Scripts + Routes
only). Manual:
Custom domain mcp.ophis.fi is provisioned from wrangler.jsonc (routes).
After the main deployment succeeds, an organization admin creates the matching
mcp-v<x.y.z> tag. .github/workflows/mcp-registry-release.yml verifies that
the live /health version matches, then publishes server.json to the official
MCP Registry. See the release runbook.