# Restpack MCP for AI Agents AI Agent Connect

> Restpack lets your AI agent turn any live URL or raw HTML into high-quality PDFs and screenshots. It handles full CSS rendering, custom layouts, and media emulation so the final document looks exactly like the live site. You can also generate browser mockups from images or add passwords and encryption to your files. It's the bridge between a live web page and a professional, shareable document.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_alqz6YW08rB7Oo3fwGybPimVT74yAeYxV7vxvQVe/ai-agent-connect
- **Tags:** html-to-pdf, screenshots, browser-automation, pdf-generation, web-capture

## Description

This Connector gives your AI agent the ability to see the web the way a real browser does. When you ask your agent to grab a page, it renders the full CSS, handles the media types, and produces a clean, professional document you can actually use. If you're a developer, you can have your agent generate technical docs or UI test screenshots on the fly. If you're in marketing, you can get high-fidelity previews of your website without opening a browser. You just tell your agent what you need, and it handles the heavy lifting of rendering and capturing. It's one of the many ways the Vinkius catalog makes it easier to connect your AI to real-world web actions.

You no longer have to worry about broken layouts or missing images that happen when you try to save a page manually. The output is consistent and high-quality. You can control the fine details of the result, like page orientation, margins, and custom CSS injections. This means you can tailor the document to your specific needs before it's even generated. For sensitive projects, you can even add passwords and encryption to the resulting files. It turns a simple prompt into a professional production tool for archiving, testing, and design. It handles the technical details of media emulation and layout control so you can focus on the content.

## Tools

### get_usage
Shows your current API usage statistics to help you monitor your account. You can ask your agent to check your limits at any time.

### capture_screenshot
Takes a screenshot of a web page and returns a CDN URL. This lets you grab full-page views of your app automatically.

### convert_html_to_pdf
Turns a live URL or HTML string into a high-quality PDF file. It handles full CSS rendering to ensure the layout stays intact.

### create_browser_mockup
Converts a standard image into a browser-style mockup for design previews. This is great for showing clients how a site will look.

## Prompt Examples

**Prompt:** 
```
Convert https://example.com to an A4 PDF in landscape.
```

**Response:** 
```
I've generated the PDF for you. You can download it here: **[Restpack_Capture.pdf](https://restpack.io/cdn/sample.pdf)**

Here are the details:
- **Format:** PDF
- **Orientation:** Landscape
- **Page Size:** A4
```

**Prompt:** 
```
Take a full-page PNG screenshot of the homepage.
```

**Response:** 
```
Captured successfully. View your full-page image here: **[Screenshot.png](https://restpack.io/cdn/sample.png)**

I've captured the entire scrollable area to ensure nothing was cut off.
```

**Prompt:** 
```
Convert this HTML to a PDF: '<h1>Report</h1><p>Generated by AI</p>'
```

**Response:** 
```
The HTML content has been converted to a PDF document. Access it here: **[Document.pdf](https://restpack.io/cdn/sample.pdf)**

Your custom HTML is now a shareable file.
```

## Capabilities

### Convert URLs to high-quality PDFs
Turn live websites or HTML strings into clean PDF documents with full CSS support.

### Capture full-page screenshots
Get full-page or specific element captures in PNG, JPG, or PDF formats.

### Create browser mockups
Turn static images into polished browser-style mockups for design previews.

### Inject custom CSS and JS
Modify the page style or behavior before the final document is rendered.

### Secure PDF documents
Add passwords and encryption to your generated PDF files for professional use.

### Control media emulation
Switch between screen and print styles to ensure the document looks exactly right.

## Use Cases

### Archiving live news for offline use
A researcher asks their agent to save a complex news page as a landscape PDF. The agent uses convert_html_to_pdf to preserve the layout perfectly for later reading.

### Automating UI bug reports
A developer wants a visual of a bug. They ask the agent to take a full-page screenshot of the login page using capture_screenshot to attach to a ticket.

### Generating social media previews
A marketing manager asks the agent to convert a landing page HTML snippet into a PDF to see how it looks as a shared document.

### Creating design mockups from wireframes
A designer uploads a wireframe image and asks the agent to create a browser mockup so they can show the client a realistic web preview.

## Benefits

- Get perfect PDF layouts every time because convert_html_to_pdf supports full CSS rendering and custom page sizes.
- Save time on UI testing by using capture_screenshot to grab full-page views of your app automatically.
- Create professional design assets instantly with create_browser_mockup to turn flat images into polished mockups.
- Secure your sensitive documents by adding passwords or encryption directly through the PDF generation flow.
- Ensure accurate previews by switching between print and screen media types to match exactly how a user sees your site.

## How It Works

The bottom line is your AI agent handles the rendering while you just get the final file.

1. Connect your Restpack API token to your AI client.
2. Provide the agent with a URL or a block of HTML code.
3. Receive a CDN link to download your finished PDF or screenshot.

## Frequently Asked Questions

**Can Restpack handle complex CSS on a live website?**
Yes, it renders full CSS so your PDFs look like the actual website. It handles the heavy lifting of layout rendering for you.

**Is it possible to add passwords to the PDFs I generate with Restpack?**
Yes, you can add passwords and encryption to your generated files. This makes it great for sharing sensitive documents securely.

**Does Restpack support full-page screenshots?**
Yes, it can capture the entire page or just a specific viewport. You can choose the format, like PNG or JPG, depending on your needs.

**Can I turn a simple image into a browser mockup with Restpack?**
Yes, it has a tool specifically for converting images into browser-style mockups. This is perfect for design previews and client presentations.

**How do I check my API usage limits with Restpack?**
You can simply ask your AI agent to check your usage statistics. It will pull the latest data from your account so you can monitor your balance.

**Can I convert a live URL directly to a PDF document?**
Yes! Use the `convert_html_to_pdf` tool and provide the `url`. You can also specify page size (like 'A4') and orientation.

**Is it possible to capture a screenshot of just a specific element on a page?**
Absolutely. Use the `capture_screenshot` tool with `mode: 'element'` and provide the CSS selector in the `element_selector` field.

**Can I add a password to protect the generated PDF files?**
Yes. The `convert_html_to_pdf` tool includes `user_password` and `owner_password` options to encrypt and secure your documents.