mcp-unsplash
v1.0.0
Published
MCP server for Unsplash API integration that provides tools to search and retrieve images
Downloads
15
Maintainers
Readme
MCP Unsplash
A Model Context Protocol (MCP) server for integrating Unsplash image search and retrieval capabilities with AI assistants.
Overview
This package provides an MCP server that connects to the Unsplash API, allowing AI assistants to search and retrieve images from Unsplash's vast collection of high-quality, freely-usable images.
Features
- Search Images: Search for images using keywords
- Random Images: Get random images, optionally filtered by topic or orientation
- Image Details: Retrieve detailed information about specific images by ID
Installation
npm install -g mcp-unsplash
Usage
Global Installation
If installed globally, you can run the MCP server directly from the command line:
# Set your Unsplash API key
export UNSPLASH_ACCESS_KEY="your-unsplash-api-key"
# Run the server
mcp-unsplash
In Your MCP Configuration
Add the MCP server to your MCP configuration file:
{
"mcpServers": {
"unsplash": {
"command": "mcp-unsplash",
"env": {
"UNSPLASH_ACCESS_KEY": "your-unsplash-api-key"
},
"disabled": false,
"autoApprove": []
}
}
}
Local Installation
- Clone the repository
- Install dependencies:
npm install
- Build the project:
npm run build
- Start the server:
npm start
Available Tools
search_images
Search for images on Unsplash by keywords.
{
"query": "business meeting",
"page": 1,
"perPage": 10,
"orientation": "landscape"
}
get_random_image
Get random images from Unsplash, optionally filtered by criteria.
{
"query": "office",
"orientation": "landscape",
"count": 3
}
get_image_by_id
Get a specific image from Unsplash by its ID.
{
"id": "abc123"
}
Getting an Unsplash API Key
- Create an account at Unsplash
- Register a new application at Unsplash Developers
- Get your API key from the application dashboard
License
MIT