loading…
Search for a command to run...
loading…
Enables AI assistants to manage drafts, tags, workspaces, and actions in the Drafts app on macOS.
Enables AI assistants to manage drafts, tags, workspaces, and actions in the Drafts app on macOS.
A Model Context Protocol (MCP) server that enables AI assistants to interact with the Drafts app on macOS through AppleScript.
For additional discussion of uses, see the Drafts forum
In addition to the MCP server, this package includes a standalone drafts CLI for interacting with Drafts directly from the terminal.
# Install globally from npm
npm install -g @agiletortoise/drafts-mcp-server
# Or link locally for development
git clone https://github.com/agiletortoise/drafts-mcp-server.git
cd drafts-mcp-server
npm install
npm run build
npm link
After installation, the drafts command is available globally.
Output is human-readable by default. Add --json for machine-readable JSON output.
# Workspaces
drafts workspace list
drafts workspace current
drafts workspace open "Work"
drafts workspace drafts "Work" --folder inbox
# Tags
drafts tag list
drafts tag get "work"
# List and search drafts
drafts list
drafts list --folder inbox --tag work --flagged
drafts list --created-after 2025-01-01 --modified-before 2025-06-30
drafts search "meeting notes"
# Single draft operations
drafts current
drafts get <uuid>
drafts create "Hello world" --tag notes --tag ideas --flagged
drafts update <uuid> "Updated content"
drafts open <uuid>
# Organize drafts
drafts flag <uuid>
drafts flag <uuid> --unflag
drafts archive <uuid>
drafts inbox <uuid>
drafts trash <uuid>
drafts add-tags <uuid> important urgent
# Actions
drafts action list
drafts action run <draft-uuid> "Send to Email"
# JSON output for scripting
drafts --json list --folder inbox
drafts --json search "budget"
You will need to have Node installed on your Mac so make the npx command available. If you do not already have Node installed, you can do so with Homebrew using:
brew install node
Once published, use with npx - no installation needed:
npx @agiletortoise/drafts-mcp-server
npm install -g @agiletortoise/drafts-mcp-server
Before publishing, test locally:
# Clone or extract the package
cd drafts-mcp-server
# Install dependencies
npm install
# Build
npm run build
# Test with MCP Inspector
npm run inspector
# Or run directly
node dist/index.js
The easiest way to use this MCP with the Claude Desktop app by installing the MCPB version. To do so:
Settings > ExtensionsWe are likely to submit this project to the Claude extension directory soon to make it available directly in the app.
If you prefer to install locally, or run via npm, these instructions are for you...
You will need to have Node installed on your Mac so make the npx command available. If you do not already have Node installed, you can do so with Homebrew using:
brew install node
Add the below to the Claude Desktop confguration file (~/Library/Application Support/Claude/claude_desktop_config.json), and relaunch Claude.
{
"mcpServers": {
"drafts": {
"command": "npx",
"args": ["@agiletortoise/drafts-mcp-server"]
}
}
}
For local development/testing (before publishing), use:
{
"mcpServers": {
"drafts": {
"command": "node",
"args": ["/absolute/path/to/drafts-mcp-server/dist/index.js"]
}
}
}
Or if globally installed:
{
"mcpServers": {
"drafts": {
"command": "drafts-mcp-server"
}
}
}
After publishing to npm, add to your Cursor MCP settings (.cursor/mcp.json in your project or global settings):
{
"mcpServers": {
"drafts": {
"command": "npx",
"args": ["@agiletortoise/drafts-mcp-server"]
}
}
}
For local development/testing, use:
{
"mcpServers": {
"drafts": {
"command": "node",
"args": ["/absolute/path/to/drafts-mcp-server/dist/index.js"]
}
}
}
Claude Code (the CLI tool) can be configured using the /mcp command or by editing the settings file directly.
Using the CLI:
claude mcp add drafts -- npx @agiletortoise/drafts-mcp-server
For local development/testing, use:
claude mcp add drafts -- node /absolute/path/to/drafts-mcp-server/dist/index.js
After adding, restart Claude Code or start a new session for the MCP server to be available.
The first time the server runs, macOS will ask for permissions:
drafts_list_workspacesList all workspaces in Drafts.
// No parameters required
drafts_get_draftsGet drafts with flexible filtering by content, folder, tag, flagged status, and dates.
{
query?: string; // Optional: Query string to filter drafts
folder?: inbox, archive, trash // Optional: Limit to one folder
tag: string // Optional: Limit by assigned tag
}
drafts_create_draftCreate a new draft with content and optional tags.
{
content: string; // Required: Draft content
tags?: string[]; // Optional: Array of tag names
flagged?: boolean; // Optional: Flag the draft
}
drafts_get_draftRetrieve a specific draft by UUID.
{
uuid: string; // Required: UUID of the draft
}
drafts_update_draftUpdate the content of an existing draft.
{
uuid: string; // Required: UUID of the draft
content: string; // Required: New content
}
drafts_searchSearch for drafts across all workspaces.
{
query: string; // Required: Search query
}
drafts_add_tagsAdd tags to an existing draft.
{
uuid: string; // Required: UUID of the draft
tags: string[]; // Required: Array of tag names to add
}
drafts_list_actionsList all available Drafts actions.
// No parameters required
drafts_run_actionRun a Drafts action on a specific draft.
{
draftUuid: string; // Required: UUID of the draft
actionName: string; // Required: Name of the action to run
}
drafts_flagFlag or unflag a draft.
{
uuid: string; // Required: UUID of the draft
flagged: boolean; // Required: true to flag, false to unflag
}
drafts_archiveArchive a draft.
{
uuid: string; // Required: UUID of the draft to archive
}
drafts_trashMove a draft to trash.
{
uuid: string; // Required: UUID of the draft to trash
}
Here are some example prompts you can use with Claude or other AI assistants:
"Show me all my workspaces in Drafts"
"Get all drafts from my 'Work' workspace"
"Create a new draft with the content 'Meeting notes for Q1 planning'"
"Search for drafts containing 'budget'"
"Create a draft with content 'Todo: Review PR #123' and tag it with 'work' and 'urgent'"
"Find the draft about the marketing campaign and run the 'Send to Email' action on it"
"Flag all drafts in my Inbox workspace that contain 'follow up'"
"Archive all drafts tagged 'completed'"
"Get all drafts from my 'Daily Notes' workspace from the last week,
then create a summary draft tagged 'weekly-review'"
"Search for all drafts tagged 'meeting-notes', extract action items,
and create a new draft with all the action items combined"
# Clone the repository
git clone https://github.com/agiletortoise/drafts-mcp-server.git
cd drafts-mcp-server
# Install dependencies
npm install
# Build
npm run build
# Test with MCP Inspector
npm run inspector
drafts-mcp-server/
├── src/
│ ├── index.ts # Main MCP server implementation
│ ├── cli.ts # Standalone CLI tool
│ ├── drafts.ts # Drafts-specific operations
│ └── applescript.ts # AppleScript execution utilities
├── dist/ # Compiled JavaScript (generated)
├── package.json
├── tsconfig.json
└── README.md
Use the MCP Inspector to test the server:
npm run inspector
This opens a web interface where you can test each tool interactively.
Make sure you've spelled the workspace name exactly as it appears in Drafts. Workspace names are case-sensitive.
osascript -e 'tell application "Drafts" to get name of first workspace'
This might indicate that AppleScript dictionary access isn't working. Check that:
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)MIT License - see the LICENSE file for details.
Выполни в терминале:
claude mcp add drafts-mcp-server -- npx Web content fetching and conversion for efficient LLM usage.
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolProvides auto-configuration for setting up an MCP server in Spring Boot applications.
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzНе уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai