MCP server for Drafts app integration, enabling Claude to interact with your Drafts notes via the Model Context Protocol.
- Create drafts - Create new drafts with content, tags, and optional actions
- Get draft - Retrieve specific draft by UUID
- Get all drafts - List all drafts with metadata (reads from local SQLite database)
- Search drafts - Full-text search in local database
- Append/Prepend - Add text to existing drafts
- Open draft - Open draft in Drafts app
- Run actions - Execute Drafts actions on text
- Search UI - Open Drafts search interface with filters
- macOS (required for URL scheme integration)
- Drafts app installed
- Node.js 22+ (managed via mise)
- mise for dependency management
# Install mise if not already installed
curl https://mise.run | sh
# Install Node.js via mise
mise install
# Install npm packages
npm installnpm run buildAdd to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"drafts": {
"command": "node",
"args": ["/Users/YOUR_USERNAME/sideprojects/drafts-mcp/build/index.js"]
}
}
}Replace /Users/YOUR_USERNAME/sideprojects/drafts-mcp with your actual project path.
Once configured, Claude can use the following tools:
Create a new draft:
{
text: "Draft content",
tags?: ["tag1", "tag2"],
action?: "Action Name",
folder?: "inbox" | "archive"
}Retrieve a draft by UUID:
{
uuid: "draft-uuid-here"
}Get list of all drafts with metadata by reading from local database:
{
folder?: "inbox" | "archive" | "trash" | "all",
flagged?: boolean
}Returns array of drafts with uuid, title, tags, timestamps, flags.
Search drafts by text content in local database:
{
query: "search text"
}Returns array of matching drafts.
Append text to existing draft:
{
uuid: "draft-uuid-here",
text: "Text to append"
}Prepend text to existing draft:
{
uuid: "draft-uuid-here",
text: "Text to prepend"
}Open draft in Drafts app:
{
uuid?: "draft-uuid-here",
title?: "Draft Title"
}Execute a Drafts action:
{
action: "Action Name",
text: "Text to process"
}Open Drafts search UI:
{
query?: "search query",
tag?: "tag-name",
folder?: "inbox" | "archive" | "flagged" | "trash" | "all"
}The server exposes draft content via resources:
draft://uuid/{uuid}- Retrieve specific draft content
npm run buildnpm run watchnpm test
npm run test:watchnpm run lint
npm run lint:fixnpm run format
npm run format:check- Callback Server - Express server on random port handling x-callback-url responses
- Drafts Client - URL scheme wrapper with retry logic
- Drafts Database - Direct SQLite access to Drafts database for querying
- MCP Server - stdio transport, exposes tools and resources
- Retry Logic - 3 attempts with exponential backoff
- macOS only - Uses
opencommand for URL schemes and local database access - Drafts app required - Must be running for write operations (create, append, prepend)
- Read-only queries - Database queries are read-only; modifications use URL schemes
- UI for search -
search_draftsURL scheme opens UI (usesearch_drafts_dbfor programmatic search)
- Ensure Drafts app is installed
- Check database path:
~/Library/Group Containers/GTFQ98J4YG.com.agiletortoise.Drafts/DraftStore.sqlite - Verify you have read permissions to the Group Container
- Ensure Drafts app is running
- Check Drafts has permission to receive URL schemes
- Verify callback server can bind to localhost
- Restart Claude Desktop
- Check MCP server config path is correct
- Verify Node.js version with
mise current
MIT