Quick Start
MEVScan exposes Ethereum MEV analysis as MCP tools and a real-time SSE push stream. Your API Key authenticates both.
1. Get your API Key
Sign in with Google on the login page. Your API Key is shown on the Dashboard.
2. Connect an AI tool
Paste the config below into your preferred AI coding tool. See Install in AI Tools for all supported clients.
3. Ask a question
4. Subscribe to the push stream (optional)
Receive new MEV events in real-time via SSE. See SSE Push Stream for details.
Supported Chains
MEVScan currently provides data for Ethereum mainnet only.
Current Coverage
| Chain | Network | Status |
|---|---|---|
| Ethereum | Mainnet (chain ID 1) | ✓ Supported |
chain_id Parameter
Some API interfaces expose a chain_id parameter. This parameter is currently not supported — all queries return Ethereum mainnet data regardless of the value supplied. Passing any chain_id other than 1 will not filter or change the result set.
Authentication
All API requests (MCP and HTTP) use Bearer Token authentication.
Bearer Token
Include your API Key in every request header:
Your API Key is available on the Dashboard. Keep it secret — it grants full access to your account.
Error responses
| Status | Meaning |
|---|---|
401 | Missing or invalid Authorization header |
403 | Token revoked or subscription not authorized |
query_mev_ids
Search MEV events by block range, timestamp, address, or type. Returns a list of transaction hashes (mev_id).
ONLY Ethereum mainnet MEV data is served.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
from_block | integer | 0 | Start block number inclusive (0 = no lower bound) |
to_block | integer | 0 | End block number inclusive (0 = no upper bound) |
from_timestamp | integer | 0 | Unix timestamp (seconds), start of time range (0 = no limit) |
to_timestamp | integer | 0 | Unix timestamp (seconds), end of time range (0 = no limit) |
mev_type | string | "" | ARBITRAGE / SANDWICH / LIQUIDATION / JIT / "" (all) |
address | string | "" | Filter by searcher or contract address (empty = all) |
limit | integer | 20 | Max results (1–1000) |
chain_id | integer | 1 | NOT SUPPORTED NOW, will support when we serve multi-chain data |
Billing
Charged 1 point per returned mev_id. A query returning 0 results costs 0 points.
| Scenario | Cost |
|---|---|
| Query returns 20 results | 20 points |
| Query returns 0 results | 0 points |
| Query returns 1000 results (max limit) | 1000 points |
Example prompts
Response
Response fields
| Field | Description |
|---|---|
mev_ids | Array of {mev_id} objects (transaction hashes) |
total | Total matching results before truncation |
truncated | true if results were cut at the requested limit |
meta.data_freshness | ISO 8601 timestamp of the most recent ingested block |
Error codes
| code | Description |
|---|---|
INVALID_INPUT | Invalid parameter value (e.g. unrecognized mev_type) |
INSUFFICIENT_BALANCE | Not enough points to cover the result count |
UPSTREAM_ERROR | Data source returned an error |
curl example
GET /sse connection to obtain a session_id. See the Install in AI Tools page for connection details.get_mev_detail
Fetch full details for a specific MEV event by its transaction hash: transaction relationships, token transfers, DeFi actions, and PNL.
ONLY Ethereum mainnet MEV data is served.
Parameters
| Parameter | Type | Description |
|---|---|---|
tx_hash required | string | Transaction hash of the MEV event — use mev_id from query_mev_ids |
chain_id | integer | NOT SUPPORTED NOW, will support when we serve multi-chain data |
Rate limit
Maximum 1 call per second per user. Calls exceeding this rate return RATE_LIMITED immediately with no charge.
Billing
Charged after the query completes:
| Scenario | Cost |
|---|---|
| MEV event found | 2 points |
| MEV event not found (404) | 2 points |
| Rate limited | 0 points |
Example prompt
Response
data.mevTxRelation roles
| Role | MEV type | Description |
|---|---|---|
primary | arbitrage, liquidation | Main profit-taking transaction |
frontrun | sandwich | Attacker's opening transaction |
victim | sandwich | User's transaction being sandwiched |
backrun | sandwich | Attacker's closing transaction |
mint / burn | jit | JIT liquidity provision transactions |
Error codes
| code | Description |
|---|---|
NOT_FOUND | No MEV event found for this tx_hash (2 points charged, fee is upfront) |
RATE_LIMITED | Called more than once per second (0 points charged) |
INSUFFICIENT_BALANCE | Not enough points (2 required) |
UPSTREAM_ERROR | Data source returned an error |
curl example
get_leaderboard
Get top MEV events ranked by profit, revenue, or cost. Aggregates and ranks all MEV events in the requested time window — saving you the cost of querying and sorting individually.
ONLY Ethereum mainnet MEV data is served.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
time_range | string | "1d" | "1d" = last 24 hours · "7d" = last 7 days |
mev_type | string | "" | "arbitrage" / "sandwich" / "jit" / "liquidation" / "" (all) |
bot | string | "" | Filter by bot address (to_address), e.g. "0x1f2f...". Empty = all. |
sort | string | "profit" | Ranking field, descending: "profit" / "revenue" / "cost" |
limit | integer | 20 | Max items to return (1–100) |
chain_id | integer | 1 | NOT SUPPORTED NOW, will support when we serve multi-chain data |
Billing
The leaderboard aggregates large amounts of data on your behalf. Cost scales with the time window and the total number of MEV events in that window.
Formula
- base: fixed charge per day of data, scaled by √days to reward longer queries
- overage: +1 point per 100 MEV events exceeding the free tier (
days × 10,000events) - cap: hard maximum, ensuring cost never exceeds
1500 × √daysregardless of data volume
Typical costs
| time_range | Base cost | Hard cap | Overage trigger |
|---|---|---|---|
"1d" | 900 points | 1,500 points | > 10,000 events in window |
"7d" | 2,381 points | 3,969 points | > 70,000 events in window |
"30d" | 4,929 points | 8,216 points | > 300,000 events in window |
limit parameter). If you have insufficient balance at that point, the call is rejected.Example prompts
Response
Response fields
| Field | Description |
|---|---|
items[].mev_id | Transaction hash — pass to get_mev_detail for full details |
items[].from_address | Searcher/sender address |
items[].to_address | Bot/contract address |
items[].mev_type | Event type: arbitrage / sandwich / jit / liquidation |
items[].revenue_usd | Gross revenue in USD |
items[].cost_usd | Gas + input cost in USD |
items[].profit_usd | Net profit in USD |
total | Total MEV events in the time window (used to calculate billing) |
truncated | true if results were cut at the requested limit |
Error codes
| code | Description |
|---|---|
INVALID_INPUT | Invalid time_range, mev_type, or sort value |
INSUFFICIENT_BALANCE | Not enough points after data was fetched |
UPSTREAM_ERROR | Data source returned an error |
curl example
Install in AI Tools
Replace <YOUR_API_KEY> with your key from the Dashboard.
One-command install
Or edit ~/.claude/settings.json
/mcp to verify.Edit ~/.cursor/mcp.json
Create .vscode/mcp.json in workspace root
servers as the top-level key, not mcpServers.Edit ~/.gemini/settings.json
gemini and type /tools to verify MEVScan is loaded.Edit ~/.codex/config.toml
Settings → Tools → AI Assistant → MCP Servers → "+"
Or edit ~/.idea/mcp.json
Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Windsurf
Generic (any MCP client)
SSE Push Stream — Overview
Receive new MEV events in real-time without polling. Uses standard Server-Sent Events (SSE), supported natively in all browsers and HTTP clients.
ONLY Ethereum mainnet MEV data is served.
How it works
- Create a subscription → costs 10 points upfront
- Connect to
/stream/eventswith your API key - Receive events as JSON; points deducted per event
- Cancel the subscription when done
Key facts
- Subscriptions expire after 1 hour (TTL configurable)
- Missed events are replayed on reconnect (up to 10-minute buffer)
- Billed per delivered event:
cost = f(tx_count)points - All active subscribers receive the same event stream
?last_event_id=<seq> query param on reconnect to replay missed events automatically.Create a Subscription
POST/stream/subscribe
Creates a new subscription. Each subscription costs 10 points upfront and is valid for 1 hour. Only one active subscription per account is allowed.
Request headers
| Header | Required | Value |
|---|---|---|
Authorization | yes | Bearer <YOUR_API_KEY> |
Request body
No body required.
Example
Response fields
| Field | Description |
|---|---|
subscription_id | Unique ID for this subscription |
sse_url | SSE stream path, append to the base URL to connect, e.g. GET /stream/events/{id} |
expires_at | Subscription auto-expires at this time (UTC ISO 8601) |
contract_version | Billing contract version, e.g. v1_fixed_rate |
Status codes
| Code | Meaning |
|---|---|
201 | Subscription created |
401 | Missing or invalid API Key |
402 | Insufficient points (requires 10) |
409 | Already have an active subscription |
Connect SSE Stream
GET/stream/events
Opens a persistent SSE connection. The server identifies your subscription via your Bearer token. Events are pushed as they arrive.
Request headers
| Header | Required | Description |
|---|---|---|
Authorization | yes | Bearer <YOUR_API_KEY> |
Query parameters
| Parameter | Required | Description |
|---|---|---|
last_event_id | no | Sequence number (seq) from previous connection; server replays missed events from this point |
Browser example
curl example
Event format
| Field | Description |
|---|---|
seq | Global monotonic sequence number. Pass as ?last_event_id=<seq> on reconnect. |
points_charged | Points deducted from your balance for this event |
data | Full MEV event payload (transfers, actions, PNL) |
Heartbeat
The server sends : ping comments every 25 seconds to keep the connection alive. No action required.
Close events
When the server closes the stream, it sends a final event:close message:
Status codes
| Code | Meaning |
|---|---|
200 | SSE stream opened |
401 | Missing or invalid API Key |
403 | No active subscription |
Cancel a Subscription
DELETE/stream/subscription
Cancels the current user's active subscription and terminates any connected SSE stream.
Request headers
| Header | Required | Value |
|---|---|---|
Authorization | yes | Bearer <YOUR_API_KEY> |
Example
Status codes
| Code | Meaning |
|---|---|
200 | Cancelled successfully — {"status": "cancelled"} |
401 | Missing or invalid API Key |
404 | No active subscription found |
Event Format
Each pushed event contains a full MEV report.
Top-level fields
| Field | Type | Description |
|---|---|---|
event_id | string | Global unique ID, e.g. arb-0x1a2b-19800000 |
mev_type | string | arbitrage / sandwich / liquidation / jit |
tx_count | integer | Number of transactions in this MEV event |
points_charged | integer | Points deducted for this delivery |
seq | integer | Monotonic sequence; use as ?last_event_id=<seq> on reconnect |
data | object | Full MEV report (see below) |
data.mevTxRelation
Transactions grouped by role:
| Role | MEV type | Description |
|---|---|---|
primary | arbitrage, liquidation | Main profit-taking transaction |
frontrun | sandwich | Attacker's opening transaction |
victim | sandwich | User's transaction being sandwiched |
backrun | sandwich | Attacker's closing transaction |
mint / burn | jit | JIT liquidity provision transactions |
data.pnl
| Field | Description |
|---|---|
tokenBalance | Net token balance changes: [{token, amount}] |
tokenPrice | USD price snapshot at block time: {tokenAddress: price} |
summary.revenueUsd | Gross revenue in USD |
summary.costUsd | Gas + input cost in USD |
summary.profitUsd | Net profit in USD |
MEVScan Marketplace
An open collection of demo apps and community-built tools that showcase what you can build with the MEVScan API.
About
MEVScan Marketplace is an open-source repository of applications built on top of the MEVScan API — EigenPhi's professional MEV intelligence platform. It tracks MEV activity including arbitrage, sandwich attacks, liquidations, and JIT liquidity events across Ethereum and EVM-compatible chains.
All apps are released under the MIT License. Developers who contribute via pull requests earn MEVScan points redeemable for platform perks.
Featured Applications
Real-time MEV event viewer powered by the MEVScan SSE push service. Displays the 500 most recent Arbitrage, Sandwich, Liquidation, and JIT events with pause/resume, address filter, and auto-reconnect.
- Python 3.10+ local proxy
- Single-page browser dashboard
- Auto-reconnect with exponential backoff
AI-powered MEV analysis generator. Enter a tx hash, choose an LLM (Claude / GPT / Gemini / DeepSeek / Qwen), and get a structured report with token flow and Mermaid transaction diagrams, streamed live in the browser.
- Multi-provider LLM support
- Streamed Markdown + Mermaid diagram
- Raw MEV JSON syntax-highlighted viewer
A browser-based leaderboard that calls the get_leaderboard MCP tool to rank top MEV bots by profit, revenue, or cost. Supports filtering by time window (1d / 7d), MEV type, and bot address.
- Python 3.10+ local proxy (MCP over SSE)
- Filter by timeframe, MEV type, bot address
- Displays rank, addresses, type, and USD P&L
- Etherscan links for each wallet address
Requirements
- Python 3.10+
- A MEVScan API key from your Dashboard
- Environment variables:
MEVSCAN_URLandMEVSCAN_TOKEN
Contribute & Earn Points
Have an idea for a useful MEV tool? Submit a pull request and earn MEVScan points redeemable for API access.
Points are awarded after the PR is reviewed and merged. Open a PR at github.com/eigenphi/MEVScan-marketplace — include a short description and a screenshot or screen recording.
Points & Pricing
MEVScan uses a points system. Points are consumed by MCP tool calls and SSE stream events.
Summary
| Operation | Cost | Timing |
|---|---|---|
query_mev_ids | 1 pt per returned mev_id | Charged after query, based on actual result count |
get_mev_detail | 2 pts per call | Charged upfront — regardless of whether the event is found |
get_leaderboard | 5 – 8,216 pts (dynamic) | Charged after data is fetched, based on time window and event count |
| Create SSE subscription | 10 pts flat | Charged at subscription creation |
| SSE event delivery | 1 pt per pushed event | Charged per delivery, in real time |
MCP Tools
query_mev_ids
Charged 1 point per returned mev_id after the query completes. A query returning 0 results costs 0 points.
| Scenario | Cost |
|---|---|
| Returns 0 results | 0 points |
| Returns 50 results | 50 points |
| Returns 1,000 results (max limit) | 1,000 points |
get_mev_detail
Charged a flat 2 points per call, upfront — before the lookup is executed. The charge applies whether or not the requested event exists.
| Scenario | Cost |
|---|---|
| Event found | 2 points |
Event not found (NOT_FOUND) | 2 points |
get_leaderboard
Cost scales with the requested time window and the total number of MEV events in that window. The charge is deducted after data is fetched.
- base: scales with the square root of the number of days
- overage: +1 point per 100 MEV events beyond the free tier (
days × 10,000events) - cap: hard maximum — cost never exceeds
1500 × √days
| time_range | Base cost | Hard cap | Overage trigger |
|---|---|---|---|
"1d" | 900 pts | 1,500 pts | > 10,000 events in window |
"7d" | 2,381 pts | 3,969 pts | > 70,000 events in window |
"30d" | 4,929 pts | 8,216 pts | > 300,000 events in window |
limit parameter.SSE Push Stream
Subscription fee (upfront)
Creating a subscription via POST /stream/subscribe deducts 10 points immediately. The subscription is valid for 1 hour. If it expires or you disconnect, the unused portion is not refunded.
Per-event delivery fee
Each MEV event pushed to your SSE connection deducts 1 point, regardless of MEV type:
Last-Event-ID replays missed events — replayed events use idempotent deduction and are not double-charged.Insufficient balance
When a tool call or stream delivery cannot be charged due to insufficient balance:
- MCP tools — return
INSUFFICIENT_BALANCEerror, no data is returned - SSE stream — server sends a close event and terminates the connection
Top up your balance and create a new subscription to resume streaming.
Service Status API
Public endpoint — no authentication required. Returns real-time health and waterline data for the MEVScan stack.
GET /status
Response fields
| Field | Type | Description |
|---|---|---|
status | string | "ok" — always present when the service is reachable |
service_health | string | "UP" / "DOWN" — this MCP API service |
mevscan_health | string | "UP" / "DOWN" / "UNKNOWN" — MEVScan engine system |
mevscan_data_health | string | "UP" / "DOWN" / "UNKNOWN" — MEVScan data system |
latest_block_number | integer | null | Most recently ingested block number — MEVScan Waterline |
Example response
Status indicators
| Indicator | Field | Values |
|---|---|---|
| MEVScan MCP Service Health | service_health | "UP" service alive · "DOWN" degraded |
| MEVScan Engine Health | mevscan_health | "UP" running · "DOWN" unreachable · "UNKNOWN" not configured |
| MEVScan Data Health | mevscan_data_health | "UP" running · "DOWN" unreachable · "UNKNOWN" not configured |
| MEVScan Waterline | latest_block_number | integer block number; null if no events ingested yet |
Data Quality API
A set of MCP tools for community-driven MEV data quality calibration — spot errors, submit reports, and earn Points when your reports are confirmed.
The Data Quality API is now live. All four tools (report_mev_quality, get_my_quality_stats,
get_quality_report_status, admin_review_quality_report) are fully functional.
Authenticate with a valid API Key to start submitting reports and earning Points.
How It Works
Any user with a valid API Key can submit quality reports against MEV transactions. The system weights each report by the reporter's Credibility Score and aggregates a confidence score. Once the threshold is reached, the issue is auto-confirmed and Points are settled the next day.
- Issue types:
FALSE_POSITIVE,FALSE_NEGATIVE,PNL_ERROR,TYPE_ERROR - Daily report limit: 20 for normal users, 5 for restricted users
- Points settle at UTC 00:05 the following day, distributed from the daily Points pool weighted by credibility
MCPreport_mev_quality
Submit a MEV data quality report.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tx_hash | string | Required | Transaction hash being reported (0x + 64 hex chars) |
issue_type | string | Required | FALSE_POSITIVE / FALSE_NEGATIVE / PNL_ERROR / TYPE_ERROR |
evidence_tx_hash | string | Conditional | Required when issue_type is FALSE_NEGATIVE — the real transaction as evidence |
description | string | Optional | Additional notes, max 500 characters |
Success Response
Error Codes
| code | Description |
|---|---|
UNAUTHORIZED | API Key is invalid or missing |
INVALID_ISSUE_TYPE | issue_type is not a valid enum value |
VALIDATION_ERROR | tx_hash format is invalid, or evidence_tx_hash is missing for FALSE_NEGATIVE |
DUPLICATE_REPORT | You have already submitted a report for this transaction |
DAILY_LIMIT_EXCEEDED | Daily report limit reached; resets at UTC 00:00 |
MCPget_my_quality_stats
Query quality report statistics and credibility info for the current user. No parameters required.
Success Response
credibility_score starts at 0.5. Each confirmed report adds +0.1; each rejected report subtracts 0.3. Range: 0.1–2.0. When trust_level is "restricted", the daily report limit drops to 5.MCPget_quality_report_status
Query the status of a single report. Provide either report_id or tx_hash.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
report_id | integer | One of | Report ID returned by report_mev_quality |
tx_hash | string | One of | Transaction hash that was reported |
Success Response
Status lifecycle: pending → confirmed (auto or admin) / rejected (admin) → rewarded (Points settled).