mcpField
U
Unsplash MCP Server

Unsplash MCP Server

本地服务
github.com/hellokaton媒体与设计2372 周前更新

关于 Unsplash MCP Server

Unsplash MCP Server 是一个基于 Python 的 MCP 服务,用于搜索 Unsplash 上的高质量图片。适合希望将 Unsplash 图片搜索集成到自有应用中的开发者。

主要功能

  1. 01按关键词搜索 Unsplash 图片库
  2. 02支持颜色和方向等筛选条件
  3. 03支持自定义排序与分页
  4. 04基于 Access Key 的 API 访问

适用场景

  1. 01为文章或应用检索配图
  2. 02在 IDE 中通过 AI 助手查找横向或纵向图片

MCP 相关

该项目是 MCP 服务,向 MCP 客户端暴露 search_photos 工具,用于按条件搜索 Unsplash 图片。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"unsplash": {
"command": "npx",
"args": [
"-y",
"@smithery/cli"
]
}
}
}
启动命令npx -y @smithery/cli

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@smithery/cli

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

MseeP.ai 安全评估徽章

Unsplash MCP 服务

English | 简体中文

用于无缝集成 Unsplash 图片并提供搜索功能的简单 MCP 服务。

Python 3.9+ 许可证:MIT

信任评分 已列入 Skillselion

📋 概述

Unsplash MCP 服务用于搜索丰富的高质量图片。它非常适合希望将 Unsplash 功能集成到自己应用中的开发者。

✨ 功能

  • 高级图片搜索:使用筛选条件搜索 Unsplash 丰富的照片库:
    • 关键词相关性
    • 配色方案
    • 方向选项
    • 自定义排序和分页

🔑 获取 Unsplash 访问密钥

安装此服务前,你需要获取 Unsplash API 访问密钥:

  1. 在 Unsplash 创建开发者账户
  2. 注册新应用
  3. 在应用详情页获取访问密钥
  4. 在下方的配置步骤中使用此密钥

更多详情请参阅 Unsplash API 官方文档。

🚀 安装

通过 Smithery 自动为 Claude Desktop 安装 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-****-****
手动安装
# Clone the repository
git clone https://github.com/hellokaton/unsplash-mcp-server.git

# Navigate to project directory
cd unsplash-mcp-server

# Create virtual environment
uv venv

# Install dependencies
uv pip install .

Cursor 编辑器集成

将以下配置添加到 Cursor 编辑器的 settings.json:

⚠️ 注意: 请根据实际安装情况调整以下配置:

  • 如果 uv 不在系统 PATH 中,请使用绝对路径(例如 /path/to/uv)
  • 应将 ./server.py 修改为服务脚本的实际位置(可使用绝对路径或相对于工作区的路径)
Cursor 配置截图
{
  "mcpServers": {
    "unsplash": {
      "command": "uv",
      "args": ["run", "--with", "fastmcp", "fastmcp", "run", "./server.py"],
      "env": {
        "UNSPLASH_ACCESS_KEY": "${YOUR_ACCESS_KEY}"
      }
    }
  }
}
在 Cursor 中使用
Cursor 中的 Unsplash MCP

🛠️ 可用工具

搜索照片
{
  "tool": "search_photos",
  "query": "mountain",
  "per_page": 5,
  "orientation": "landscape"
}

🔄 其他实现

📄 许可证

MIT 许可证

📬 联系方式

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。