一个简单的MCP服务器,用于无缝集成Unsplash图片和搜索功能,助力开发者在应用中轻松使用Unsplash资源。
English | 简体中文
Unsplash MCP 服务器用于搜索高质量图片,非常适合希望在自己的应用中集成 Unsplash 功能的开发者。在使用前,您需要获取 Unsplash API 访问密钥,具体步骤如下:
更多细节,请参考官方 Unsplash API 文档。
通过 Smithery 可自动安装 Unsplash 图片集成服务器,不同 IDE 的安装命令如下:
Cursor IDE
npx -y @smithery/cli@latest install @hellokaton/unsplash-mcp-server --client cursor --config "{\"unsplashAccessKey\":\"YOUR_ACCESS_KEY\"}"
Windsurf
npx -y @smithery/cli@latest install @hellokaton/unsplash-mcp-server --client windsurf --config "{\"unsplashAccessKey\":\"YOUR_ACCESS_KEY\"}"
Cline
npx -y @smithery/cli@latest install @hellokaton/unsplash-mcp-server --client cline --config "{\"unsplashAccessKey\":\"YOUR_ACCESS_KEY\"}"
# 克隆仓库
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
应该修改为您实际的服务器脚本位置(可以使用绝对路径或相对于工作区的路径)。
// 配置示例:
{
"customCss": "",
"customHtml": "",
"language": "zh-CN",
"theme": "vs-dark"
}
确保安装了以下工具:
运行服务器的命令如下:
uv run server.py
访问 http://localhost:5000 查看结果。
更多详细信息,请参考官方文档。
感谢您的使用!如果有任何问题,请随时联系维护人员。