← Back to Draft Lift

MCP & CLI Documentation

Use Draft Lift from AI coding agents (Claude Code, Cursor, VS Code) or your terminal.

Quick Start

Get up and running in 3 commands.

npm install -g @draftlift/cli

dl login
dl generate "Write a thread about AI productivity tips" --platform x

Or set up MCP for your AI coding agent with one command:

dl setup --claude --mcp

Installation

CLI (global)

npm install -g @draftlift/cli

MCP Server (via npx)

No global install required — npx downloads it on demand.

npx @draftlift/mcp

Requirements

  • Node.js 18 or later
  • A Draft Lift account on the Business plan or above (for API key access)

Authentication

Option 1: Browser login (CLI)

dl login            # Opens browser for OAuth
dl login --no-browser  # Prints URL to paste manually

Option 2: API key (CLI & MCP)

Generate an API key in Settings and export it:

export DRAFTLIFT_API_KEY=dl_live_...

Or pass it inline: dl generate --api-key dl_live_...

Verify

dl whoami

MCP Setup

The fastest way is dl setup, which auto-configures your agent:

dl setup --claude --mcp    # Claude Code
dl setup --cursor          # Cursor
dl setup --vscode          # VS Code (Copilot)
dl setup --opencode        # OpenCode

Or configure manually with the snippets below. Replace <your-api-key> with your API key.

Claude Code

Run in your terminal:
claude mcp add draftlift \
  --transport http \
  --url https://api.draftliftai.com/mcp \
  --header "Authorization: Bearer <your-api-key>"

Cursor

Add to ~/.cursor/mcp.json:
{
  "mcpServers": {
    "draftlift": {
      "url": "https://api.draftliftai.com/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>"
      }
    }
  }
}

VS Code (Copilot)

Add to ~/.vscode/mcp.json:
{
  "servers": {
    "draftlift": {
      "url": "https://api.draftliftai.com/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>"
      }
    }
  }
}

OpenCode

Add to ~/.config/opencode/mcp.json:
{
  "mcpServers": {
    "draftlift": {
      "url": "https://api.draftliftai.com/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>"
      }
    }
  }
}

Local (stdio)

Run the MCP server as a local subprocess instead of connecting to the hosted endpoint:

Stdio config (any MCP-compatible agent):
{
  "mcpServers": {
    "draftlift": {
      "command": "npx",
      "args": ["-y", "@draftlift/mcp"],
      "env": {
        "DRAFTLIFT_API_KEY": "<your-api-key>"
      }
    }
  }
}

Local (HTTP)

Run the MCP server locally with HTTP transport:

npx @draftlift/mcp --transport http --port 3100 --api-key dl_live_...

Then point your agent to http://localhost:3100/mcp.

CLI Commands

All commands follow the pattern dl <resource> <verb>. Top-level shortcuts exist for common actions.

dl generate

Generate content for a platform.

dl generate "Write a thread about AI productivity" --platform x
dl generate "Launch announcement" --platform linkedin --template "Product Launch"
dl generate "..." --platform x --async
dl generate "..." --platform x --dry-run
dl generate "..." --platform x --json

dl repurpose

Repurpose existing content to a new platform or template.

dl repurpose <content-id> --platform linkedin
dl repurpose <content-id> --template "Blog Post" --dry-run

dl content list

List your content items.

dl content list
dl content list --platform x --status published --json

dl content get

Get a single content item by ID.

dl content get <content-id>
dl content get <content-id> --json

dl score

Score content quality against platform rubrics.

dl score <content-id>
dl score <content-id> --json

dl templates list

Browse available templates.

dl templates list
dl templates list --platform x
dl templates list --json

dl platforms list

List all supported platforms.

dl platforms list
dl platforms list --json

dl memories add

Add a writing preference or brand voice memory.

dl memories add --platform x --content "Prefers casual tone"
dl memories list

dl references add

Add reference material.

dl references add --url https://example.com/article
dl references add --text "Key talking points..." --title "Brand Guide"
dl references list

dl workspace

Manage workspaces.

dl workspace list
dl workspace use "My Agency"

dl schedule

Schedule content for publication.

dl schedule <content-id> --date 2026-04-01 --time 09:00
dl schedule list

dl usage

Check API usage and quotas.

dl usage
dl usage --json

dl status

Check job status (for async generation).

dl status <job-id>
dl status <job-id> --json

dl setup

Configure Draft Lift for your AI coding agent.

dl setup --claude --mcp
dl setup --claude --cli
dl setup --cursor
dl setup --vscode

dl login / dl whoami / dl logout

Authenticate via browser OAuth.

dl login
dl login --no-browser
dl whoami
dl logout

Global Options

FlagDescription
--jsonOutput as JSON (includes schema_version and trace_id)
--yesSkip all confirmation prompts
--verboseShow HTTP method, URL, status, and timing
--debugShow full HTTP request/response headers and bodies
--dry-runPreview what a command will do without executing (available on generate, repurpose, schedule, delete)

Exit Codes

CodeMeaning
0Success
1User error (invalid flags, missing required args)
2Auth error (expired key, not logged in)
3Server error
4Not found