Seneschal Data
Provides tools for querying real-time and historical DeFi liquidation data on Ethereum mainnet, including at-risk borrowers, recent liquidations, builder market share, and more.
Enables Private Watch functionality to monitor Monero payments using a view key, with webhook notifications and historical scans.
Provides a control panel for managing Private Watch subscriptions and settings via WalletConnect.
Allows Private Watch monitoring of Zcash payments via a view key, plus Penny Oracle atomic facts for Zcash.
Seneschal Data API
Free, public REST + Model Context Protocol server exposing real-time and historical DeFi liquidation telemetry for Aave, Morpho, Spark and Compound on Ethereum mainnet, plus block-builder market share data from the operator's own slot-by-slot shadow recorder.
Two paid tiers sit on top, both billed per call over x402 micropayments (USDC on Base — no account, no API key):
Private Watch (flagship) — give us a Monero or Zcash view key and a webhook URL; we watch the chain on our own full nodes and POST you an HMAC-signed event for every inbound payment. Credit-metered ($0.02/day + $0.005/call), so small receivers pay pennies and you never run a node. Drive it from the API, the MCP tools, or the WalletConnect control panel.
Premium data — expected-value-ranked liquidation opportunities, per-builder bid distributions, and Penny Oracle atomic single-fact endpoints (DeFi + Monero/Zcash) from $0.001/call.
Live endpoints
What | URL | Auth |
REST API |
| None |
MCP (Streamable HTTP) |
| None |
Control panel (Private Watch) |
| Wallet |
Docs |
| - |
Live stats dashboard |
| - |
Rate limit: 120 requests/min/IP at the REST host. The MCP host pipelines requests over a single transport so the same limit applies per session.
Quick start
REST
curl 'https://api.seneschal.space/v1/liquidations/atrisk?max_hf=1.05&min_debt_usd=1000'MCP — Claude Desktop / Cursor / Continue
Add this to your MCP client config (e.g. ~/.cursor/mcp.json):
{
"mcpServers": {
"seneschal-data": {
"url": "https://mcp.seneschal.space/"
}
}
}This server is published to the official
MCP Registry as
io.github.Rotwang9000/seneschal-data (see server.json),
so MCP-aware clients and aggregators can discover it automatically.
Eighteen tools become available to your agent — free read tools, plus paid tools that hand back the exact URL + body to settle over x402:
Tool | Purpose |
| Liveness + data freshness |
| Find liquidatable positions across all DeFi |
| Generic discovery / pagination over the full borrower set |
| Recent on-chain liquidations (won by other liquidators or ourselves) |
| Latest state of one borrower across protocols |
| Time-series health-factor traces |
| Ethereum builder market share (24h, 7d, 30d, all-time) |
| Aggregate snapshot powering the public dashboard, incl. operator activity (counts only — no profit fields) |
| Curated catalogue of mainnet flash-loan providers, incl. LP-side commit-capital paths where applicable |
| Free metadata for the x402 paywall (network, recipient, per-call price) |
| EV-ranked at-risk borrowers with realised market intel (x402, paid) |
| Per-builder bid distribution + hourly slot histogram for bundle pricing (x402, paid) |
| Penny Oracle dispatcher — atomic single facts across DeFi + Monero/Zcash, $0.001/call (x402, paid) |
| Free metadata for Private Watch: meter, supported chains, NFPT upstream health, security notes |
| Subscribe an XMR/ZEC view key to webhook payment monitoring (x402, paid) |
| URL + body to top up an existing watch's credit ($0.10 / $1 / $5 tiers) |
| One-off paid scan returning spendable + spent notes for a view key (x402, paid; key never persists) |
| Free, rate-limited Zcash UFVK derivation from a BIP-39 mnemonic (with a loud security warning) |
REST endpoints
Method | Path | Notes | |||
|
| Liveness + freshness probe | |||
|
|
| |||
|
|
| |||
|
|
| |||
|
| Cross-protocol borrower snapshot | |||
|
| `?protocol=aave | morpho&since_ms&until_ms&granularity&limit` | ||
|
| `?window=24h | 7d | 30d | all&limit` |
|
| Aggregate snapshot for dashboards | |||
|
|
|
Full details, parameter tables, and worked examples at
https://docs.seneschal.space.
Why this exists
Seneschal operates an Ethereum block builder
(extra_data = Seneschal/0.1) and a vertically-integrated liquidation
searcher. The searcher already tracks ~500 Morpho borrowers, 1,300+
Spark borrowers, every Aave V3 mainnet position with non-trivial debt,
and the winning builder of every slot since May 2026. Nobody else
publishes this combination, so we expose it.
Two protocols, one backend:
REST API — dashboards, monitoring tools, anything that speaks HTTP.
MCP server — AI agents (Claude, Cursor, Continue, etc.) using the Model Context Protocol.
Local dev
git clone https://github.com/Rotwang9000/seneschal-data-api
cd seneschal-data-api
npm install
SENESCHAL_MEV_LOGS_DB=/path/to/your-mev-data.sqlite \
SENESCHAL_MORPHO_BORROWERS=/path/to/morpho-borrowers.json \
SENESCHAL_SPARK_BORROWERS=/path/to/spark-borrowers.json \
SENESCHAL_SHADOW_BLOCKS=/path/to/shadow-blocks.jsonl \
node bin/rest.mjs
# in another shell:
curl http://127.0.0.1:8810/v1/healthDocker
A Dockerfile is provided for self-hosting the MCP server:
docker build -t seneschal-data-api .
docker run -p 8811:8811 -v /path/to/your-data:/data seneschal-data-api
# point your MCP client at http://localhost:8811/The data sources are SQLite + JSONL files written by the Seneschal bot.
Schemas are documented in src/db.js; if you have your own writer
producing the same shapes you can point this server at it.
Tests
npm test539 jest tests covering the query layer (in-memory SQLite fixtures), the
Fastify REST routes (via fastify.inject), the MCP server (both
in-process via InMemoryTransport and end-to-end via
StreamableHTTPClientTransport), the x402 paywall + bazaar-discovery
wiring, the Private Watch credit meter / poller / surge pricing, and the
ops watchdog. Plus test/live-smoke.mjs which exercises the live
mcp.seneschal.space endpoint over Streamable HTTP.
Architecture
services/data-api/ ← this repository
├── bin/
│ ├── rest.mjs systemd entry — Fastify REST listener
│ └── mcp.mjs systemd entry — MCP HTTP listener
├── src/
│ ├── config.js env-driven config (ports, paths, limits)
│ ├── db.js better-sqlite3 read-only handle + JSON cache
│ ├── queries.js pure functions used by both REST and MCP
│ ├── rest-server.js Fastify app: `buildApp()` for tests, `start()` for prod
│ └── mcp-server.js McpServer + StreamableHTTPServerTransport
├── docs/ public docs served at docs.seneschal.space
└── test/ queries / rest-server / mcp-server testsShared design rule: both REST and MCP layers are thin wrappers around
queries.js. Any new endpoint goes in queries.js first (with tests),
then both wrappers in the same commit.
Premium tier (x402 paywall)
src/queries-premium.js plus src/x402.js add per-call payment to a
small family of /v1/premium/* endpoints (and seneschal_premium_*
MCP tools). The paywall is off unless the operator sets
X402_RECIPIENT_ADDRESS. Once set, unsigned requests get HTTP 402 with
machine-readable payment requirements, and an
x402 facilitator settles a signed
EIP-3009 transferWithAuthorization for USDC on Base mainnet.
Configure
Env var | Default | Notes |
| (empty — paywall off) | Recipient wallet on the chosen network. 0x-prefixed 20-byte hex. |
|
| Any CAIP-2 EVM network the facilitator supports. |
| (empty) | Recommended. A CDP API key. When both are set, settlement routes through Coinbase's hosted facilitator ( |
|
| Fallback facilitator used only when no CDP credentials are set. |
|
| Money-formatted ( |
| … | Shown on |
|
| Maximum settlement window per call. |
Free metadata endpoint (zero cost, no signature required):
curl https://api.seneschal.space/v1/paywallreturns the live network/recipient/price/route table so agents can budget a session before opening a paid request.
Support
Per-call payments (preferred for agents): pay $0.05 USDC on Base to call
GET /v1/premium/opportunities. See/v1/paywallfor the live recipient + rails.GitHub Sponsors: the Sponsor button at the top of the repo (
.github/FUNDING.yml).Direct tips: ETH / BTC addresses are surfaced on stats.seneschal.space once the operator sets
SENESCHAL_DONATE_ETH/SENESCHAL_DONATE_BTC.Questions / allow-list bumps: Telegram
@OrknetP.
Seneschal runs on a single Helsinki box; every cent helps keep it online.
License
MIT — see LICENSE.
Operator contact
Seneschal is a single-operator Ethereum block builder and searcher
running an rbuilder fork from a co-located server in Helsinki.
Builder on-chain extra_data is Seneschal/0.1. Contact
@OrknetP on Telegram (checked periodically).
This server cannot be installed
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rotwang9000/seneschal-data-api'
If you have feedback or need assistance with the MCP directory API, please join our Discord server