Render HTML, URLs, and templates to PDF. AI drafts templates and fixes them from logs.
Setup
Choose your client, copy the config, then fill in any required environment variables.
Local
claude mcp add leafwright --env LEAFWRIGHT_API_KEY='<LEAFWRIGHT_API_KEY>' --env LEAFWRIGHT_MCP_TOKEN='<LEAFWRIGHT_MCP_TOKEN>' -- npx -y @leafwright/mcp~/.codex/config.toml
[mcp_servers.leafwright]
command = "npx"
args = ["-y", "@leafwright/mcp"]
env = { LEAFWRIGHT_API_KEY = "<LEAFWRIGHT_API_KEY>", LEAFWRIGHT_MCP_TOKEN = "<LEAFWRIGHT_MCP_TOKEN>" }
# codex mcp add leafwright --env LEAFWRIGHT_API_KEY='<LEAFWRIGHT_API_KEY>' --env LEAFWRIGHT_MCP_TOKEN='<LEAFWRIGHT_MCP_TOKEN>' -- npx -y @leafwright/mcp~/.cursor/mcp.json
{
"mcpServers": {
"leafwright": {
"command": "npx",
"args": [
"-y",
"@leafwright/mcp"
],
"env": {
"LEAFWRIGHT_API_KEY": "<LEAFWRIGHT_API_KEY>",
"LEAFWRIGHT_MCP_TOKEN": "<LEAFWRIGHT_MCP_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"leafwright": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@leafwright/mcp"
],
"env": {
"LEAFWRIGHT_API_KEY": "<LEAFWRIGHT_API_KEY>",
"LEAFWRIGHT_MCP_TOKEN": "<LEAFWRIGHT_MCP_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"leafwright": {
"command": "npx",
"args": [
"-y",
"@leafwright/mcp"
],
"env": {
"LEAFWRIGHT_API_KEY": "<LEAFWRIGHT_API_KEY>",
"LEAFWRIGHT_MCP_TOKEN": "<LEAFWRIGHT_MCP_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"leafwright": {
"command": "npx",
"args": [
"-y",
"@leafwright/mcp"
],
"env": {
"LEAFWRIGHT_API_KEY": "<LEAFWRIGHT_API_KEY>",
"LEAFWRIGHT_MCP_TOKEN": "<LEAFWRIGHT_MCP_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"leafwright": {
"command": "npx",
"args": [
"-y",
"@leafwright/mcp"
],
"env": {
"LEAFWRIGHT_API_KEY": "<LEAFWRIGHT_API_KEY>",
"LEAFWRIGHT_MCP_TOKEN": "<LEAFWRIGHT_MCP_TOKEN>"
}
}
}
}Remote
claude mcp add --transport http leafwright https://leafwright.co/mcp~/.codex/config.toml
[mcp_servers.leafwright]
url = "https://leafwright.co/mcp"
# codex mcp add leafwright --url https://leafwright.co/mcp~/.cursor/mcp.json
{
"mcpServers": {
"leafwright": {
"url": "https://leafwright.co/mcp"
}
}
}.vscode/mcp.json
{
"servers": {
"leafwright": {
"type": "http",
"url": "https://leafwright.co/mcp"
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"leafwright": {
"httpUrl": "https://leafwright.co/mcp"
}
}
}claude_desktop_config.json · Customize › Connectors › Add custom connector
{
"mcpServers": {
"leafwright": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://leafwright.co/mcp"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"leafwright": {
"url": "https://leafwright.co/mcp"
}
}
}Environment variables
LEAFWRIGHT_API_KEYLEAFWRIGHT_MCP_TOKEN
Replace the placeholders with your own credentials and keep them out of version control.