
Md Log Mcp
com.md-log由 md-log.com 发布v1.3.1更新于 Nov 7, 2026
md-log MCP: save/update/fetch markdown by path (stdio + remote HTTP, PAT auth).
概览
让 AI 编程助手连接 md-log 托管服务,按路径保存、编辑、搜索并版本化 Markdown 报告,供人工审阅。
- 可以做什么
- 按路径保存和读取 Markdown,自动创建缺失目录,每次保存都成为不可变版本。
- 以精确文本替换局部修改文件、追加内容,或整体替换内容并做冲突检查。
- 上传图片并把占位符改写为资源链接,也可单独上传资源。
- 浏览与检索:列出目录和文件、按标题和正文全文搜索、查看文件的版本历史。
- 恢复旧版本,移动或重命名文件与目录,并在确认后软删除文件或目录。
- 适用场景
- 适合让 AI 编程助手把工作成果和分析以可读的 Markdown 报告交付,供人审阅、批注和归档,并保留完整版本历史。也适合希望把助手生成的文档存放在可搜索的托管位置而非本地文件的团队。
- 运行要求
- 需要 md-log 托管账户,以及在网页应用设置中生成、仅显示一次的 Personal Access Token,通过环境变量 MDLOG_PAT 提供;还需在 MDLOG_API_BASE_URL 中填写含 /api/v1 的 API 基础地址。本地包需要 Node.js 22 或更高版本;使用托管远程端点则无需安装。
安装
在 SourceWeft 中
- 打开 控制台中的 Md Log Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
md-log-mcp
[npm version] [MCP Registry] [License: MIT] [Node]
Review the report, not the diff. An MCP server that lets your AI coding agent — Claude Code, Claude Desktop, Codex, Cursor — save its work and analysis as immutable, versioned Markdown reports into md-log, a human-in-the-loop review & archive layer for "vibe coding." You then read and stylus-annotate (S-Pen / Apple Pencil) those reports on web, phone, and tablet — every save a new immutable version.
A Model Context Protocol server — two transports, one tool set —
that lets Claude Code (and other agents) save .md files — text and embedded screenshots
together — straight into md-log, a human-in-the-loop review & archive layer for vibe coding. The
recommended way to connect is the hosted remote endpoint (https://mcp.md-log.com/mcp, a URL +
your key — no install); a local stdio (npx -y md-log-mcp) transport is the alternative. The agent writes a report
by path (my-project/2026-07-07-error-report.md); missing folders are auto-created, images are
uploaded and their references rewritten to asset:// links, and every save becomes an immutable new
version. The same report is then readable, editable, and stylus-annotatable (S-Pen / Apple Pencil
where supported) on a phone or tablet, and on the web.
md-log is a hosted service at https://app.md-log.com — you don't run any server yourself. This package is just the connector: a thin authenticated HTTP client that validates POSIX paths, orchestrates asset uploads, maps errors to stable agent codes, and forwards everything to the hosted md-log service — the single authority for auth, storage, versioning and quota. All you need is a Personal Access Token from the web app.
Stack
- @modelcontextprotocol/sdk (TypeScript) — one
McpServer(17 tools), two transports. - stdio transport (
md-log-mcp) — JSON-RPC over stdin/stdout; the default local mode (so stdout is reserved for the protocol; logs go to stderr). PAT from env. - Streamable HTTP transport (
md-log-mcp-http) — the remote mode: agents connect by URL with no local install; the PAT is taken per request from theAuthorizationheader. See Remote (Streamable HTTP) mode. - TypeScript, bundled with tsup to ESM
dist/server.js(stdio) +dist/http.js(HTTP). Runtime deps: the MCP SDK and zod (input schemas). Node's built-infetch/httpare the only network layers — no web framework. - PAT auth — a md-log Personal Access Token sent to the backend as
Authorization: Bearer.
Requirements
- Node 22+
- A Personal Access Token (PAT) minted in the md-log web app (Settings → Tokens; shown once)
That's it — the md-log service itself is hosted at https://app.md-log.com; there is nothing to
install or self-host.
Tools (17)
Every tool returns dual output — a human-readable content[].text and a machine-readable
structuredContent — and validates the POSIX path (NFC-normalize; reject ../., control chars,
empty/whitespace segments, backslashes, reserved names; enforce 255-byte name / 1024-byte path
limits; require .md for files) before any backend call. All requests hit the base URL in
MDLOG_API_BASE_URL (which already includes /api/v1).
Error codes surfaced to the agent
Backend failures return { isError: true, content:[{type:"text", ...}] } with a mapped code in
structuredContent.error.code:
NOT_FOUND · CONFLICT (carries the server head {server_version_no, server_checksum, …} in
detail) · UNAUTHORIZED · RATE_LIMITED · QUOTA_EXCEEDED · BACKEND_UNAVAILABLE ·
VALIDATION · FOLDER_EXISTS (swallowed as success by create_folder) · ERROR.
Authentication
The MCP/PC lane authenticates with a Personal Access Token (mdlog_pat_…) — minted once in the
web app's Settings and supplied via env. The client attaches it as Authorization: Bearer <PAT>
(plus X-API-Token for compatibility) on every request. The backend is the single source of truth
for auth and quota.
The server fails fast at startup with a clear message if either var is missing or the base URL is malformed.
Build
Smoke test
scripts/smoke.mjs spawns the built server over stdio (MCP SDK Client +
StdioClientTransport), then runs initialize → tools/list → save_markdown (a small report
embedding a tiny data: PNG) → get_markdown (reads it back, checks the marker) →
search_markdown — printing PASS/FAIL per step and exiting non-zero on any failure. Run it against
a live backend with a real PAT:
Connect a client
Mint the PAT in the web app's Settings → Tokens, store it securely, then add md-log to your MCP client. Never commit a PAT.
📄 연결 가이드 (HTML) — md-log.com/guides/customer-guide.html: 웹 앱에서 발급받은 MCP 키(PAT) 로 URL 연결(권장) 또는
npx로컬 연결 (Claude Code · Desktop · Codex · Cursor).
Recommended — remote (URL), no install
Point your client at the hosted endpoint and pass the PAT as a Bearer header. Nothing to
install — no Node.js, no npx. (You don't even need this package for the hosted connection.)
Over the remote endpoint, embed images inline (base64); uploading a local image by path
(file_path) works only with the local method below.
Alternative — local (stdio via npx)
Runs this connector as a local subprocess (needs Node 22+; npx fetches the published package, nothing
to build). Use it if you prefer a local process, need local-file (file_path) image uploads, or
self-host md-log without a hosted MCP endpoint.
Mint & secure the PAT. Create it in the web Settings → Tokens (it is shown only once) and keep it out of version control — prefer the OS keychain. On macOS, for example:
If a PAT leaks, revoke it in the web app and mint a new one.
Remote (Streamable HTTP) mode
The second bin, md-log-mcp-http, serves the same 17 tools over MCP's
Streamable HTTP transport — a single
POST /mcp endpoint — so agents connect by URL with no local install. Use it when you want to
host the connector centrally (a container / small VM behind a TLS reverse proxy) instead of every
user running npx.
How it differs from stdio:
- PAT per request. The token is not read from env; each request carries its own
Authorization: Bearer <mdlog_pat_…>header, so one endpoint serves many users — each with their own md-log token. (MDLOG_PATis ignored in this mode.) - Stateless. A fresh client + server per request; no session store (replica / autoscale friendly).
- No local files. The
file_pathimage source is refused (it would read the server's disk); send images inline asdata_base64. Everything else is identical.
Run it
Configuration (env)
Security posture (per the MCP spec): binds to 127.0.0.1 by default, requires a Bearer token on
every MCP request, validates Origin against the allowlist to defeat DNS-rebinding, and caps the body
size. A GET /health liveness probe (no auth) returns {"status":"ok"}. GET/DELETE on the MCP
endpoint return 405 (stateless: no standalone SSE stream, no session to terminate).
Connect an agent by URL
Client config shape varies (Claude Code / Cursor / etc.) — the essentials are the endpoint URL and an
Authorization: Bearer <PAT>header. Always terminate TLS in front of a public deployment; the PAT rides on every request.
Scripts
npm run build— bundle todist/server.js(stdio) +dist/http.js(Streamable HTTP) (tsup, ESM, Node 22).npm run dev— rebuild on change (tsup --watch).npm run typecheck—tsc --noEmit.npm run smoke— stdio smoke test against a live backend (needs env + a build).npm run smoke:http— backend-free HTTP-transport smoke test (handshake + auth/origin/file_path guards).npm start— run the built stdio server (node dist/server.js).npm run start:http— run the built HTTP server (node dist/http.js).
来源:README.md,提交 579b5e0
工具
0版本历史
4- v1.3.1最新Nov 7, 2026
- v1.3.0Oct 4, 2026
- v1.2.0Oct 2, 2026
- v1.1.4Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分