Datanotes

io.github.davidefornelli由 GitHub 帳號 davidefornelli 發布v3.0.0更新於 Oct 24, 2026

The engine of your second brain: Markdown notes as database tables, for you and your agents.

概覽

AI 產生的概覽

把 Markdown 筆記資料夾變成具型別驗證的資料表,讓助理透過 MCP 查詢、寫入並復原變更。

可以做什麼
  • 在筆記資料夾上建立並描述資料表,支援具型別的欄位、連結、唯一值與限制條件
  • 依條件篩選查詢資料列,把筆記當成資料表紀錄讀取
  • 插入與更新資料列,每次寫入都依資料表結構驗證
  • 透過日誌復原變更,日誌記錄每次寫入的代理、工作階段與權杖
  • 從固定版本且需確認的 git 儲存庫安裝額外的資料表與 MCP 工具
適用情境
適合以 Markdown 檔案保存筆記、並希望助理把筆記當成結構化紀錄讀寫(含驗證與復原)而不是直接改檔案的情境。適用於個人或小型團隊的筆記資料夾,不適合大型分析資料集或大量並行寫入。
執行需求
需要 Node.js 22 或更新版本(Windows 上需 Node.js 24.16 或更新,或 26.1 或更新)。透過 npm 套件 datanotes 在本機以 stdio 執行,並在命令列傳入資料庫資料夾路徑。未宣告需要帳號、API 金鑰或環境變數。
安裝前請注意
助理可以寫入與修改你的筆記資料夾,不過寫入會經驗證並記入日誌以便復原。擴充功能會從 git 儲存庫安裝資料表與工具,只應安裝你信任的來源。README 表示除非開啟相關功能,否則資料不會離開本機,請留意任何開啟外部存取設定。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Datanotes,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Datanotes

Datanotes is the open-source database engine for Markdown: it runs a folder of notes as typed, validated tables that your programs and AI agents query, write and undo over MCP or HTTP, while every row stays a plain file you own.

[npm version] [CI] [License: Apache-2.0]

Documentation: datanotes.dev

Why Datanotes

  • Agents can't write garbage. Every write is checked against its table: types, links, unique values and CHECK constraints. A refused write changes nothing. Its answer says which value broke which rule and how to fix it.
  • Every change can be undone. The engine journals every write it makes. It records who made it: the agent, its session and its token. undo_migration takes any change back.
  • It's still just Markdown. A row is a note, or a section of a pack note, and its front matter keys are the columns. Read it, edit it, grep it or commit it to Git. The engine reads your hand edits and checks them too.
  • Extensions. Install tables and MCP tools from a git repository, pinned and confirmed (datanotes extension install).
  • Local first. Datanotes is Apache-2.0 and runs on your machine. Nothing leaves it unless you turn that feature on.

When not to use it

Datanotes keeps every row as a file, so it isn't a replacement for SQLite or Postgres. Choose a classic database for:

  • Large analytical datasets
  • High write throughput
  • Many concurrent writers on one folder

Datanotes is comfortable at 10,000 notes. At 50,000 notes, the engine takes about 15 seconds for its first start, and 2 to 3 seconds to restart.

Quick start

You need Node.js 22 or newer. On Windows, use Node.js 24.16 or newer, or 26.1 or newer.

Start the engine on a folder, which becomes your database. It can be empty, or hold notes already:

bash
npx -y datanotes serve --database your_database_folder

Run Datanotes on your notes walks you through your first table.

Connect your agents

Agents reach the engine through its Model Context Protocol (MCP) server, datanotes mcp. It uses the engine that runs on the folder, or starts one. Every client runs the same command:

bash
npx -y datanotes mcp --database your_database_folder
Claude Code
bash
claude mcp add datanotes -- \  npx -y datanotes mcp --database your_database_folder
Claude Desktop

Add the server to claude_desktop_config.json:

json
{  "mcpServers": {    "datanotes": {      "command": "npx",      "args": [        "-y", "datanotes", "mcp", "--database", "your_database_folder"      ]    }  }}
Cursor

Add the server to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json:

json
{  "mcpServers": {    "datanotes": {      "command": "npx",      "args": [        "-y", "datanotes", "mcp", "--database", "your_database_folder"      ]    }  }}
VS Code

Add the server to .vscode/mcp.json in your workspace:

json
{  "servers": {    "datanotes": {      "type": "stdio",      "command": "npx",      "args": [        "-y", "datanotes", "mcp", "--database", "your_database_folder"      ]    }  }}
Codex

Add the server to ~/.codex/config.toml:

toml
[mcp_servers.datanotes]command = "npx"args = ["-y", "datanotes", "mcp", "--database", "your_database_folder"]
Windows

On Windows, clients start npx through cmd /c. For Claude Code, outside Windows Subsystem for Linux (WSL):

bash
claude mcp add datanotes -- cmd /c npx -y datanotes mcp --database C:\Notes

In a JSON file, the command is cmd and the backslashes are escaped:

json
{  "mcpServers": {    "datanotes": {      "command": "cmd",      "args": [        "/c", "npx", "-y", "datanotes", "mcp", "--database", "C:\\Notes"      ]    }  }}

Connect your agents covers HTTP transport and named tokens.

Use it from TypeScript

Install the package with npm install datanotes. This script finds the engine on your folder, creates a table and queries it:

ts
import { DatanotesClient } from "datanotes/client";import { localEngine } from "datanotes/local";
const engine = localEngine("your_database_folder");if (!engine) throw new Error("Start the engine on the folder first");const db = new DatanotesClient({ url: engine.url, token: engine.token });
const created = await db.call("create_table", {  name: "film",  description: "Classic films I watched or want to watch",  filename: "{title}",  columns: [    {      name: "title",      type: "string",      required: true,      unique: true,      description: "The film's title, as on its poster",    },    {      name: "minutes",      type: "integer",      min: 1,      description: "Running time in minutes",    },  ],});if (!created.ok) throw new Error(String(created.value));
await db.call("insert_row", {  table: "film",  values: { title: "Nosferatu", minutes: 94 },});
// Refused: nothing is written, and the answer explains whyconst bad = await db.call("insert_row", {  table: "film",  values: { title: "Metropolis", minutes: 0 },});if (!bad.ok) console.log(bad.value);
const films = await db.call("select_rows", {  table: "film",  where: { minutes: { gt: 90 } },});console.log(films.value);

Each film is now a note, main/public/film/Nosferatu.md, with the values in its front matter. The JavaScript client page covers the rest of the client.

Learn more

License

Apache License 2.0: see LICENSE and NOTICE. Copyright 2026 Davide Fornelli.

來源:README.md,提交 455f00f

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v3.0.0最新Oct 12, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分