A Swift-based Model Context Protocol (MCP) server that enables advanced photo search, retrieval, and random photo selection from Unsplash's extensive library. This implementation extends the original Python version with additional features like get_photo
and random_photo
.
search_photos
: Search for photos with customizable filters like query, page, perPage, orderBy, color, and orientation.get_photo
: Retrieve detailed information about a specific photo using its ID.random_photo
: Get one or more random photos with options for count, collections, topics, username, query, orientation, content_filter, and featured.Install the latest version with a single command:
curl -fsSL https://raw.githubusercontent.com/okooo5km/unsplash-mcp-server-swift/main/install.sh | bash
shell
git clone https://github.com/okooo5km/unsplash-mcp-server-swift.git
cd unsplash-mcp-server-swift
shell
swift build -c release
shell
mkdir -p ~/.local/bin
cp $(swift build -c release --show-bin-path)/unsplash-mcp-server ~/.local/bin/
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc # or ~/.bashrc
source ~/.zshrc # or source ~/.bashrc
Set your Unsplash API access key:
export UNSPLASH_ACCESS_KEY="your-access-key-here"
Add to your Claude settings:
"mcpServers": {
"unsplash": {
"command": "unsplash-mcp-server"
}
}
Add to your Cursor editor's settings.json
:
{
"mcpServers": {
"unsplash": {
"command": "unsplash-mcp-server",
"env": {
"UNSPLASH_ACCESS_KEY": "${YOUR_ACCESS_KEY}"
}
}
}
}
Note: Do not wrap environment variable values in quotes when configuring Chatwise.
For detailed version history and changelog, check the GitHub Releases.
If you find this project useful, consider supporting its development:
Licensed under the MIT License. See the LICENSE file for details.