U

Unsplash图片搜索服务端

一个轻量级服务器,可实现与Unsplash图像库的无缝集成,使开发人员能够直接从Cursor编辑器中使用各种过滤器搜索高质量照片。

art-and-culturesearch

1.9k 查看 · 2026-07-07 更新

简介

一个轻量级服务器,可实现与Unsplash图像库的无缝集成,使开发人员能够直接从Cursor编辑器中使用各种过滤器搜索高质量照片。

简介

一个轻量级服务器,可实现与Unsplash图像库的无缝集成,使开发人员能够直接从Cursor编辑器中使用各种过滤器搜索高质量照片。

Unsplash MCP Server

English | 简体中文

一个简单的MCP服务器,用于无缝集成Unsplash图片和搜索功能。

Python 3.9+ License: MIT smithery badge

📋 概述

Unsplash MCP Server 用于搜索丰富且高质量的图片。非常适合希望将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许可证

📬 联系方式

工具列表

  • search_photos: Search for Unsplash photos Args: query: Search keyword page: Page number (1-based) per_page: Results per page (1-30) order_by: Sort method (relevant or latest) color: Color filter (black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue) orientation: Orientation filter (landscape, portrait, squarish) Returns: List[UnsplashPhoto]: List of search results containing photo objects with the following properties: - id: Unique identifier for the photo - description: Optional text description of the photo - urls: Dictionary of available image URLs in different sizes - width: Original image width in pixels - height: Original image height in pixels

服务配置

[{'mcpServers': {'unsplash': {'args': ['run', '--with', 'fastmcp', 'fastmcp', 'run', './server.py'], 'command': 'uv', 'env': {'UNSPLASH_ACCESS_KEY': '${YOUR_ACCESS_KEY}'}}}}]

来源