Unsplash MCP Server

Unsplash MCP Server

Provides access to the Unsplash API, enabling AI assistants to search and retrieve high-quality photos, browse collections, view photographer profiles, and get photo statistics with advanced filtering options.

Category
Visit Server

README

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

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:

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured