Unsplash MCP 服务器是一个简单的 MCP 服务器,可用于无缝集成 Unsplash 图片并具备搜索功能,适合开发者将 Unsplash 功能集成到自己的应用程序中。
English | 繁体中文
在安装服务器之前,您需要获取 Unsplash API 访问密钥:
更多细节,请参考官方 Unsplash API 文档。
通过 Smithery 自动安装 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": "your_search_query",
"page": 1,
"per_page": 20
}
MIT 许可证