Unsplash MCP Server
英文 | 简体中文
一个简单的MCP服务器,用于无缝集成Unsplash图片和搜索功能。
📋 概述
Unsplash MCP Server用于搜索丰富、高质量的图片。它非常适合希望将Unsplash功能集成到自己应用程序中的开发者。
✨ 功能
- 高级图片搜索:使用过滤器搜索Unsplash的海量照片库,包括:
- 关键词相关性
- 色彩方案
- 方向选项
- 自定义排序和分页
🔑 获取Unsplash访问密钥
在安装此服务器之前,您需要获取一个Unsplash API访问密钥:
- 在Unsplash创建开发者账户
- 注册一个新应用
- 从应用详情页面获取您的访问密钥
- 在以下配置步骤中使用此密钥
更多详情,请参考官方Unsplash API文档。
🚀 安装
通过Smithery自动为Claude桌面安装Unsplash图片集成服务器:
IDE设置
Cursor IDE
npx -y @smithery/cli@latest install @hellokaton/unsplash-mcp-server --client cursor --key 7558c683-****-****
Windsurf
npx -y @smithery/cli@latest install @hellokaton/unsplash-mcp-server --client windsurf --key 7558c683-****-****
Cline
npx -y @smithery/cli@latest install @hellokaton/unsplash-mcp-server --client cline --key 7558c683-****-****
手动安装
# 克隆仓库
git clone https://github.com/hellokaton/unsplash-mcp-server.git
# 进入项目目录
cd unsplash-mcp-server
# 创建虚拟环境
uv venv
# 安装依赖
uv pip install .
Cursor编辑器集成
将以下配置添加到您的Cursor编辑器的settings.json:
⚠️ 注意:请根据您的实际安装调整以下配置:
- 如果
uv不在系统PATH中,使用绝对路径(例如/path/to/uv) ./server.py应修改为您的服务器脚本的实际位置(可以使用绝对路径或相对于工作区的路径)
{
"mcpServers": {
"unsplash": {
"command": "uv",
"args": ["run", "--with", "fastmcp", "fastmcp", "run", "./server.py"],
"env": {
"UNSPLASH_ACCESS_KEY": "${YOUR_ACCESS_KEY}"
}
}
}
}
在Cursor中使用
🛠️ 可用工具
搜索图片
{
"tool": "search_photos",
"query": "mountain",
"per_page": 5,
"orientation": "landscape"
}
🔄 其他实现
- Golang: unsplash-mcp-server
- Java: unsplash-mcp-server
