# Use your Markdown notes as a database

> Datanotes runs your vault, a folder of Markdown notes, as typed database tables for you and your agents.

Datanotes turns the notes you already keep into typed tables that you, your programs and your agents share. The engine checks every write. Every write through the engine is journaled and can be undone.

- [Get Started](https://datanotes.dev/start/quick-start/)
- [Connect an Agent](https://datanotes.dev/start/connect-agents/)

## Why use Datanotes

Your notes stay plain Markdown files. The engine adds what a database gives you.

* [Tables from your notes](https://datanotes.dev/guides/database-objects/tables/)

  Each note with a `table` property is a row. One file, `metastore.yaml`, defines the columns.

* [Every write checked](https://datanotes.dev/guides/data-quality/validation/)

  The engine checks types, links, unique values and CHECK rules. It refuses a bad write and changes nothing.

* [All or nothing, with many clients](https://datanotes.dev/develop/concurrency/)

  Agents, programs and your phone write at the same time. Each write is checked on the latest data and applies whole or not at all.

* [Joins, views and bases](https://datanotes.dev/guides/read-and-write/joins-and-aggregates/)

  Filter, join and aggregate rows. Save a query as a view, and share columns through bases.

* [History, time travel and undo](https://datanotes.dev/guides/history/journal-and-undo/)

  The journal records every write through the engine and who made it. Undo a write, or, with history on, read a table as it was last week.

* [Made for agents](https://datanotes.dev/start/connect-agents/)

  Claude, Cursor and Codex call every operation through the Model Context Protocol (MCP). Each refusal says how to fix the call.

* [HTTP API and client](https://datanotes.dev/develop/http-api/)

  Programs call the same operations over HTTP, or from JavaScript with `datanotes/client`.

* [Search by text, meaning and links](https://datanotes.dev/guides/search/text/)

  Search the text of every note, find notes by meaning, and walk the links between them.

* [Git sync and store backup](https://datanotes.dev/administration/git-sync/)

  The engine commits and pushes your vault with git. A private repository backs up undo and history too.

* [Edit notes by hand](https://datanotes.dev/guides/data-quality/hand-edits/)

  Use Obsidian, VS Code or git. The engine checks each edit and reports what it breaks.

## What you can build

The guides build one example you can follow: a diary of classic films in the public domain.

* [A second brain for your agent](https://datanotes.dev/guides/agents/how-agents-use-datanotes/)

  Tell your agent you watched Metropolis with Anna. It logs the viewing and finds it when you ask next month.

* [Databases in your notes](https://datanotes.dev/guides/database-objects/relations/)

  Keep films, actors, genres and viewings as linked tables. Every row stays a note you can open and edit.

* [Apps over your vault](https://datanotes.dev/develop/build-an-app/)

  Build film night, a TypeScript app that lists the films to watch and logs each viewing.

* [Several agents, one memory](https://datanotes.dev/guides/security/tokens/)

  Give each agent and script its own token. The journal shows which one wrote what.

## Run it on your notes

You need Node.js 22 or newer and a folder for your database: an empty one, or a folder of notes.

1. Start the engine on your folder:

   ```bash
   npx -y datanotes serve --database your_database_folder
   ```

2. Connect your agent. This command adds Datanotes to Claude Code, and [Connect your agents](https://datanotes.dev/start/connect-agents/) covers Cursor, Codex and others:

   ```bash
   claude mcp add datanotes -- \
     npx -y datanotes mcp --database your_database_folder
   ```

3. Ask in your own words:

   ```text
   Make a table of the classic films I watch, then add Nosferatu (1922).
   ```

Then read the page that fits what you want to do next:

* [Run Datanotes on your notes](https://datanotes.dev/start/quick-start/)

  Create a table, add a row and see a refusal.

* [Prompts for your agent](https://datanotes.dev/guides/agents/prompts/)

  Prompts to copy, with the tools they call.

* [Build on Datanotes](https://datanotes.dev/develop/build-on-datanotes/)

  Programs, apps and your own MCP server.

* [How it works](https://datanotes.dev/start/how-it-works/)

  Tables, rows, the journal and the store.
