Lorem Picsum

Lorem Picsum · MCP + OAuth 2.1Connect your coding agent.

Let Claude Code, Codex and Grok Bot search the Picsum collection of CC0 photos and build exact-size random image URLs. Sign in once with OAuth: there is no key to copy, and access is read-only.

https://picsum.org/mcp
  • Claude Code
  • Codex
  • Grok Bot

Pick your agent

Claude Code

  1. 1
    Add the server.
    Terminal
    claude mcp add --transport http picsum https://picsum.org/mcp
  2. 2
    Inside Claude Code run /mcp, choose picsum and select Authenticate. Your browser opens the consent page.
  3. 3
    Try it: “Find three coffee photos on Picsum and give me 800×600 img tags.”

Codex

  1. 1
    Add the server.
    Terminal
    codex mcp add picsum --url https://picsum.org/mcp
  2. 2
    Sign in with OAuth.
    Terminal
    codex mcp login picsum
    Remote MCP login needs a recent Codex CLI. Or add url = "https://picsum.org/mcp" under [mcp_servers.picsum] in ~/.codex/config.toml.
  3. 3
    Try it: “Use picsum to fill this grid with random food photos.”

Grok Bot

  1. 1
    Add a remote MCP server in the bot’s tool settings.
    Settings
    Name: picsum
    URL: https://picsum.org/mcp
    Transport: Streamable HTTP
    Auth: OAuth
  2. 2
    Sign in when the bot asks. It finds the sign-in endpoints from the discovery URLs below and registers itself.
  3. 3
    Menu names differ between Grok Bot versions. Any MCP client that supports OAuth with dynamic client registration works the same way.

See it in 60 seconds

What your agent can do

search_photos

Search the CC0 collection by tag and category, with paging and a ready-to-use image URL for every result.

get_photo

Read one photo by ID: author, description, tags, dimensions, source link and license.

list_categories

List the 29 category ids and names, grouped like the menu on the homepage.

build_image_url

Build an exact-size Lorem Picsum URL and an <img> snippet, with seed, category, grayscale, blur and WebP.

Access

Read-only,
by design.

  • Only public data. The tools read the CC0 photo catalog and build URLs. They cannot see or change your account or files. The only thing that uses credits is a custom image size or effect: 1 credit per photo and size, while the four preset sizes stay free.
  • You approve every agent. Each connection starts on a consent page that names the application asking for access.
  • Short-lived tokens. Access tokens last one hour and refresh for up to 30 days. Remove the server from your agent to disconnect.
  • Standard OAuth 2.1. PKCE is required and clients register themselves, so nothing needs to be pasted into a config file.

Endpoints

MCP server
https://picsum.org/mcp
Resource metadata
https://picsum.org/.well-known/oauth-protected-resource
Authorization server
https://picsum.org/.well-known/oauth-authorization-server
Authorization page
https://picsum.org/connect/authorize
Token endpoint
https://picsum.org/api/auth/mcp/token
Client registration
https://picsum.org/api/auth/mcp/register