Skip to content

v5.23.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 12:42
· 163 commits to main since this release
1db1cad

Nuthatch 5.23.0 is for an agent, or a script, driving nuthatch without a person at the shell: JSON
on stdout and stable exit codes, dev --detach and stop, MCP tools that create and start a nest
from nothing, MCP over HTTP on every mount, and an npm launcher. It also closes a DNS rebinding hole
on loopback nests, which is the one change that can stop a working deployment answering. There is no
storage migration, and no sealed segment, registry hash or data identity moves.

Upgrade guidance

Replace the binary and restart. A 5.22 store is used as it is.

  • An event nest or runtime on a loopback bind behind a reverse proxy answers 403 on every
    route, naming the Host it saw, until it is started with --public-host <name>, once per name the
    proxy forwards (#3002, #3009). Add the flag to the dev or serve command before rolling the
    binary. Address-history nests already did this in 5.21. A client on the same machine, a bind off
    loopback and the published Docker image need nothing; a client in a container calling a nest on the
    host's loopback by another name, such as host.docker.internal, needs --local-host <name>.
  • A newly scaffolded nest's NID differs from a 5.22 scaffold of the same contracts, because
    init and schema now write an AGENTS.md into it (#2999) and its llms.txt now names the at
    tool (#3010). Its data identity is unchanged, so it still seeds from a mirror a 5.22 nest published,
    and existing nests keep their NIDs.
  • A script that reads nuthatch exit statuses: a failure now exits 3 to 9 by kind rather than 1
    (#3003). 0, 1 and 2 mean what they did, and without --json the error text is unchanged.
  • Every other nest: nothing to do.

Driving it from a script or an agent

  • --json on init, add and schema prints one object on stdout: nest_dir, name,
    chain, chain_id, contracts (address, alias, deployment block, proxy check and warning),
    tables, files_written and next (#3004). The prose and the log lines move to stderr, so
    nuthatch init 0x... --json | jq .tables works. Without --json stdout is unchanged.
  • nuthatch watch --once reads a running nest once and exits; with --json it prints that
    nest's /ready, / and /nests answers (#3004).
  • Exit codes by kind (#3003): 3 no nest, 4 nest not running, 5 SQL the engine refused, 6 ABI not
    found, 7 chain not detected, 8 RPC refused or unreachable, 9 a getLogs range that could not be
    narrowed. With --json, an error is one object on stderr carrying the code, the status, the message
    and a next step; for refused SQL the next step is the query's own fix hint. The table is in
    docs/cli-errors.md and at
    the foot of nuthatch --help, and the codes are stable.
  • nuthatch dev --detach starts dev in the background and returns once /ready reports a
    first poll, every mount's for a runtime, printing the URL, pid and log, or one object with --json
    (#3005). If dev exits first it fails with the end of the log and dev's exit status; if nothing
    serves within two minutes it stops it. The log and the process record live under
    $XDG_STATE_HOME/nuthatch/dev/ (else ~/.local/state), never in the nest, so the NID cannot move.
    nuthatch stop stops it and waits.
  • /ready reports the last block of the snapshot requests read, the same block /sql cites as
    as_of, rather than the cursor's own counter, which ran up to a second of windows ahead while a
    nest caught up (#3000). Stall and wedge verdicts still judge the cursor.

MCP

  • An MCP client can create and start a nest itself (#2998). nuthatch mcp offers four authoring
    tools: init_nest scaffolds a nest as nuthatch init would, start_indexing starts nuthatch dev
    for it in the background, reusing one already running, index_status reports how far it has got,
    and stop_indexing stops it. Every tool now carries MCP annotations and a title, and its
    description leads with what it answers about the chain.
  • Every mount serves MCP's Streamable HTTP transport at /mcp, so /<alias>/mcp in a runtime,
    from dev and serve alike (#3001). It is stateless and on by default. Each tool call is an
    in-process request to that mount's own routes, so a sql call is confined, limited and counted as a
    /sql request is, and the authoring tools are not offered there. A request carrying a non-loopback
    Origin gets 403. nuthatch checks no credential on it; off localhost, put it behind the same
    gateway as /sql.
  • nuthatch mcp --print-config --client <name> prints the config file for claude, cursor,
    codex, vscode, windsurf or gemini on stdout and where it goes on stderr (#2999).
  • The repository is a Claude Code marketplace and plugin, a Cursor plugin and an Agent Plugins
    package
    (#2991). /plugin marketplace add nuthatch-org/nuthatch then
    /plugin install nuthatch@nuthatch installs the skills and the nuthatch mcp server. A new
    evm-indexing skill describes the task rather than the product.
  • AGENTS.md gains "Run it headless" (start dev with its log outside the nest, wait on /ready,
    query, stop it, or --detach in one command) and a config per MCP client, and a scaffolded nest now
    carries an AGENTS.md of its own (#2999).

The npm launcher

This is the first release whose tag publishes nuthatch-indexer to npm by itself (#2995):

npx -y nuthatch-indexer init 0xA0b86991c6218b36c1D19D4a2e9Eb0cE3606eB48 --alias usdc
claude mcp add nuthatch -- npx -y nuthatch-indexer mcp --url http://127.0.0.1:8288

The package holds no binary and runs nothing at install. On first run it downloads the release
tarball for its own version and platform, checks it against the release's .sha256 and against the
digests pinned into the package when it was published, caches it and runs it. Everything it prints
goes to stderr, so nuthatch mcp keeps stdout. It covers macOS on Apple Silicon and Intel, and Linux
on x86_64 and aarch64. server.json lists it beside the container image. The name nuthatch was
taken on npm.

Ingestion

  • A one-block eth_getLogs refused for its topic list is asked in halves and merged back into
    chain order, and the group size that worked is remembered for the pool (#2994). Arc testnet's
    public RPC refuses more than 10 topic0 values at any width, so a 17-event FiatToken nest stopped
    there with "block N alone exceeds the provider's getLogs result cap". A block truly over a cap still
    fails once a single topic is refused.
  • Two more range refusals are narrowed: eth.blockrazor.xyz's 25-block limit and evm.cronos.org's
    2,000-block distance, which were retried at the same width until the attempts ran out (#2993). The
    refusals the site's getLogs error pages quote are now pinned by a test, as is bsc-dataseed's
    -32005 limit exceeded being a rate limit and never narrowed.
  • nuthatch seed retries a mirror's 429 and 503, up to eight times, waiting for Retry-After
    when the mirror sends one and doubling from one second otherwise, capped at 30 seconds (#2989).
    R2's public r2.dev URL rate-limits a seed within minutes, and the first 429 used to end it.

First run

  • init on a long history offers nuthatch dev --backfill N as the command to copy, fifteen of
    the chain's log windows (300 blocks on mainnet), and says a full backfill from deployment wants your
    own RPC, with --rpc=<url> or rpc_urls (#2971). A short history is still offered plain
    nuthatch dev. The README quickstart now starts in an empty directory.

Also

  • docs/comparison-time-to-first-query.md measures WETH on mainnet, 1,000 blocks on a keyless RPC,
    from an empty directory along each tool's quickstart, against Ponder, Envio over RPC and graph-node,
    with the script that reruns the Nuthatch side (#2996). Nuthatch answered first in 1.0 s and held
    the range in 16 s. Ponder also answered in under 3 s, and the public RPC's 429s paced most of the
    backfills.
  • The operators guide now says a hash join cannot spill and an aggregate or a sort can, given room to
    start (#2990), and how to import label sets on a follower, which gets none from the registry or the
    mirror (#3010).
  • eval/discovery runs Claude Code, Codex and Cursor on a plain indexing task with no nuthatch
    configured, and scores by rule whether they chose it (#3006). In the first baseline none did.
  • A local yatr run ci builds the parity comparison binary once before the tests, which had raced to
    build it in parallel (#3008).