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: 实验笔记的具体文件路径。

NameRequiredDescriptionDefault
file_pathYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It usefully discloses that the return includes full raw text, environment config, and structured details, which implies a read-only fetch. However, it never states read-only status explicitly, permission requirements, or whether a missing/invalid path errors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very short and front-loaded: the purpose sentence comes first, followed by the parameter gloss. No filler, though the parameter line largely restates the parameter name and could carry more value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return structure need not be re-explained. For a single-parameter read tool this is adequate, but it omits how the agent should source a valid file_path and gives no relationship to the timeline sibling, leaving a gap in a multi-tool context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate for the single parameter, and it does label file_path as the specific path of the experiment note. That is the minimum viable meaning — it adds no format guidance, no relative-vs-absolute hint, and no indication of where a valid path is obtained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (获取/retrieve) and resource (单篇实验笔记/single experiment note), and enumerates what is returned: full original text, environment configuration, and structured details. The '单篇' (single) framing implicitly separates it from the get_experiment_timeline sibling, though it never names that sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: retrieving one specific note by path, as opposed to the timeline sibling. There is no explicit statement of when to prefer this tool over get_experiment_timeline, no prerequisites, and no exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_experiment_timelineB

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

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

NameRequiredDescriptionDefault
limitNo
orderNodesc
topicNo
notes_dirNo

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose genuine behavior beyond the schema: the notes_dir resolution fallback (env var LABLOG_NOTES_DIR, then cwd) and the default/output-limiting behavior. However it never states the read-only nature explicitly, nor what happens when the directory is missing or unreadable. Adequate but incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with a one-sentence purpose followed by a tight parameter list, with no filler or repetition. It is appropriately sized for a four-parameter tool, though the parameter block could be slightly tighter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, and all four parameters are documented in the description. The remaining gap is the absence of guidance on when to use this versus the sibling detail tool, which leaves the selection decision under-supported.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must supply all parameter meaning, and it does: it explains notes_dir's fallback chain, limit's default of 20, topic's filter semantics with examples ('LoRA', 'prompt'), and supplies the 'desc'/'asc' enum values that the schema itself omits. Only minor formatting/path details are left out.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb chain and resource: it scans Markdown experiment notes in a directory, extracts changes/ratings/decisions, and produces a time-ordered timeline. That is far more concrete than the tool name alone. It stops short of differentiating itself from the sibling get_experiment_detail, so it doesn't reach a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use guidance and no mention of the sibling get_experiment_detail, which is the obvious alternative for drill-down. The only contextual hints (sort order, topic filtering) are parameter semantics, not usage framing. An agent must infer when this tool is preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 2 tool updatesv0.1.0
    • First observedget_experiment_detail
    • First observedget_experiment_timeline

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 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.
    10 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