Skip to main content
Glama
Unsplash MCP Server
by mjordi

Unsplash MCP Server

A Model Context Protocol (MCP) server that provides access to the Unsplash API, enabling AI assistants to search and retrieve high-quality, free-to-use photos.

Features

  • πŸ” Search Photos: Search millions of high-quality photos by keywords with advanced filters

  • πŸ“Έ Photo Details: Get detailed information about specific photos including EXIF data

  • 🎲 Random Photos: Get random photos, optionally filtered by query or orientation

  • πŸ“š Collections: Search and browse curated photo collections

  • πŸ‘€ User Profiles: Search photographers and view their portfolios

  • πŸ“Š Statistics: Get view, download, and like statistics for photos

  • 🎨 Advanced Filters: Filter by orientation, color, content safety level

  • πŸ“ Multiple Formats: Response in JSON or Markdown format

Related MCP server: Unsplash MCP Server

Installation

Prerequisites

  • Node.js 18 or higher

  • An Unsplash API access key

Getting an Unsplash API Key

  1. Visit Unsplash Developers

  2. Create an account or log in

  3. Click "New Application"

  4. Fill in the required details and accept the terms

  5. Copy your Access Key

Note: Demo accounts are limited to 50 requests per hour. Apply for production access for higher limits.

Setup

# Clone or download this repository
cd unsplash-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

# Set your API key
export UNSPLASH_ACCESS_KEY=your_access_key_here

Usage

Running with stdio (for Claude Desktop, etc.)

npm start
# or
node dist/index.js

Running with HTTP transport

TRANSPORT=http PORT=3000 npm start

Configuration for Claude Desktop

Add to your Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "unsplash": {
      "command": "node",
      "args": ["/path/to/unsplash-mcp-server/dist/index.js"],
      "env": {
        "UNSPLASH_ACCESS_KEY": "your_access_key_here"
      }
    }
  }
}

Available Tools

Photo Search & Retrieval

unsplash_search_photos

Search for photos by keywords with advanced filtering.

Parameters:

  • query (string, required): Search keywords

  • page (number): Page number (default: 1)

  • per_page (number): Results per page, 1-30 (default: 10)

  • orientation (string): Filter by "landscape", "portrait", or "squarish"

  • content_filter (string): "low" (default) or "high" safety filter

  • color (string): Filter by color name (e.g., "black", "white", "red")

  • order_by (string): Sort by "relevant" (default) or "latest"

  • response_format (string): "markdown" (default) or "json"

Example:

Search for: "mountain sunset"
Filter by: orientation="landscape", color="orange"

unsplash_get_photo

Get detailed information about a specific photo.

Parameters:

  • id (string, required): Unsplash photo ID

  • response_format (string): "markdown" or "json"

unsplash_get_random

Get one or more random photos.

Parameters:

  • query (string): Optional search filter

  • orientation (string): Filter by orientation

  • content_filter (string): Safety filter level

  • count (number): Number of photos, 1-30 (default: 1)

  • response_format (string): Output format

unsplash_list_photos

List photos from Unsplash's editorial feed.

Parameters:

  • page (number): Page number

  • per_page (number): Results per page

  • order_by (string): "latest", "oldest", or "popular"

  • response_format (string): Output format

unsplash_get_statistics

Get view, download, and like statistics for a photo.

Parameters:

  • id (string, required): Photo ID

  • response_format (string): Output format

unsplash_track_download

Track a photo download (required by Unsplash API guidelines).

Parameters:

  • id (string, required): Photo ID being downloaded

Important: Always call this before downloading/using a photo programmatically.

Collections

unsplash_search_collections

Search for curated photo collections.

Parameters:

  • query (string, required): Search keywords

  • page (number): Page number

  • per_page (number): Results per page

  • response_format (string): Output format

unsplash_get_collection_photos

Get photos from a specific collection.

Parameters:

  • id (string, required): Collection ID

  • page (number): Page number

  • per_page (number): Results per page

  • orientation (string): Filter by orientation

  • response_format (string): Output format

Users

unsplash_search_users

Search for photographers and users.

Parameters:

  • query (string, required): Search keywords

  • page (number): Page number

  • per_page (number): Results per page

  • response_format (string): Output format

unsplash_get_user_photos

Get photos by a specific user.

Parameters:

  • username (string, required): Unsplash username

  • page (number): Page number

  • per_page (number): Results per page

  • order_by (string): "latest", "oldest", or "popular"

  • orientation (string): Filter by orientation

  • response_format (string): Output format

API Guidelines & Attribution

Unsplash API Usage

When using photos from Unsplash:

  1. Track Downloads: Always call unsplash_track_download when downloading photos programmatically

  2. Attribution: While not required, attribution to photographers is appreciated

  3. Hotlinking: Use the Unsplash CDN URLs directly (don't re-host images)

  4. Rate Limits: Demo accounts have 50 requests/hour; production accounts have higher limits

Example Attribution

Photo by [Photographer Name] on Unsplash

Development

Project Structure

unsplash-mcp-server/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts              # Main entry point
β”‚   β”œβ”€β”€ types.ts              # TypeScript type definitions
β”‚   β”œβ”€β”€ constants.ts          # Configuration constants
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ unsplash-client.ts   # API client
β”‚   β”‚   └── formatters.ts        # Response formatting
β”‚   β”œβ”€β”€ schemas/
β”‚   β”‚   └── index.ts             # Zod validation schemas
β”‚   └── tools/
β”‚       β”œβ”€β”€ photos.ts            # Photo-related tools
β”‚       └── collections-users.ts # Collection/user tools
β”œβ”€β”€ dist/                     # Compiled JavaScript
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

Building

npm run build

Development with Watch Mode

npm run dev

Error Handling

The server provides clear error messages for common issues:

  • 401 Unauthorized: Invalid or missing API key

  • 403 Forbidden: Rate limit exceeded or insufficient permissions

  • 404 Not Found: Photo, collection, or user doesn't exist

  • Network errors: Connection issues with Unsplash API

License

MIT License - See LICENSE file for details

Credits

Support

For issues with:

Available Tools

10 tools
unsplash_get_collection_photosGet Collection PhotosA
Read-onlyIdempotent

Get all photos from a specific Unsplash collection.

Use this to retrieve photos from a curated collection. First use unsplash_search_collections to find collection IDs.

Args:

  • id (string): Collection ID

  • page (number): Page number for pagination (default: 1)

  • per_page (number): Results per page, 1-30 (default: 10)

  • orientation (string, optional): Filter by 'landscape', 'portrait', or 'squarish'

  • response_format (string): Output as 'markdown' (default) or 'json'

Returns: Array of photos from the collection

Examples:

  • Get collection photos: id="3330445"

  • Portrait photos only: id="3330445", orientation="portrait"

Inputs: id (required), page, per_page, orientation, +1 more.

unsplash_get_photoGet Photo DetailsA
Read-onlyIdempotent

Retrieve detailed information about a specific Unsplash photo by its ID.

This tool fetches complete metadata for a photo including dimensions, photographer info, EXIF data, location, tags, and download URLs.

Args:

  • id (string): Unsplash photo ID (e.g., "LBI7cgq3pbM")

  • response_format (string): Output as 'markdown' (default) or 'json'

Returns: For JSON format: Complete photo object with all metadata { "id": string, "width": number, "height": number, "color": string, "blur_hash": string, "likes": number, "description": string, "alt_description": string, "created_at": string, "urls": { ... }, "links": { ... }, "user": { ... }, "exif": { ... }, // Camera settings if available "location": { ... }, // Photo location if available "tags": [ ... ] }

Examples:

  • Get photo details: id="LBI7cgq3pbM"

Use unsplash_search_photos first to find photo IDs.

Inputs: id (required), response_format.

unsplash_get_randomGet Random PhotosA
Read-only

Get one or more random photos from Unsplash, optionally filtered by search query or orientation.

This tool is perfect for getting inspiration, placeholder images, or diverse photo content. You can narrow the selection with search terms.

Args:

  • query (string, optional): Search terms to filter random selection

  • orientation (string, optional): Filter by 'landscape', 'portrait', or 'squarish'

  • content_filter (string): Safety level 'low' (default) or 'high'

  • count (number): Number of random photos (1-30, default: 1)

  • response_format (string): Output as 'markdown' (default) or 'json'

Returns: For JSON format: Array of photo objects For Markdown: Formatted list of photos with details

Examples:

  • Single random photo: (no parameters)

  • Random nature photos: query="nature", count=5

  • Random portraits: orientation="portrait", count=3

Note: Each request returns different random photos.

Inputs: count, query, orientation, content_filter, +1 more.

unsplash_get_statisticsGet Photo StatisticsB
Read-only

Get view, download, and like statistics for a specific photo.

This tool provides detailed analytics including total counts and recent trends for a photo's popularity.

Args:

  • id (string): Unsplash photo ID

  • response_format (string): Output as 'markdown' (default) or 'json'

Returns: Statistics including downloads, views, likes with historical trends

Examples:

  • Get stats: id="LBI7cgq3pbM"

Inputs: id (required), response_format.

unsplash_get_user_photosGet User's PhotosA
Read-onlyIdempotent

Get photos uploaded by a specific Unsplash user/photographer.

Retrieve the portfolio of a photographer. Use unsplash_search_users first to find usernames.

Args:

  • username (string): Unsplash username

  • page (number): Page number for pagination (default: 1)

  • per_page (number): Results per page, 1-30 (default: 10)

  • order_by (string): Sort by 'latest' (default), 'oldest', or 'popular'

  • orientation (string, optional): Filter by 'landscape', 'portrait', or 'squarish'

  • response_format (string): Output as 'markdown' (default) or 'json'

Returns: Array of photos by the user

Examples:

  • Get user photos: username="johndoe"

  • Popular photos: username="johndoe", order_by="popular"

Inputs: username (required), page, order_by, per_page, +2 more.

unsplash_list_photosList Editorial PhotosA
Read-onlyIdempotent

List photos from Unsplash's editorial feed - curated high-quality photos.

This tool provides access to Unsplash's main photo feed, sorted by latest, oldest, or most popular.

Args:

  • page (number): Page number for pagination (default: 1)

  • per_page (number): Results per page, 1-30 (default: 10)

  • order_by (string): Sort by 'latest' (default), 'oldest', or 'popular'

  • response_format (string): Output as 'markdown' (default) or 'json'

Returns: For JSON format: Array of photo objects For Markdown: Formatted list with pagination info

Examples:

  • Latest photos: order_by="latest"

  • Most popular: order_by="popular", per_page=20

Inputs: page, order_by, per_page, response_format.

unsplash_search_collectionsSearch Photo CollectionsA
Read-onlyIdempotent

Search for curated photo collections on Unsplash.

Collections are curated sets of photos organized by theme, created by Unsplash users. Use this to find themed photo sets.

Args:

  • query (string): Search keywords for collections

  • page (number): Page number for pagination (default: 1)

  • per_page (number): Results per page, 1-30 (default: 10)

  • response_format (string): Output as 'markdown' (default) or 'json'

Returns: For JSON format: Search results with collection metadata { "total": number, "total_pages": number, "results": [ { "id": string, "title": string, "description": string, "total_photos": number, "user": { ... }, "links": { ... } } ] }

Examples:

  • Find travel collections: query="travel"

  • Architecture collections: query="architecture"

Inputs: query (required), page, per_page, response_format.

unsplash_search_photosSearch Unsplash PhotosA
Read-onlyIdempotent

Search for photos on Unsplash by keywords with advanced filtering options.

This tool searches through millions of high-quality, free-to-use photos from the Unsplash platform. You can filter by orientation, color, content safety level, and sort by relevance or recency.

Args:

  • query (string): Search keywords (e.g., "mountain sunset", "coffee cup", "architecture")

  • page (number): Page number for pagination (default: 1)

  • per_page (number): Results per page, 1-30 (default: 10)

  • orientation (string, optional): Filter by 'landscape', 'portrait', or 'squarish'

  • content_filter (string): Safety level 'low' (default) or 'high'

  • color (string, optional): Filter by color name (e.g., 'black', 'white', 'yellow', 'red')

  • order_by (string): Sort by 'relevant' (default) or 'latest'

  • response_format (string): Output as 'markdown' (default) or 'json'

Returns: For JSON format: Complete search results with metadata { "total": number, // Total matching photos "total_pages": number, // Total pages available "page": number, // Current page "per_page": number, // Results per page "results": [ // Array of photo objects { "id": string, "width": number, "height": number, "color": string, "likes": number, "description": string, "alt_description": string, "urls": { "raw": string, "full": string, "regular": string, "small": string, "thumb": string }, "links": { "html": string, // Unsplash page URL "download": string }, "user": { "name": string, "username": string } } ] }

Examples:

  • Search for nature photos: query="forest waterfall"

  • Find portrait photos: query="portrait", orientation="portrait"

  • Latest tech photos: query="technology", order_by="latest"

Note: All photos from Unsplash are free to use. Attribution to the photographer is appreciated but not required.

Inputs: query (required), page, color, order_by, +4 more.

unsplash_search_usersSearch PhotographersA
Read-onlyIdempotent

Search for photographers and users on Unsplash.

Find photographers by name or username to explore their portfolio.

Args:

  • query (string): Search keywords for users/photographers

  • page (number): Page number for pagination (default: 1)

  • per_page (number): Results per page, 1-30 (default: 10)

  • response_format (string): Output as 'markdown' (default) or 'json'

Returns: For JSON format: User search results { "total": number, "total_pages": number, "results": [ { "id": string, "username": string, "name": string, "total_photos": number, "total_likes": number, "total_collections": number, "links": { ... } } ] }

Examples:

  • Find photographer: query="John Doe"

  • Search username: query="photographer123"

Inputs: query (required), page, per_page, response_format.

unsplash_track_downloadTrack Photo DownloadA
Idempotent

Track a photo download (required by Unsplash API guidelines when downloading photos).

When you download a photo programmatically, you must call this tool to properly attribute the download to the photographer. This helps photographers understand how their work is being used.

Args:

  • id (string): Unsplash photo ID being downloaded

Returns: Confirmation that download was tracked

Examples:

  • Track download: id="LBI7cgq3pbM"

IMPORTANT: Always call this before downloading/using a photo programmatically.

Inputs: id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool maps to a distinct resource+action pair: searching vs. listing the editorial feed vs. random selection vs. fetching by ID are clearly separated by their descriptions and arguments. Collections and users each have a search/discover tool paired with a retrieval tool, so boundaries remain unambiguous.

    Naming Consistency5/5

    Every tool uses the same 'unsplash_verb_noun' pattern (search_photos, get_photo, list_photos, get_collection_photos, search_users, etc.). Verbs are used consistently for the same semantic action across resources, making the pattern fully predictable.

    Tool Count5/5

    Ten tools is well-scoped for the Unsplash API surface: core photo operations, discovery, collections, users, and download attribution. No tool feels redundant or padded, and none of the major API areas are split into unnecessary fragments.

    Completeness4/5

    Coverage is strong across photos, collections, users, and analytics, including the mandatory download-tracking call. Minor gaps remain: there is no direct download/fetch tool (only tracking), no single-user profile lookup, and no collection-detail or topic endpoints, though agents can work around these via returned URLs.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables searching and downloading photos from Unsplash via the Unsplash API, with support for pagination, orientation filtering, and multiple resolutions.
      191 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to search and retrieve Unsplash photos with filters, random photo selection, and compliant download tracking, while providing ready-to-use attribution text and HTML.
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables agents to search and retrieve random Unsplash photos with ready-to-use attribution, and to track downloads, using the caller's own API key over stateless HTTP or local stdio connections.
      MIT