# Lorem Picsum MCP

> Lorem Picsum delivers placeholder images and associated metadata directly to your AI agent. You can generate random URLs with specific dimensions, fetch details for specific assets by ID, or list entire collections of available photos. This server lets your AI client retrieve image information—including author credits and original size—without you ever leaving your code editor or chat window.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** placeholder-images, stock-photos, ui-design, mockups, image-api

## Description

You're working on a UI mockup, but you don't want to leave your editor or chat window to download some placeholder photos. This server gives your AI agent direct access to a massive library of image URLs and all their associated metadata. You can get everything you need for visual assets right where you are.

**Generating Images On Demand**

Need an image? Use `get_random_image_url` to generate a URL instantly. With this tool, you don't just get *an* image; you control the output. You can specify the exact width and height you want. Plus, you can mess with the look—you can apply blur effects or force grayscale filtering. It even lets you pick the format, whether it needs to be JPG or WebP.

For testing something that has to look identical every single time, use `get_seed_image_url`. This function takes a seed string and spits out an image URL based on that input. That predictability is huge for reliable UI mockups; you know exactly what the output's going to be across multiple runs.

**Pinpointing Specific Assets**

Sometimes, random isn't gonna cut it. You need something specific. If you have a unique ID for an image, use `get_specific_image_url`. This tool gets you the precise URL for that known asset while letting you set custom width and height parameters. It's direct, fast, and accurate.

**Listing and Inspecting Metadata**

If you want to know what kind of visuals are available in the dataset, run `list_images`. This pulls a paginated list of photos, giving you basic info on several assets at once so you can get oriented. 

When you find an image ID or a seed string and need the deep details—the stuff that doesn't just show up on the URL—you hit metadata retrieval. Use `get_image_info` to pull detailed data, including the original dimensions and author credits for any single image ID. If you used a seed string to generate an image, use `get_seed_info`. This retrieves the associated metadata, like who the author is or what its original size was.

**How You Use It**

Your AI client calls one of these tools—say, `get_random_image_url` with specific parameters. The server processes that request and returns either a clean URL, a detailed metadata JSON object, or both. You take that data—the image link or the author credits—and plug it straight into your application code. It keeps your workflow tight and focused on building, not fetching.

## Tools

### get_image_info
Retrieves detailed metadata, including dimensions and authors, for a single image ID.

### get_random_image_url
Generates a URL for a random image. You can customize the size, blur level, grayscale filter, and format (JPG/WebP).

### get_seed_image_url
Creates a reliable image URL based on a seed string, ensuring consistent visuals for testing.

### get_seed_info
Retrieves metadata (like author and dimensions) associated with a specific image seed ID.

### get_specific_image_url
Gets an exact URL for an image by its unique ID, allowing you to specify the required width and height.

### list_images
Pulls a paginated list of available images in the dataset, giving you basic info on several assets at once.

## Prompt Examples

**Prompt:** 
```
Generate a random 800x600 image URL with a blur effect of 5.
```

**Response:** 
```
I've generated the URL for you. You can use this 800x600 blurred image: https://picsum.photos/800/600?blur=5
```

**Prompt:** 
```
List 5 images from Lorem Picsum and show their authors.
```

**Response:** 
```
I've fetched 5 images for you. Notable ones include Image ID 0 by Alejandro Escamilla and Image ID 1 by Alejandro Escamilla. Would you like the metadata for a specific one?
```

**Prompt:** 
```
Get the details for image ID 237.
```

**Response:** 
```
Image ID 237 was captured by André Spieker. Its original dimensions are 3500x2095. You can view it here: https://picsum.photos/id/237/3500/2095
```

## Capabilities

### Get random image links
The agent generates an image URL on demand, allowing you to specify width, height, blur level, and color filters.

### Retrieve detailed metadata
You can get author names, original dimensions, and format types for any given image ID or seed string.

### Fetch specific assets by ID
The agent retrieves a precise URL for a known image ID, supporting custom sizing parameters.

### List available images
You pull a paginated list of currently available photos and their basic metadata.

### Force consistent assets
The agent generates an image URL based on a predictable seed string, perfect for reliable UI mockups.

## Use Cases

### Mocking up a blog post layout
A developer needs 5 random images for a new article mockup. Instead of opening 5 browser tabs and resizing assets, they ask their agent to use `get_random_image_url` five times, specifying the exact dimensions (e.g., 600x400) every time. The agent returns all five clean URLs instantly.

### A/B testing image variations
A designer needs to compare how a component looks with blur vs. grayscale. They use the tool parameters in `get_random_image_url` multiple times, changing only the filter setting. This lets them quickly validate visual effects without manual asset prep.

### Building a catalogue of assets
A content manager needs to know all available images and their original dimensions for an open-source campaign. They call `list_images` first, then use `get_image_info` on key IDs to build a comprehensive metadata record.

### Ensuring consistent UI state
When testing a checkout flow that requires the same banner image across multiple sessions, the developer uses `get_seed_image_url`. This guarantees the exact pixel data is retrieved every time for reliable component testing.

## Benefits

- Stop manually generating mockups. Using `get_random_image_url` lets your agent generate a perfectly sized, filtered placeholder URL in one step.
- Never worry about broken links or inconsistent assets again. The `get_seed_image_url` tool guarantees that the image you test today will look exactly the same next week.
- Need attribution? Running `list_images` and then calling `get_image_info` on IDs gives you the author's credit and original dimensions—all without leaving your workflow.
- Control the look of your mocks. You can pass parameters to force specific formats (JPG or WebP) or apply effects like Gaussian blur directly through the tool calls.
- Testing complex layouts? The `get_specific_image_url` tool lets you fetch an image for a precise size, which is key when designing responsive components.

## How It Works

The bottom line is: you tell your AI client what kind of picture you need, and it handles generating the link and pulling all the details for you.

1. Connect your AI client to the Lorem Picsum MCP Server. No API key is needed for public access.
2. Your agent calls a specific tool function (e.g., `get_random_image_url`), passing required parameters like dimensions and blur levels.
3. The server executes the request and returns structured data—either a direct image URL or a detailed metadata object.

## Frequently Asked Questions

**How can I get a blurred or grayscale version of a random image?**
You can use the `get_random_image_url` tool and set the `blur` parameter (1-10) or the `grayscale` boolean to true. The agent will construct the correct URL for you.

**Is it possible to always get the same image for a specific UI element?**
Yes! Use the `get_seed_image_url` tool with a unique `seed` string. This ensures that the same image is returned every time you use that specific seed.

**Can I find out who the author of a specific image is?**
Absolutely. Use the `get_image_info` tool with the image ID. It will return the author's name, the original dimensions, and the source URL.

**Do I need to worry about API keys when using list_images?**
No, you don't need an API key for public access. The server operates on the Model Context Protocol standard and is publicly available through Vinkius.

**How do I retrieve a large number of images using list_images?**
You must handle pagination manually. To get results beyond the initial set, pass the next page token or offset parameter when calling list_images again.

**What happens if I use get_specific_image_url with an invalid ID?**
The tool returns a structured error object. This message tells you exactly which parameter failed, allowing your AI client to correct the input immediately.

**Can I verify a seed string's metadata using get_seed_info?**
Yes, get_seed_info retrieves comprehensive data for that exact seed. This confirms its existence and provides all the initial context needed for reliable UI testing.

**What is the recommended way to specify dimensions with get_random_image_url?**
Always provide explicit width and height parameters. Giving these values ensures the resulting URL is predictable and meets your layout constraints right away.