
Drafta
io.github.rpegorov由 GitHub 帳號 rpegorov 發布v1.0.0更新於 Oct 26, 2026
Search, read and write notes in your local Drafta library over local stdio.
概覽
本機 stdio MCP 伺服器,讓助理在 Mac 上的 Drafta Markdown 筆記庫中搜尋、讀取與寫入筆記。
- 可以做什麼
- 搜尋與讀取筆記:依標題、內文與標籤全文檢索,可用標籤、狀態與筆記本篩選,並依 id 或完整標題讀取整篇筆記。
- 瀏覽結構:列出筆記本階層與所有使用中的標籤。
- 了解筆記格式:提供 Markdown 格式指南,涵蓋標註區塊、mermaid、待辦清單、標籤、wiki 連結與數學公式。
- 建立與編輯筆記:新增筆記、附加或取代內文、設定狀態、加上標籤、建立筆記本,以及把筆記移到垃圾桶。
- 作為上下文附加:最近 200 篇筆記會以 MCP 資源形式發布。
- 適用情境
- 適合以 Drafta 應用程式保存筆記、並希望助理在對話中尋找、摘要或補充這些筆記的情況,變更會寫入應用程式所讀取的同一批 Markdown 檔案。若只想搜尋與閱讀,可用唯讀參數啟動。
- 執行需求
- 以本機程序透過 stdio 執行;從原始碼建置需要 macOS 13 以上與 Swift 6(Xcode 16 或更新版本)。筆記庫路徑預設指向 Drafta 應用程式的資料庫,可用資料庫路徑參數覆寫。MCPB 套件與外掛會啟動 Drafta.app 內建的輔助程式,因此應用程式需位於 /Applications。不需帳號、金鑰或網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Drafta,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
drafta-mcp
A Model Context Protocol server that exposes a Drafta note library to an AI assistant — Claude Code, Zed, or any other MCP client that launches servers over stdio.
The assistant can search and read your notes, and (unless you start the server
with --read-only) create notes, append to them, tag them, set their status and
file them into notebooks. Everything it writes lands in the same Markdown files the
Drafta app reads, so a note created from a chat is indistinguishable from one you
typed.
Privacy
This repository exists so that you can check for yourself where your notes go. The answer is: nowhere.
- stdio only. The server talks to the client that launched it over stdin and stdout. It opens no socket and listens on no port.
- Local files only. It reads and writes files under the library directory and nothing else. It never touches the app's settings, keychain items or sync state.
- No network. No code in this package makes a network request. There is no
URLSession,Networkframework or socket anywhere inSources/; the only dependency is the official MCP Swift SDK, used for its stdio transport. - No accounts, no licence check, no telemetry.
What your notes are exposed to is whatever the MCP client does with the text it reads — that part is up to the client you connect.
Build
Requires macOS 13 or later and Swift 6 (Xcode 16 or newer).
The binary is .build/release/drafta-mcp.
Install
Copy the binary somewhere stable, for example:
Usage
Without --library the server opens the library the Drafta app uses. A ~ in the
path is expanded by the server, since client configs are JSON and no shell sees
them. An unknown flag is an error: --readonly (a typo) does not start a
writable server.
Claude Code
Add --read-only at the end to give the assistant read access only.
Claude Code plugin
This repository is also a Claude Code plugin marketplace. The plugin starts the
drafta-mcp helper that ships inside Drafta.app, so it requires Drafta.app in
/Applications.
The plugin runs the server with its defaults (the app's library, read and write).
For read-only access, or for Drafta.app in ~/Applications, register the helper
yourself with claude mcp add and pass --read-only or the full path; see
plugins/drafta/README.md.
Claude Desktop (MCPB)
Download drafta-mcp.mcpb from the Releases
page and double-click it. The bundle contains no binary: it starts the drafta-mcp
helper that ships inside Drafta.app, so it requires Drafta.app in /Applications.
Build it from source with scripts/build-mcpb.sh.
Codex
The plugin starts the helper inside Drafta.app, so it needs Drafta.app in /Applications.
DeepSeek Harness (DSH)
plugins/dsh-drafta adds a @deepseek-ai/dsh-mcp-client row (dsh-drafta-mcp) for the
Drafta helper. Add the package to your profile's package.json the same way as any
local plugin, with a link: dependency, and list it under dsh.profile.bundles:
If you already added Drafta to DSH by hand, remove one of the two: both register a
server named drafta.
Zed
In settings.json:
Tools
Read tools (always published):
Write tools (not published with --read-only):
Notes are also published as MCP resources (drafta://note/<uuid>, the 200 most
recent), so a client can attach one as context without a tool call.
Library format
A library is a plain directory:
Things worth knowing if you read or write these files yourself:
- Tags are not stored. They are derived from
#tagsin the body on every read; only tags added separately live in theextraTagsfront-matter field. - The title is the first line of the body.
create_notewrites the title as a# headingwhen the body has none. - A note without a notebook is an orphan, visible only under All Notes, so new notes are filed into the Inbox (created if missing).
- Edits keep history.
update_noteandappend_to_notesave the replaced text underrevisions/(30 per note), where the app shows it as history. - Open notes are protected. While the Drafta app holds unsaved text for a note,
it lists that note in
editor-hold.json;update_noteandappend_to_noterefuse to write that note's body and say so, instead of reporting a success the app would overwrite a moment later. library.jsonis edited under file coordination, so a notebook the app adds at the same moment is not lost.
The server works whether or not the app is running. When it is, the app's file watcher picks up what the server wrote.
Relationship to Drafta.app
Drafta.app ships its own copy of drafta-mcp inside the app bundle. This
repository is not that binary. It is an independent, community-editable snapshot
of the same server: same tool names, same arguments, same on-disk format, with the
app's licence check removed — writes here are gated only by --read-only. The two
are developed separately and may drift; if the app ever changes its library format,
this snapshot does not follow automatically.
Contributions are welcome.
Licence
Apache License 2.0 — see LICENSE and NOTICE.
Кратко по-русски
drafta-mcp — MCP-сервер для библиотеки заметок Drafta. Работает только через
stdio, читает и пишет только файлы в каталоге библиотеки и не делает ни одного
сетевого запроса. Сборка: swift build -c release. Подключение к Claude Code:
claude mcp add drafta -- /путь/к/drafta-mcp --library <путь к библиотеке>.
Флаг --read-only оставляет только инструменты чтения. Это независимый снимок
сервера, а не бинарник, который поставляется внутри Drafta.app.
來源:README.md,提交 47db128
工具
0版本歷史
1- v1.0.0最新Oct 18, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分