Turn any contract into a local SQL database your agent can query.
nuthatch is a self-hosted blockchain indexer in one small Rust binary. Point it at a contract address: it fetches the ABI, decodes every event into tables, and serves live SQL in under two minutes. Then point a coding agent at it: an MCP server and a semantic layer are compiled in, fully offline.
- Open source, AGPL-3.0
- Ethereum · Arbitrum One · Base
- ~58 MB RAM for a live 3-contract index
$ nuthatch init 0xA0b8…eB48 --alias usdc ✓ chain detected: ethereum ✓ 3 events → 3 tables · semantics scaffolded $ nuthatch dev ✓ backfilled · caught up · following the tip $ claude mcp add nuthatch -- nuthatch mcp › "top USDC holders, right now" agent → SELECT "to", sum(value_dec) … ✓ 5 rows · live from your nest · offline $
Built for agents, not bolted on
Natural language is becoming the query surface, and agents are the compiler. nuthatch's job is to be the best possible compilation target: a Model Context Protocol server is compiled into the binary, works fully offline, and everything an agent reads is engineered so the SQL it writes is right on the first try.
A governed semantic layer
Every nest carries semantic.toml: per-table, per-column meaning, generated
at init and yours to refine. The classic traps are derived from the schema
itself (quote "from", sum value_dec), and descriptions that go
stale against the live registry are caught, loudly.
Schema that teaches
The schema an agent reads is not a static string: it is composed live from your nest, tables, meaning, and footguns together. And the server advertises only the tools your nest can actually answer, so an agent never plans around a capability that isn't there.
Skills that never lie
init scaffolds llms.txt and an agent skill beside your nest,
and a shipped builder skill teaches an agent to drive nuthatch itself. The CLI and config
references are generated from the binary and CI-checked, so they cannot drift from
reality.
Sovereign AI
Ask your contract's data in plain English from Claude or any MCP client, with no cloud in the loop: local models via Ollama, or your own key. And the core stays deterministic; an LLM never sits in the indexing path.
Try it in two minutes
One line to install, one to hand it to your agent. If it breaks, that's exactly the feedback we want.
$ curl -fsSL https://nuthatch-indexer.com/install.sh | sh
$ claude mcp add nuthatch -- nuthatch mcp
The smallest possible indexer
Most indexing infrastructure is built to scale up: shared networks, streaming pipelines, hosted endpoints serving the whole ecosystem. nuthatch explores the opposite end of that spectrum, the smallest indexer that can exist: one you run yourself, for the contracts you care about.
Zero authoring. init 0xAddr resolves the ABI and generates
the schema, decoders, and tables. No manifest, no mappings, and no re-sync from genesis
when definitions change.
Zero infrastructure. One static binary with storage and query engine embedded. No database server, no containers, no external services.
It's just SQL. Every event becomes a table; one query spans the live tip and sealed history. Derived state (balances, supply, reserves) is computed from events instead of fetched from an archive node.
Yours. Your laptop or VPS, reorg-safe at the tip, immutable history past finality. No telemetry, no API token, no mandatory third party, ever.
It replaces nothing. For ecosystem-scale data, there is The Graph Network. nuthatch is for the moment before that: one dev, one contract, one box, ninety seconds to a SELECT.
Read this before you use it
nuthatch is alpha software and highly experimental. It is a research vehicle for local-first indexing, shared early so people can kick the tyres and tell us where it breaks. Concretely:
- Everything can change without notice: CLI flags, storage formats, APIs, and defaults are all unstable between 0.x releases.
- Events only, three chains: no call or trace decoding yet, and only Ethereum, Arbitrum One, and Base are supported.
- Young and lightly maintained: expect sharp edges, missing features, and bugs. Please report them.
- Not for production: do not build products, dashboards, or money-touching systems on it yet. Local experiments only.