MCP server for FileToPDF — convert files, HTML & Markdown to PDF from any MCP client
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
本地运行
claude mcp add filetopdf --env FILETOPDF_API_KEY='<FILETOPDF_API_KEY>' -- npx -y filetopdf-mcp~/.codex/config.toml
[mcp_servers.filetopdf]
command = "npx"
args = ["-y", "filetopdf-mcp"]
env = { FILETOPDF_API_KEY = "<FILETOPDF_API_KEY>" }
# codex mcp add filetopdf --env FILETOPDF_API_KEY='<FILETOPDF_API_KEY>' -- npx -y filetopdf-mcp~/.cursor/mcp.json
{
"mcpServers": {
"filetopdf": {
"command": "npx",
"args": [
"-y",
"filetopdf-mcp"
],
"env": {
"FILETOPDF_API_KEY": "<FILETOPDF_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"filetopdf": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"filetopdf-mcp"
],
"env": {
"FILETOPDF_API_KEY": "<FILETOPDF_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"filetopdf": {
"command": "npx",
"args": [
"-y",
"filetopdf-mcp"
],
"env": {
"FILETOPDF_API_KEY": "<FILETOPDF_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"filetopdf": {
"command": "npx",
"args": [
"-y",
"filetopdf-mcp"
],
"env": {
"FILETOPDF_API_KEY": "<FILETOPDF_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"filetopdf": {
"command": "npx",
"args": [
"-y",
"filetopdf-mcp"
],
"env": {
"FILETOPDF_API_KEY": "<FILETOPDF_API_KEY>"
}
}
}
}远程托管
claude mcp add --transport http filetopdf https://api.filetopdf.dev/mcp --header 'x-api-key: <X_API_KEY>'~/.codex/config.toml
[mcp_servers.filetopdf]
url = "https://api.filetopdf.dev/mcp"
http_headers = { x-api-key = "<X_API_KEY>" }
# codex mcp add filetopdf --url https://api.filetopdf.dev/mcp~/.cursor/mcp.json
{
"mcpServers": {
"filetopdf": {
"url": "https://api.filetopdf.dev/mcp",
"headers": {
"x-api-key": "<X_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"filetopdf": {
"type": "http",
"url": "https://api.filetopdf.dev/mcp",
"headers": {
"x-api-key": "<X_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"filetopdf": {
"httpUrl": "https://api.filetopdf.dev/mcp",
"headers": {
"x-api-key": "<X_API_KEY>"
}
}
}
}claude_desktop_config.json · Customize › Connectors › Add custom connector
{
"mcpServers": {
"filetopdf": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.filetopdf.dev/mcp",
"--header",
"x-api-key:<X_API_KEY>"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"filetopdf": {
"url": "https://api.filetopdf.dev/mcp",
"headers": {
"x-api-key": "<X_API_KEY>"
}
}
}
}需要的环境变量
FILETOPDF_API_KEY
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。