# nuthatch

> nuthatch is an open-source MCP server for databases. Index an EVM contract's history into a local SQL database your AI client can query. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, self-hosted
- **Website:** https://www.nuthatch-indexer.com
- **Repository:** https://github.com/nightswatchhq/nuthatch
- **MCP Registry name:** io.github.nightswatchhq/nuthatch
- **Categories:** databases, developer tools
- **Listing updated:** 2026-11-16

## About

Nuthatch is a single Rust binary that reads an EVM contract's events over JSON-RPC and turns them into tables you query with SQL. It resolves the ABI from Sourcify or Etherscan, generates the schema and decoders, and keeps everything in a local directory it calls a nest, so there is no subgraph to write and no Postgres or Docker to run.

Under the hood a hot store answers point reads at the chain tip, while finalized ranges are sealed into Parquet segments and read by an embedded DataFusion-based query engine. Repeated, expensive aggregates can be declared as entities that the indexer maintains as blocks arrive, and reorgs are handled as retractions. The same blocks always give the same rows, so a nest can be re-run and checked.

The MCP server is built in and works against your local nest, started with the nuthatch dev command; the registry entry packages it as an OCI image. You supply an RPC endpoint, and the bundled public ones are only meant for trying it out. Telemetry is opt-in and limited to a head count.

## Features

- **ABI-generated tables:** Creates per-event tables from the contract's ABI with no handler code.
- **Local SQL queries:** Run analytical SQL over both the live tip and sealed history.
- **Parquet history:** Finalized ranges are stored as Parquet segments read by an embedded engine.
- **Maintained entities:** Declare an entity in entities.toml and it is kept up to date as blocks arrive.
- **Built-in MCP server:** Lets Claude or another MCP client query the nest.
- **Reproducible output:** The same blocks always produce the same rows, so results can be re-checked.
- **Opt-in telemetry:** No account or tokens; the only thing it can send is a head count after you agree.

## Good for

- Counting token transfers for a contract without writing a subgraph
- Letting an AI assistant answer questions about a contract's events
- Running a local copy of a protocol's history for dashboards
- Building self-hosted Etherscan-style history for chains without a free tier

## Install

### Claude Code (Terminal)

```sh
claude mcp add nuthatch -- docker run -i --rm ghcr.io/nightswatchhq/nuthatch:4.0.0
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "nuthatch": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/nightswatchhq/nuthatch:4.0.0"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "nuthatch": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/nightswatchhq/nuthatch:4.0.0"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "nuthatch": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/nightswatchhq/nuthatch:4.0.0"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "nuthatch": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/nightswatchhq/nuthatch:4.0.0"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "nuthatch": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/nightswatchhq/nuthatch:4.0.0"
      ]
    }
  }
}
```

## FAQ

### What licence is it under?

The site lists MIT OR Apache-2.0.

### Does it need a database server?

No. Embedded mode needs no Postgres, Docker or IPFS.

### How much memory does it use?

The site says at most 2 GB of RAM per chain, and its largest production nest peaked under 1.8 GiB.

### Do I need an RPC endpoint?

Yes. It reads over JSON-RPC, and the bundled public endpoints are for trying it out; a long backfill wants your own archive-capable node.

### How does it compare with The Graph and Ponder?

Unlike The Graph it needs no subgraph, and unlike Ponder it needs no handler code; it complements The Graph rather than replacing it.

### Is nuthatch free?

Yes. nuthatch is open source, so you can use and self-host it for free.

### How do I add nuthatch to Claude Code?

Run this command in your terminal: claude mcp add nuthatch -- docker run -i --rm ghcr.io/nightswatchhq/nuthatch:4.0.0

### What are the best alternatives to nuthatch?

The closest alternatives to nuthatch are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/nuthatch
