HutchDB logo

HutchDB

Self-hosted MCP database for storing, querying, and updating structured JSON records across AI agent sessions.

Install HutchDB

Run the project’s own setup commands, in order.

Setup steps from the project

HutchDB installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/ExpeditedProjects/hutchdb
    
  2. 2. Run
    cd hutchdb
    
  3. 3. Start the server
    docker compose up
    
  4. 4. Install
    npm install
    
  5. 5. Configure
    cp .env.local.example .env.local
    
  6. 6. Configure
    npm run db:migrate
    

Overview

The HutchDB MCP server connects MCP clients to a self-hosted Postgres-backed workspace for durable agent data. It stores arbitrary JSON records in collections, with optional schemas, filters, full-text search, aggregations, views, and CSV or JSON import and export. Run it locally with Docker or Node.js, then connect clients such as Claude Code, Cursor, Codex, or VS Code over HTTP. Reach for it when agents need shared, queryable state instead of markdown files or isolated session context.

Use cases

  • Store research records across agent sessions
  • Track bugs, applications, inventory, or content work
  • Query and update shared agent handoff queues
  • Persist project decisions and unresolved questions
  • Run repeatable playbooks with durable status

Key features

  • Schema-optional Postgres JSONB collections
  • Record filtering and full-text search
  • Optional schemas and view definitions
  • CSV and JSON import and export
  • Aggregation and collection statistics
  • HTTP MCP endpoint with bearer-token support

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 68d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars35Stargazers on the source repository.
Last commit5d agoMost recent push to the default branch.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How HutchDB works

What HutchDB MCP server does

The HutchDB MCP server provides a headless, single-user data workspace for AI agents. It stores records in named collections so multiple connected sessions can read and update the same information over time. Collections do not require a predefined schema: the first write can create one, and each record can contain arbitrary JSON data.

The project belongs in the 🗄️ Databases category and is designed for structured working data such as research records, bug trackers, content calendars, job applications, project decisions, and handoff queues. Records remain individually addressable and queryable after the original conversation ends. A status field can also support workflows where one agent collects data and another processes it.

Core is self-hosted and does not include a dashboard, login screen, OAuth authorization server, or multi-user organization features. Those product features are available in HutchDB Cloud rather than this repository.

How it works

HutchDB MCP server exposes an HTTP MCP endpoint at /api/mcp. In the Docker setup, the service runs on port 3000. The development setup uses port 3111. MCP clients send requests to the endpoint and can authenticate with a bearer token when HUTCH_API_KEY is configured.

The storage layer uses Postgres with JSONB documents. Each collection has its own table, while frequently used fields can receive indexes automatically. Queries can use containment filters, Mongo-style operators such as $gt, $in, $exists, and $contains, field projection, full-text search, and aggregation operations including count, minimum, maximum, distinct, sum, and average.

Setup and configuration

The Docker quick start clones the repository and runs docker compose up. Database migrations run as part of the startup flow, and the single-user account and personal organization are created lazily on the first request. No separate seed step is required.

For a non-Docker installation, install dependencies with npm, copy .env.local.example to .env.local, set HUTCH_DATABASE_URL, run npm run db:migrate, and start the development process with npm run dev.

Set HUTCH_API_KEY before startup when the endpoint is reachable beyond localhost. Clients then send Authorization: Bearer <token> with MCP requests. If the variable is not set, requests are trusted, which is suitable for a local setup but unsafe for an exposed host.

Tools and capabilities

The HutchDB MCP server includes tools for:

  • Creating and inspecting collections, including collection statistics.
  • Storing, querying, searching, updating, deleting, and changing the status of records.
  • Transforming records and importing or exporting collections as CSV or JSON.
  • Describing, inferring, and updating optional collection schemas.
  • Defining and working with views.
  • Applying filters, projections, full-text search, and supported aggregations.

Collections and records can therefore serve as durable memory, research storage, operational trackers, or intermediate state between agents without copying data between separate tools.

Limitations and notes

Core is single-user and self-hosted. It does not provide a web dashboard, visual record grid, published pages, social login, sessions, invitations, organization sharing, or OAuth 2.1 authorization. In particular, Core cannot connect to claude.ai web out of the box because that client requires OAuth. Claude Code, Cursor, Codex, and VS Code can use the static bearer-token setup described by the project.

The server exposes an HTTP MCP endpoint rather than requiring a local-only client process. Protect any non-local deployment with an API key and restrict access to the endpoint appropriately. Existing databases upgraded from an older per-collection storage design require npm run storage:cutover after migrations.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about HutchDB

HutchDB is an MCP server that connects MCP clients to a self-hosted Postgres-backed structured workspace. Its main tools manage collections, records, schemas, and views, including querying, searching, updating, deleting, importing, and exporting data. It supports arbitrary JSON records, optional validation, filters, aggregations, and full-text search.

Run it with Docker using `docker compose up`, or install dependencies with npm, configure `HUTCH_DATABASE_URL`, migrate the database, and start the development server. Docker serves the MCP endpoint on port 3000; the development endpoint uses port 3111.

Set `HUTCH_API_KEY` before starting the server and send it as a bearer token on every MCP request. Without that variable, requests are trusted, which is acceptable for localhost but not for a publicly reachable deployment.

Yes. Cursor can connect to the HTTP MCP endpoint using the same URL and bearer-token header as the other supported clients. The Docker endpoint is `http://localhost:3000/api/mcp`.

Core does not work with claude.ai web out of the box because it does not include the OAuth authorization server required by that client. Claude Code can connect to Core using its static bearer-token configuration.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHutchDB AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/hutchdb?style=directory)](https://allmcps.com/mcp/hutchdb)
HTML Embed
<a href="https://allmcps.com/mcp/hutchdb"><img src="https://allmcps.com/api/badge/hutchdb?style=directory" alt="HutchDB on AllMCPs" /></a>