# DocRaptor MCP for AI Agents AI Agent Connect

> DocRaptor MCP converts HTML and URLs into professional PDFs and Excel spreadsheets using the high-quality Prince XML engine. It handles complex CSS layouts, headers, footers, and page numbers to ensure your documents look perfect. Use it to automate high-fidelity exports for invoices, reports, and data tables directly from your AI client.

## Overview
- **Category:** productivity
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_vDbOvmZVHUH41RF0iFLoLXNwrKJcpkFRea6HC5GB/ai-agent-connect
- **Tags:** pdf-generation, excel-export, html-to-pdf, princexml, document-automation

## Description

This Connector lets you turn web content into production-ready documents without the usual layout headaches. If you've ever tried to print a webpage and ended up with a mess of broken lines and overlapping text, this is the fix. It uses the Prince XML engine to ensure that your CSS actually renders the way it's supposed to, making it the go-to choice for anyone needing pixel-perfect PDFs or Excel spreadsheets. You can feed it raw HTML strings or just point it at a public URL, and it handles the heavy lifting of rendering the file. It even manages the hosting for you, giving you a temporary link to share immediately instead of forcing you to manage your own storage buckets. When you find this in the Vinkius catalog, you're getting a way to bridge the gap between your AI's ability to generate content and your need for a professional, shareable file. It's great for turning a long, messy chat history into a clean report or a dynamic dashboard into a static PDF for a client who won't look at your app.

## Tools

### create_document
Create a PDF or Excel document from HTML. Use the hosted flag to get a shareable link instead of a large file response.

### get_document_status
Check if an asynchronous document is finished. This is useful for large files that take a few seconds to render.

### list_documents
See a list of your past documents. Use this to keep track of what you've already generated.

### list_ips
Get the IP addresses used by DocRaptor. This helps you whitelist the service to fetch assets from your private servers.

## Prompt Examples

**Prompt:** 
```
Can you turn this website into a PDF for me?
```

**Response:** 
```
I've started converting that page. Since it's a complex layout, I'm using the high-quality rendering engine. You can download your hosted PDF here: **[Link]**
```

**Prompt:** 
```
I need the data from this table in an Excel sheet.
```

**Response:** 
```
I've converted that table into a formatted Excel spreadsheet for you. You can download the **.xlsx** file here: **[Link]**
```

**Prompt:** 
```
Check if my last big report is ready yet.
```

**Response:** 
```
I checked the status of that async job. The 50-page report is finished and ready for download. You can grab it here: **[Link]**
```

## Capabilities

### Create PDFs from URLs
Generate a PDF from a public website link with full CSS support.

### Export data to Excel
Turn HTML tables into downloadable XLS or XLSX files for your spreadsheets.

### Track background jobs
Check the progress of large document renders using async flags.

### Get hosted download links
Receive a temporary URL for your files instead of a raw binary response.

### Fetch allowed IP addresses
Retrieve specific IPs to enable secure asset loading from your own servers.

### Manage document history
See a list of your previously generated files to keep your workspace organized.

## Use Cases

### Automating client invoices
An agent takes a customer's billing data and uses create_document to turn an HTML template into a polished PDF invoice.

### Turning dashboards into reports
A manager asks the agent to turn a live web dashboard into a PDF report for a board meeting using a public URL.

### Exporting data tables to spreadsheets
A data analyst asks the agent to grab a table from a website and convert it into a formatted Excel file for analysis.

### Whitelisting for private assets
A developer uses list_ips to get the necessary addresses to allow the rendering engine to fetch images from a private server.

## Benefits

- Get pixel-perfect CSS rendering because DocRaptor uses the Prince XML engine for every file.
- Save on storage costs by using the hosted flag with create_document to get temporary download links.
- Handle massive files without crashing your AI client by using get_document_status for async jobs.
- Simplify asset fetching by getting the correct IP addresses from list_ips for your firewall.
- Automate complex layouts including headers, footers, and page numbers that standard PDF libraries often break.
- Export data directly to XLS or XLSX formats using create_document to make your AI's output more usable.

## How It Works

The bottom line is you get professional, print-ready documents from any web content without touching a single line of rendering code.

1. Add your DocRaptor API key to your AI client.
2. Give your agent an HTML string or a URL to convert.
3. Receive a hosted link or a direct download for your new PDF or Excel file.

## Frequently Asked Questions

**Can DocRaptor MCP handle complex CSS?**
Yes, it uses the Prince XML engine which is specifically designed to render complex CSS, headers, and footers accurately.

**Does DocRaptor MCP support Excel?**
It can convert HTML content into both XLS and XLSX files, making it great for data exports.

**How do I get a link to my PDF?**
You can use the hosted flag when creating a document to get a temporary URL instead of a direct file download.

**Can I use it for public URLs?**
Yes, you can provide a public URL to the Connector, and it will render the content into a PDF for you.

**What if my images aren't showing up?**
You can use the tool to get the specific IP addresses used by the service and whitelist them in your firewall.

**Is there a limit on document size?**
For large documents, you should use the async processing option to avoid timing out your AI client.

**Can I list my previous documents?**
Yes, the Connector includes a tool to list all the documents you've generated in your account.

**Can I generate a test document without using my document balance?**
Yes! When calling the `create_document` tool, set the `test` parameter to `true`. This creates a free, watermarked document for testing your layout.

**How do I handle very large HTML files that take a long time to render?**
Use the `async` parameter in `create_document`. The tool will return a `status_id`, which you can then use with `get_document_status` to check when the file is ready for download.

**Can I get a direct URL to share the generated document?**
Yes, by setting the `hosted` parameter to `true` in the `create_document` tool. DocRaptor will host the file and return a `download_url` that you can share.