article
README
🚀 Unsplash MCP 服务器
一个简单的MCP服务器,用于无缝集成Unsplash图片和搜索功能,助力开发者在应用中轻松使用Unsplash资源。
English | 简体中文
🚀 快速开始
Unsplash MCP 服务器用于搜索高质量图片,非常适合希望在自己的应用中集成 Unsplash 功能的开发者。在使用前,您需要获取 Unsplash API 访问密钥,具体步骤如下:
- 在 Unsplash 注册开发者账户。
- 创建一个新的应用。
- 从应用程序详情页面获取您的访问密钥。
- 在后续的配置步骤中使用此密钥。
更多细节,请参考官方 Unsplash API 文档。
✨ 主要特性
- 高级图片搜索:可搜索 Unsplash 海量图库,支持以下过滤器:
- 关键字相关性
- 颜色方案
- 横竖屏方向
- 自定义排序和分页
📦 安装指南
通过 Smithery 自动安装
通过 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"
}
🛠️ 工具
安装依赖
确保安装了以下工具:
- Python 3.9+
- Node.js(如果需要构建项目)
运行服务器
运行服务器的命令如下:
uv run server.py
访问 http://localhost:5000 查看结果。
📚 详细文档
更多详细信息,请参考官方文档。
🔗 其他实现
感谢您的使用!如果有任何问题,请随时联系维护人员。
微信扫一扫