A Model Context Protocol (MCP) server for integrating Unsplash image search and retrieval capabilities with AI assistants.
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. It also automatically downloads them to the neccessary folder instead of just using links if prompted.
- 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
npm install -g mcp-unsplashIf 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-unsplashAdd the MCP server to your MCP configuration file:
{
"mcpServers": {
"unsplash": {
"command": "mcp-unsplash",
"env": {
"UNSPLASH_ACCESS_KEY": "your-unsplash-api-key"
},
"disabled": false,
"autoApprove": []
}
}
}- Clone the repository
- Install dependencies:
npm install - Build the project:
npm run build - Start the server:
npm start
Search for images on Unsplash by keywords.
{
"query": "business meeting",
"page": 1,
"perPage": 10,
"orientation": "landscape"
}Get random images from Unsplash, optionally filtered by criteria.
{
"query": "office",
"orientation": "landscape",
"count": 3
}Get a specific image from Unsplash by its ID.
{
"id": "abc123"
}- Create an account at Unsplash
- Register a new application at Unsplash Developers
- Get your API key from the application dashboard
MIT