# Urlbox MCP

> Urlbox lets your AI client capture any public website as a high-fidelity screenshot, PDF, or raw image. It handles responsive layouts and dynamic content using a cloud API, letting you generate visual proofs or archive articles with simple commands.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** screenshot-api, pdf-generation, web-rendering, html-to-image, automation, headless-browser

## Description

You're gonna use this server when your AI client needs to grab assets from a webpage—any public website. It lets you bypass manual browser work; instead, your agent handles all the heavy lifting using a cloud API backend.

**PDF Conversion**: When you need an entire site archived, `capture_pdf` takes any given URL and spits out a downloadable PDF file. You can turn a live webpage into a formatted document that's ready to share.

**Screenshot Capture**: For quick visuals, `capture_png` grabs a simple PNG screenshot of the whole public URL. If you need something else—like JPG, WebP, or SVG formats—the agent handles it through standard capture functions. These tools ensure your screenshots are high-fidelity and responsive to tricky layouts.

**Selective Element Rendering**: Sometimes you only care about one part of a page, like a pricing table or a specific chart. You can use `render_selector` with a CSS selector to pinpoint and grab *just* that visual output, ignoring everything else on the page. This is huge for testing components.

**Raw HTML Visualization**: If you're dealing with raw code and need to see what it looks like visually—maybe for style testing or asset creation—you use `render_html`. It takes unlinked HTML code and renders it directly into an image file so you can eyeball the output.

**Asynchronous Web Rendering**: When a page is massive or complex, rendering takes time. You don't wanna wait around. Use `render_async` to kick off a render job for a URL; your agent then waits for the completion result and gets notified later via a webhook. For instant results on smaller pages, you use `render_sync`, which returns the image or PDF right away.

**Account & Usage Monitoring**: Your agent keeps track of what's going down with this server. You can check your credit balance and see how many credits you've already used by running `get_credit_usage`. To get basic info on the Urlbox account profile, use `get_account_info`. If you need to know which webhooks are set up or active, run `list_webhooks`.

**System Status**: The server gives you deep visibility into its operations. You can check if a long-running background rendering job has finally finished processing the URL by calling `get_render_status`. If you need to know what proxy locations are available for rendering, run `list_proxies`. To see where your rendered assets are stored, use `list_storage_buckets`.

## Tools

### capture_pdf
Turns a specified URL into a comprehensive, downloadable PDF file.

### capture_png
Grabs a simple PNG screenshot of an entire public URL.

### get_account_info
Retrieves basic details about your Urlbox account profile.

### get_credit_usage
Checks how many credits you've used and what your current balance is.

### get_render_status
Checks if a background rendering job has finished processing the URL.

### list_proxies
Shows you a list of active proxy locations available for rendering.

### list_storage_buckets
Lists all the storage buckets where your rendered assets are kept.

### list_webhooks
Retrieves a list of webhooks that are currently active on your account.

### render_async
Starts a rendering job for a URL and sends the completion result to a webhook later.

### render_html
Renders raw, unlinked HTML code into an image format for testing purposes.

### render_selector
Captures only the visual output of a specific element defined by a CSS selector on a URL.

### render_sync
Renders and returns the image or PDF result immediately for a given URL.

## Prompt Examples

**Prompt:** 
```
Take a high-quality screenshot of 'https://vinkius.com'.
```

**Response:** 
```
Screenshot captured! I've rendered 'https://vinkius.com' as a high-quality PNG. You can view or download the image here: [Render URL]. Shall I convert this page to PDF as well?
```

**Prompt:** 
```
Convert the article at 'https://example.com/blog/1' to an A4 PDF.
```

**Response:** 
```
Conversion successful! I've generated an A4 PDF for the provided URL. Here is your download link: [PDF URL]. Is there anything else you'd like to capture?
```

**Prompt:** 
```
Capture only the element '#pricing-table' from 'https://mysaas.com'.
```

**Response:** 
```
Selective render complete! I've captured only the element matching '#pricing-table' from 'https://mysaas.com'. Here is the cropped image: [Element URL].
```

## Capabilities

### PDF Conversion
Converts an entire live webpage into a formatted PDF document.

### Screenshot Capture
Takes instant, high-resolution screenshots of any given URL in PNG, JPG, WebP, or SVG formats.

### Selective Element Rendering
Uses CSS selectors to render and capture only a specific part of a page's content, ignoring the rest.

### Raw HTML Visualization
Renders raw HTML code directly into an image file for visual testing or asset creation.

### Asynchronous Web Rendering
Starts a long-running render job and sends the result to a designated webhook later.

### Account & Usage Monitoring
Retrieves your credit balance, account details, or list of active webhooks.

## Use Cases

### A Developer needs to test responsive layouts.
The developer runs into a problem: the site looks fine on desktop but breaks on mobile. They ask their agent to run `capture_png` on the URL, specifying different viewport sizes. The agent returns multiple PNGs so they can visually compare and fix the layout issue.

### A Marketer needs visual proof for a paid ad.
The marketer has a complex landing page with many sections. Instead of taking a massive, messy screenshot, they ask their agent to use `render_selector` on the 'Call-to-Action' box only. The agent runs this and returns a clean, cropped image perfect for an ad creative.

### An Archivist needs a complete backup of a research article.
The archivist finds an important online guide that might change anytime. They instruct their agent to use `capture_pdf` on the URL, requesting A4 format. The agent processes the entire page and provides one stable PDF download.

### A DevOps engineer needs to render a code snippet.
The engineer has raw HTML/CSS they need to visualize for a client presentation but doesn't want to run it locally. They use `render_html` via the agent, which outputs an image showing exactly how the coded element will look.

## Benefits

- You get instant, multi-format screenshots. Instead of just PNGs, you can request JPG, WebP, or SVG captures using `capture_png`, giving you more options for different ad platforms.
- Archiving is simple. Use `capture_pdf` to turn entire articles into a standardized A4 PDF in one step. No need to print the page and scan it manually.
- You don't have to capture everything. If you only want the pricing table, use `render_selector`. Your agent grabs *only* that element, making your output clean and focused.
- The API handles complex jobs in the background. Need a render for a long-running task? Use `render_async`, set up your webhook, and check back later with `get_render_status`.
- Test code without opening a browser. If you've got raw HTML, use `render_html`. Your agent renders it instantly as an image so you can see if the styles are working right.
- You always know your usage limits. Use `get_credit_usage` to check your balance before running expensive batch jobs.

## How It Works

The bottom line is that you tell your AI client what web content you need, and it handles calling the right function to get you the file or image.

1. First, subscribe to the server and provide your Urlbox API Key in your agent's configuration.
2. Next, instruct your AI client (e.g., 'Convert this URL to an A4 PDF.')
3. The agent calls the appropriate tool (`capture_pdf`), which communicates with the cloud API and returns a downloadable asset link.

## Frequently Asked Questions

**How does the `capture_pdf` tool handle different page sizes like A4 or Letter?**
The `capture_pdf` tool allows you to specify custom page dimensions when making the call. You pass the desired size (e.g., A4, letter) as a parameter, ensuring your document fits the right standard.

**What’s the difference between `render_sync` and `render_async`?**
`render_sync` is for quick jobs; it renders and gives you the result immediately. Use `render_async` if the page is large or complex, as it starts a background job that saves resources and sends results to a webhook later.

**Can I only capture one element with `render_selector`?**
It's designed for single elements defined by a CSS selector. If you need multiple, you might need to run several calls or manually combine the results in your workflow.

**How do I check my credit balance using `get_credit_usage`?**
You simply instruct your agent to call `get_credit_usage`. The tool returns a JSON object containing your current usage statistics and remaining credits, letting you manage costs before running large jobs.

**I ran a complex capture job; how do I check if it's finished using the `get_render_status` tool?**
You provide the unique Job ID received after starting the render. The tool checks the backend status, returning success or failure details immediately. This lets your agent wait for long-running tasks without needing to constantly poll.

**Before I run `capture_png`, how do I check which geographic proxies are available using the `list_proxies` tool?**
This tool lists all proxy endpoints your account has access to. Use this when your target website blocks requests from standard IP ranges, ensuring you get geo-specific screenshots.

**If I use `render_async`, how do I guarantee the results are delivered automatically?**
You must set up a webhook endpoint first. When running `render_async`, the server sends the final result directly to your specified URL. This is better than polling, especially for large batches or complex reports.

**When should I use `get_account_info`? Does it confirm my API key is valid?**
You call this first to verify your connection details and profile. It confirms that the MCP server has access to the correct account level, which prevents authentication errors before you start capturing.

**Can I capture only a specific part of a webpage?**
Yes! Use the `render_selector` tool. Provide the URL and the CSS selector (e.g., #my-chart) to capture only that specific element instead of the whole page.

**How do I see how many credits I have left?**
Run the `get_credit_usage` query. Your agent will retrieve your current credit balance and monthly rendering metrics directly from Urlbox.

**Can this tool convert a URL directly to PDF?**
Absolutely. Use the `capture_pdf` tool by providing the URL. You can also specify an optional page size like 'A4' or 'Letter'.