Skip to main content
Glama
fc0web

lab-notebook-mcp

by fc0web

lab-notebook-mcp

Version: 0.1.0 (Phase 1、 2026-08-17)

測定の一次資料を永続化する MCP サーバー。 chat-Claude 2026-08-17 「新しいアイデア」 arc の 「実験ノート MCP」 提案を independent MCP として 実装。 設計詳細は docs/design.md 参照。

Design 原則 (§5 セキュリティ設計 + §3.4 append-only)

  1. Append-only: 削除ツール なし、 訂正は supersede

  2. モード gating: ro では 書き込み tool を 登録自体しない + SQLite ro URI で 二重防御

  3. 任意 SQL 禁止: execute_sql 系 意図的に 提供しない

  4. 外部由来テキスト は でラップ: prompt injection 対策

  5. 測定器に触らない: benchtop の責務、 本 server は DB layer のみ

  6. アーティファクト中身返さない: メタデータ + path のみ

Related MCP server: SQLite MCP Server

Quick start

pip install -e ".[dev]"
pytest                     # 全 test 通過確認
LAB_NOTEBOOK_MODE=rw LAB_NOTEBOOK_ROOT=./_dev python -m lab_notebook

Env vars

Var

Default

説明

LAB_NOTEBOOK_ROOT

$HOME/lab-notebook

DB + artifacts 保存先

LAB_NOTEBOOK_MODE

ro

ro (default 安全側) or rw

LAB_NOTEBOOK_INGEST_DIRS

(unset)

artifact 取り込み許可 dir (: 区切り)、 unset なら 取り込み拒否

Cross-pollination 関連 (Rei stack)

  • benchtop v0.4.0 (2026-08-17): 実験ノート features (subject/env/mystery_id + find_similar_sessions + regression_check) が 本 project と responsibility overlap。 使い分け 推奨:

    • benchtop v0.4.0: quick session-level notes (単発 session に メタデータ付ける)

    • lab-notebook-mcp: structured multi-session records (experiment × run × dut × condition × measurement × artifact × baseline を SQL schema で 永続化、 professional lab notebook 用途)

  • Rei-Automator STEP 1340 audit-log.ts (2026-08-17): hash chain primitive origin、 本 project は SQLite WAL + append-only + supersede で 別方式 の integrity 保証

Repository

License

MIT (v0.x)。 v1.0+ での license 切替の 可能性 あり (LICENSE file 参照時に 決定)。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables secure interaction with multiple SQL database engines (MySQL, PostgreSQL, SQLite, SQL Server) through a standardized interface. Supports schema inspection, safe query execution, and controlled write operations with built-in security restrictions.
    5
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides comprehensive SQLite database interaction for AI agents, including data manipulation, schema inspection, and automated query logging. It features a unique context preservation pattern that uses a dedicated meta-table to help autonomous agents maintain self-documenting database architectures.
    25 npm
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables coding agents to query and modify a SQLite database through twelve SQL-based tools, with safety enforced server-side via statement policies, protected tables, result caps, and snapshots. It also provides an append-only, hash-chained memory log with checkpoints so agents can record events and resume context across sessions.
    12
    MIT