ماذا يمكنك أن تفعل مع io.github.html2pdfconverter/mcp-server؟
generate_pdf: Converts a URL or raw HTML string into a PDF and saves it to a temporary file, returning the file path.
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
@html2pdfconverter/mcp-serverclaude mcp add io-github-html2pdfconverter-mcp-server -e 'YOUR_API_KEY=<your your_api_key>' -- npx -y @html2pdfconverter/mcp-server@1.0.5
{
"mcpServers": {
"io-github-html2pdfconverter-mcp-server": {
"command": "npx",
"args": [
"-y",
"@html2pdfconverter/mcp-server@1.0.5"
],
"env": {
"YOUR_API_KEY": "<your your_api_key>"
}
}
}
}
متغيرات البيئة
YOUR_API_KEYإلزامي سري Your API key for the service
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
HTML2PDF Converter MCP Server
An MCP (Model Context Protocol) server for HTML2PDF Converter. This server exposes a generate_pdf tool, allowing AI models like Claude, Cursor, and others to seamlessly convert HTML or URLs to PDF documents on your behalf.
Requirements
- Node.js >= 18
- An HTML2PDF Converter API Key (get one at https://html2pdfconverter.com)
Usage
You can run this MCP server directly via npx in any MCP-compatible client.
Claude Desktop Configuration
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"html2pdf": {
"command": "npx",
"args": ["-y", "@html2pdfconverter/mcp-server"],
"env": {
"HTML2PDF_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Cursor Configuration
In Cursor, go to Settings > MCP Servers and add a new server:
- Type: command
- Command:
npx -y @html2pdfconverter/mcp-server - Environment Variables:
HTML2PDF_API_KEY=YOUR_API_KEY_HERE
Available Tools
generate_pdf: Converts a URL or raw HTML string into a PDF and saves it to a temporary file, returning the file path.
Development
# Install dependencies
npm install
# Build
npm run build
# Run locally (requires HTML2PDF_API_KEY env var)
HTML2PDF_API_KEY=your_key npm start
الأسئلة الشائعة
ما هو io.github.html2pdfconverter/mcp-server؟
MCP server for HTML2PDF Converter
كيف أثبّت io.github.html2pdfconverter/mcp-server؟
يعمل على جهازك. في Claude Code: claude mcp add io-github-html2pdfconverter-mcp-server -e 'YOUR_API_KEY=<your your_api_key>' -- npx -y @html2pdfconverter/mcp-server@1.0.5. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج io.github.html2pdfconverter/mcp-server إلى مفتاح API؟
نعم. يتطلب YOUR_API_KEY، وتضبطها في إعداداته.
هل io.github.html2pdfconverter/mcp-server مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون io.github.html2pdfconverter/mcp-server؟
ينشره html2pdfconverter. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.