Render HTML, URLs, and templates to PDF. AI drafts templates and fixes them from logs.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
本地运行
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>"
}
}
}
}远程托管
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"
}
}
}需要的环境变量
LEAFWRIGHT_API_KEYLEAFWRIGHT_MCP_TOKEN
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。