# md-log-mcp

An MCP server that pushes your agent's markdown reports into md-log by path, with versions and images attached.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 3
- Author: md-log
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/md-log/md-log-mcp
- Updated: 2026-10-04
- HTML: https://affpapa.org/en/nevibecode/mcp/md-log-mcp

## What it does

Your agent names a path like `my-project/2026-07-07-error-report.md` and the server sends that file to the hosted md-log service. Folders that don't exist yet get created. Every save lands as a new immutable version, so the edit history stays readable.

There are 17 tools. The headline one is `save_markdown`: it creates or overwrites a file, uploading embedded images first and swapping placeholders for `asset://` links. `edit_markdown` handles literal replacements inside a file, `append_to_markdown` adds to the end. Both use optimistic concurrency via `base_version_no` and retry once on a conflict.

You need Node 22+ and a Personal Access Token from the md-log web app (the tokens section of settings; it's shown once). No token, no backend calls. Two ways to connect: the hosted HTTP endpoint at `https://mcp.md-log.com/mcp`, or local stdio through `npx -y md-log-mcp`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MDLOG_API_BASE_URL`, `MDLOG_PAT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add md-log-mcp -e MDLOG_API_BASE_URL=<MDLOG_API_BASE_URL> -e MDLOG_PAT=<MDLOG_PAT> -- npx -y md-log-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add md-log-mcp --env MDLOG_API_BASE_URL=<MDLOG_API_BASE_URL> --env MDLOG_PAT=<MDLOG_PAT> -- npx -y md-log-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "md-log-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "md-log-mcp"
            ],
            "env": {
                "MDLOG_API_BASE_URL": "<MDLOG_API_BASE_URL>",
                "MDLOG_PAT": "<MDLOG_PAT>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "md-log-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "md-log-mcp"
            ],
            "env": {
                "MDLOG_API_BASE_URL": "<MDLOG_API_BASE_URL>",
                "MDLOG_PAT": "<MDLOG_PAT>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MDLOG_API_BASE_URL=<MDLOG_API_BASE_URL> -e MDLOG_PAT=<MDLOG_PAT> md-log-mcp npx -y md-log-mcp
```
Replace <…> with your own values

## When to use it
- save an agent report as markdown at a chosen path
- upload screenshots alongside the text and get `asset://` links back
- append a new section to an existing report without rewriting it
- replace one exact fragment and leave the rest untouched
- roll a file back to an earlier version

## Example prompts
- Save the error report to `my-project/2026-07-07-error-report.md`
- Append a conclusions section to the end of the report
- Replace the version line in the report with the current one

## Similar
- [report-generator](https://affpapa.org/en/nevibecode/agents/report-generator.md) — subagent · 1930 installs
- [quarto-authoring](https://affpapa.org/en/nevibecode/skills/quarto-authoring.md) — skill · 1400 installs
- [scouting-report-builder](https://affpapa.org/en/nevibecode/skills/scouting-report-builder.md) — skill · 309 installs
- [answer-me-with-html](https://affpapa.org/en/nevibecode/skills/answer-me-with-html.md) — skill · 5400 installs
- [deep-research](https://affpapa.org/en/nevibecode/skills/199-biotechnologies-deep-research.md) — skill · 10200 installs
- [adrkit decision memory](https://affpapa.org/en/nevibecode/mcp/adrkit-decision-memory.md) — MCP server · ★ 21

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
