MCP Server Studio

Leafwright MCP server

Render HTML, URLs, and templates to PDF. AI drafts templates and fixes them from logs.

Registry name: co.leafwright/leafwright

Publisher
leafwright.co
Runs
Local or hosted
Package
npm
Version
0.2.4
Category
Browser & scraping
Updated
2026-09-08

Source code on GitHub

Set up Leafwright (run locally)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "leafwright": {
      "command": "npx",
      "args": [
        "-y",
        "@leafwright/mcp@0.2.4"
      ],
      "env": {
        "LEAFWRIGHT_API_KEY": "<LEAFWRIGHT_API_KEY>",
        "LEAFWRIGHT_MCP_TOKEN": "<LEAFWRIGHT_MCP_TOKEN>",
        "LEAFWRIGHT_PROJECT_ID": "<LEAFWRIGHT_PROJECT_ID>",
        "LEAFWRIGHT_MCP_READ_ONLY": "<LEAFWRIGHT_MCP_READ_ONLY>"
      }
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add leafwright -e LEAFWRIGHT_API_KEY='<LEAFWRIGHT_API_KEY>' -e LEAFWRIGHT_MCP_TOKEN='<LEAFWRIGHT_MCP_TOKEN>' -e LEAFWRIGHT_PROJECT_ID='<LEAFWRIGHT_PROJECT_ID>' -e LEAFWRIGHT_MCP_READ_ONLY='<LEAFWRIGHT_MCP_READ_ONLY>' -- npx -y @leafwright/mcp@0.2.4

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "leafwright": {
      "command": "npx",
      "args": [
        "-y",
        "@leafwright/mcp@0.2.4"
      ],
      "env": {
        "LEAFWRIGHT_API_KEY": "<LEAFWRIGHT_API_KEY>",
        "LEAFWRIGHT_MCP_TOKEN": "<LEAFWRIGHT_MCP_TOKEN>",
        "LEAFWRIGHT_PROJECT_ID": "<LEAFWRIGHT_PROJECT_ID>",
        "LEAFWRIGHT_MCP_READ_ONLY": "<LEAFWRIGHT_MCP_READ_ONLY>"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "leafwright": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@leafwright/mcp@0.2.4"
      ],
      "env": {
        "LEAFWRIGHT_API_KEY": "<LEAFWRIGHT_API_KEY>",
        "LEAFWRIGHT_MCP_TOKEN": "<LEAFWRIGHT_MCP_TOKEN>",
        "LEAFWRIGHT_PROJECT_ID": "<LEAFWRIGHT_PROJECT_ID>",
        "LEAFWRIGHT_MCP_READ_ONLY": "<LEAFWRIGHT_MCP_READ_ONLY>"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "leafwright": {
      "command": "npx",
      "args": [
        "-y",
        "@leafwright/mcp@0.2.4"
      ],
      "env": {
        "LEAFWRIGHT_API_KEY": "<LEAFWRIGHT_API_KEY>",
        "LEAFWRIGHT_MCP_TOKEN": "<LEAFWRIGHT_MCP_TOKEN>",
        "LEAFWRIGHT_PROJECT_ID": "<LEAFWRIGHT_PROJECT_ID>",
        "LEAFWRIGHT_MCP_READ_ONLY": "<LEAFWRIGHT_MCP_READ_ONLY>"
      }
    }
  }
}

Set up Leafwright (hosted url)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "leafwright": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://leafwright.co/mcp"
      ]
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add --transport http leafwright https://leafwright.co/mcp

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "leafwright": {
      "url": "https://leafwright.co/mcp"
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "leafwright": {
      "type": "http",
      "url": "https://leafwright.co/mcp"
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "leafwright": {
      "serverUrl": "https://leafwright.co/mcp"
    }
  }
}

Settings

NameRequiredWhat it is
LEAFWRIGHT_API_KEYNoProject API key (lw_live_… or lw_test_…) for server automation. Optional — the server can also authenticate through a browser login.
LEAFWRIGHT_MCP_TOKENNoMCP token (mcp_…) for non-interactive setups.
LEAFWRIGHT_PROJECT_IDNoOverride the active default project.
LEAFWRIGHT_MCP_READ_ONLYNoSet to true to expose only read tools — no renders, template writes, or AI.

More browser & scraping MCP servers