English | 简体中文
一个简单的 MCP 服务器,用于无缝集成 Unsplash 图片搜索功能。
Unsplash MCP 用于搜索丰富的高质量图片。适合希望将 Unsplash 功能集成到自己的应用程序中的开发者。
- 高级图片搜索:搜索 Unsplash 庞大的图片库,支持以下筛选条件:
- 关键词相关性
- 颜色方案
- 方向选项
- 自定义排序和分页
在安装服务器之前,您需要获取 Unsplash API Access Key:
- 在 Unsplash 创建开发者账户
- 注册一个新应用
- 从应用详情页获取您的 Access Key
- 在下面的配置步骤中使用此密钥
更多详情,请参考 Unsplash 官方 API 文档。
通过 Smithery 自动为不同 IDE 安装 Unsplash 图片集成服务器:
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}"
}
}
}
}
{
"tool": "search_photos",
"query": "mountain",
"per_page": 5,
"orientation": "landscape"
}
- Golang 版本: unsplash-mcp-server
- Java 实现:unsplash-mcp-server