Try Hanzo
Document Database

Hanzo DocDB

Documents on the MongoDB wire, stored in Hanzo SQL. DocDB answers the MongoDB wire protocol on 27017 and stores nothing itself: it translates each command into SQL and runs it against Hanzo SQL. Your driver connects, your documents go in as documents — and the same data is sitting in a database you can also point a SQL client at, back up and replicate the way you already do.

Paste and ship

Paste this into any agent. It reads the skill manifest and calls DocDB from there.

Agent promptapi /v1/docdb
Read https://hanzo.ai/skill.md and use Hanzo DocDB in my project. Start with: hanzo provisioning docdb create

What is Hanzo DocDB

A document store with a SQL database under it

Write documents. Keep every operational habit you already have.

01

The wire protocol, not a REST shim

DocDB speaks MongoDB 5.0 and later on the wire, so pymongo, mongoose, the Go driver and mongosh connect to it directly. Around sixty commands are implemented — find, insert, update, delete, findAndModify, distinct, count, createIndexes, explain and the rest.

02

Transactions, and someone else's durability

Multi-document writes commit or roll back together under Hanzo SQL's MVCC. Backups, point-in-time recovery and replicas belong to the database — DocDB holds no state of its own, so there is nothing here that can be lost separately.

03

Readable as SQL

The documents are rows in Hanzo SQL, so a reporting tool, a dbt model or a psql session can read them where they sit. The reporting copy and the operational copy are the same copy.

Capabilities

What the endpoint gives you

Aggregation runs in the database

A pipeline is translated to SQL and executed where the data is, not pulled across the wire and reduced in your process. explain returns the plan the query actually took — a Hanzo SQL plan, for something you wrote as a pipeline.

Indexes are real indexes

createIndex from the driver builds a Hanzo SQL index, and listIndexes reads back what is actually there. Nothing is emulated in a layer above the planner, so an index you create is one the planner can use.

An HTTP endpoint and an MCP server

The same collections answer over plain HTTP — /action/find, /action/insertOne, /action/aggregate and the rest, with an OpenAPI document to generate from — and over the Model Context Protocol, so an agent can list databases and query them with no driver at all.

Get started

Connect the driver you already have

typescript
import { MongoClient } from 'mongodb';

// Same driver. New connection string.
const client = new MongoClient(process.env.HANZO_DOCDB_URI);
await client.connect();

const orders = client.db('shop').collection('orders');

// Aggregation pipelines run unchanged
const top = await orders.aggregate([
  { $match: { status: 'paid' } },
  { $group: { _id: '$customer_id', total: { $sum: '$amount' } } },
  { $sort: { total: -1 } },
  { $limit: 10 },
]).toArray();

Get started with DocDB

Point your existing MongoDB driver at a new connection string and keep every backup, replica and reporting habit you already have.

Start building with DocDB

One API key. One credit balance. Every primitive.

Open source

License: Apache-2.0hanzoai

Get DocDB

Document DB over Hanzo SQL