← Back to Draft Lift

MCP & CLI Documentation

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

Quick Start

Connect your AI agent to the hosted MCP server. Create an API key in Settings, then run:

claude mcp add --scope user \
  --header "Authorization: Bearer <your-api-key>" \
  --transport http \
  draftlift https://api.draftliftai.com/mcp

Using another agent? See MCP Setup.

Installation

Hosted MCP server

No install required. Point your agent at https://api.draftliftai.com/mcp.

CLI

npm install -g @draftlift/cli
dl --help

Requires Node.js 20 or later. Installs the dl command (also available as draftlift).

Requirements

  • A Draft Lift plan that includes API access, which API keys and the CLI need. Compare plans

Authentication

API key (hosted MCP)

Generate an API key in Settings and send it as a bearer token. The snippets under MCP Setup include this header:

Authorization: Bearer dl_live_...

CLI

Sign in with your browser or an API key:

dl login               # Opens browser for OAuth
dl login --no-browser  # Prints URL to paste manually
export DRAFTLIFT_API_KEY=dl_live_...
dl whoami              # Verify

Or save an existing key: dl login --api-key dl_live_...

MCP Setup

Add the hosted server to your agent. Replace <your-api-key> with your API key.

Claude Code

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

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": {
      "type": "http",
      "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>"
      }
    }
  }
}

Reference Inputs

Save reviewed text with the CLI's --content or --stdin options. CLI URL references store the URL string without fetching the page. Hosted MCP attempts web-page extraction in URL mode; inspect the saved result before using it.

Native PDF and document upload are unavailable. An agent or Codex can extract text outside Draft Lift, review it, and save that text. Saving a reference does not prove a draft used it; choose references in a surface that supports explicit selection.

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 "LinkedIn Post"
dl generate "..." --platform x --async
dl generate "..." --platform x --dry-run
dl generate "..." --platform x --json

dl repurpose

Repurpose an existing draft for a destination format.

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

dl content list

List your content items.

dl content list
dl content list --platform x --status generated --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 --content "Key talking points..." --title "Brand Guide"
dl references list

dl workspace

Manage workspaces.

dl workspace list
dl workspace use "My Agency"

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, delete)

Exit Codes

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