Skip to main content
Glama

lablog-mcp 🧪

Python Version MCP License: MIT Code style: black

A lightweight, zero-dependency Model Context Protocol (MCP) server that transforms fragmented Markdown experiment notes into an interactive, chronological timeline for AI.

English | 中文说明


中文介绍

在进行 AI 调优、提示词工程(Prompt Engineering)、模型微调或算法开发时,很多开发者习惯用 AI 随手生成一篇篇 Markdown 实验记录。但随着实验积累:

  • 历史记录碎片化,极难横向对比;

  • 容易忘记“上次为什么放弃了这个参数”;

  • 重新复现最佳结果时缺乏连贯的演进脉络。

lablog-mcp 是一个专为解决该痛点打造的轻量 MCP 插件服务。它让 AI 客户端(如 Claude Desktop、Cursor、Cline 等)拥有自动扫描并理解你本地 Markdown 笔记的能力。

只需对 AI 说一句:

“查看实验日志,帮我对比过去一周在提示词上的改动和最终采用结果。”

AI 即可自动调用该服务,提取关键维度:

  1. 时间与主题(Date & Topic)

  2. 实验改动(What was changed / Delta)

  3. 结果好坏评定(Outcome / Eval metrics)

  4. 决策理由(Decision & Rationale: 采纳还是放弃,以及核心原因)


Related MCP server: Obsidian MCP Tools

Features

  • ⚡ Zero Hassle: Pure file-system driven. No heavy databases or external embedding servers required.

  • 🔍 Smart Heuristics: Automatically detects section headings like ## 改动, ## 结果, ## 结论 or ## Changes, ## Results, ## Conclusion.

  • 🛡️ Strictly Read-Only: Guarantees zero writes or modifications to your original notes.

  • 🕒 Three-Tier Date Fallback: Frontmatter date → Filename YYYY-MM-DD → File system timestamp (mtime).

  • 🤖 Universal MCP Support: Compatible with Claude Desktop, Cursor, Cline, and any MCP 1.x/2.x host.


Installation & Setup

1. Run with uvx (Recommended)

No manual clone needed:

uvx lablog-mcp

2. Install via pip

git clone https://github.com/your-username/lablog-mcp.git
cd lablog-mcp
pip install -e .

Client Configuration

Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "lablog": {
      "command": "python",
      "args": ["-m", "lablog_mcp.server"],
      "env": {
        "LABLOG_NOTES_DIR": "C:/path/to/your/experiment/notes"
      }
    }
  }
}

Cursor

In Cursor Settings -> Features -> MCP Servers -> Add New MCP Server:

  • Name: lablog

  • Type: command

  • Command: python -m lablog_mcp.server

  • Environment Variables: LABLOG_NOTES_DIR=C:/path/to/your/experiment/notes


Provided MCP Tools

Tool

Parameters

Description

get_experiment_timeline

notes_dir, limit, topic, order

Returns a chronological timeline of all scanned experiments with their deltas, outcomes, and decisions.

get_experiment_detail

file_path

Retrieves the full markdown text and parsed metadata of a specific experiment.


Note Writing Tips (Optional)

lablog-mcp is designed to be highly forgiving. Your notes can be as simple as:

# 实验:Temperature 调优

## 实验改动
将 temperature 从 0.7 降为 0.2。

## 实验结果
数学逻辑题推导正确率提升 15%。

## 结论
采用。低温极大降低了计算过程中的随机计算失误。

Testing & Quality

Run the automated test suite:

pytest tests/ -v

All contributions, issue reports, and PRs are welcome!

License

MIT © 2026 Developer

Available Tools

2 tools
get_experiment_detailB

获取单篇实验笔记的完整原文、环境配置与结构化详情.

参数: file_path: 实验笔记的具体文件路径。

Inputs: file_path (required). Returns: result

get_experiment_timelineB

扫描指定目录下的 Markdown 实验笔记,提取改动、好坏评定与采纳决策,生成按时间排序的实验时间线.

参数: notes_dir: 存放实验笔记的目录路径。若不提供,优先读取环境变量 LABLOG_NOTES_DIR 或当前工作目录。 limit: 最多返回的实验条目数,默认 20。 topic: 可选的关键词过滤(如 'LoRA', 'prompt', 'temperature')。 order: 时间排序方式,'desc' (最新实验优先) 或 'asc' (最早实验优先)。

Inputs: limit, order, topic, notes_dir. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 2 tools

    Disambiguation4/5

    两个工具职责清晰:一个按目录聚合并生成时间线,另一个读取单篇笔记全文与结构化详情。二者的作用域(目录级 vs 单文件级)区分明确,仅因共享 get_experiment_ 前缀与同为只读获取操作,存在轻微的初始混淆可能。

    Naming Consistency5/5

    两个工具均采用一致的 verb_noun 模式(get_experiment_timeline / get_experiment_detail),共享 get_experiment 前缀,风格统一、可预测。

    Tool Count3/5

    仅 2 个工具,对于“实验笔记”这一域来说偏薄;不过服务定位较为聚焦(时间线浏览 + 单篇详情),勉强自洽。

    Completeness3/5

    覆盖了实验笔记的检索与查看(列表+详情),但完全缺少写入类操作,无法创建、更新或删除实验笔记,对“log(记录)”这一核心用途构成明显缺口。

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A read-only toolkit for searching and analyzing Markdown note directories and Obsidian vaults through AI clients. It enables metadata extraction, full-text search, and natural language querying of note content, tags, and backlinks.
      12 npm
      4
      AGPL 3.0
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to interact with a local folder of Markdown notes, supporting listing, reading, searching, creating, and appending to notes with strict security boundaries.
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI clients to read Markdown notes from a single explicitly granted local folder, read-only, with strict containment against access outside that folder.
      1
      496 npm
      MIT