Token导航 LogoToken导航TokenDH.com
Unsplash MCP Server Swift logo
开发工具未说明官方级别未说明来源级核验

Unsplash MCP Server Swift

MCP Server

a Swift implementation of hellokaton/unsplash-mcp-server, with additional features like get_photo and random_photo

工具数

0

提示词数

0

GitHub Stars

14

资源数

0
GoClaude开发工具Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

okooo5km

提供方

okooo5km

最后核验

2026/5/18 03:33

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Unsplash MCP服务器

提供Unsplash照片搜索和检索功能的模型上下文协议服务器。此服务器使LLM能够从Unsplash的广泛收藏中搜索、检索和获取随机照片。这是一个Go实现,它提供了以下工具 search_photos, get_photo,以及 random_photo.

Go Platform License

✨ 特性

  • 高级图像搜索:使用滤镜在Unsplash的丰富照片库中搜索:

- 关键词相关性 - 配色方案 - 方向选项 - 自定义排序和分页

  • 详细照片信息:获取特定照片的全面详细信息,包括EXIF数据、位置和摄影师信息
  • 随机照片选择:使用灵活的过滤选项获取随机照片
  • 多种连接模式:

- 用于与LLM直接集成的标准I/O模式 - 基于web的连接的服务器发送事件(SSE)模式

可用工具

  • search_photos -在Unsplash上搜索照片

- query (字符串,必填):搜索关键字 - page (数字,可选):页码(从1开始),默认值:1 - per_page (数字,可选):每页结果(1-30),默认值:10 - order_by (字符串,可选):排序方法(相关或最新),默认:“相关” - color (字符串,可选):滤色器(black_and_white、黑色、白色、黄色、橙色、红色、紫色、品红色、绿色、青色、蓝色) - orientation (字符串,可选):方向过滤器(横向、纵向、方形)

  • get_photo -获取特定照片的详细信息

- photoId (string,必填):要检索的照片ID

  • random_photo -获取一张或多张随机照片

- count (数量,可选):要返回的照片数量(默认值:1;最大值:30) - collections (字符串,可选):用于筛选选择的公共集合ID。如果是多个,用逗号分隔 - topics (字符串,可选):用于筛选选择的公共主题ID。如果是多个,用逗号分隔 - username (字符串,可选):将选择限制为特定用户 - query (字符串,可选):将选择限制为与搜索词匹配的照片 - orientation (字符串,可选):按照片方向过滤。有效值:横向、纵向、方形 - content_filter (字符串,可选):根据内容安全限制结果。有效值:低、高 - featured (布尔值,可选):将选择限制为特色照片

安装

选项1:下载预构建二进制文件

从以下网址下载适用于您平台的最新预构建二进制文件 请参阅第页,并按照下面的安装说明进行操作。

macOS Installation

带苹果硅(M1/M2/M3)的macOS:

# Download the arm64 version
curl -L https://github.com/okooo5km/unsplash-mcp-server-go/releases/latest/download/unsplash-mcp-server-macos-arm64.zip -o unsplash-mcp-server.zip
unzip unsplash-mcp-server.zip
chmod +x unsplash-mcp-server

# Remove quarantine attribute to avoid security warnings
xattr -d com.apple.quarantine unsplash-mcp-server

# Install to your local bin directory
mkdir -p ~/.local/bin
mv unsplash-mcp-server ~/.local/bin/
rm unsplash-mcp-server.zip

配备英特尔处理器的macOS:

# Download the x86_64 version
curl -L https://github.com/okooo5km/unsplash-mcp-server-go/releases/latest/download/unsplash-mcp-server-macos-x86_64.zip -o unsplash-mcp-server.zip
unzip unsplash-mcp-server.zip
chmod +x unsplash-mcp-server

# Remove quarantine attribute to avoid security warnings
xattr -d com.apple.quarantine unsplash-mcp-server

# Install to your local bin directory
mkdir -p ~/.local/bin
mv unsplash-mcp-server ~/.local/bin/
rm unsplash-mcp-server.zip

macOS通用二进制(适用于Apple Silicon和Intel):

# Download the universal version
curl -L https://github.com/okooo5km/unsplash-mcp-server-go/releases/latest/download/unsplash-mcp-server-macos-universal.zip -o unsplash-mcp-server.zip
unzip unsplash-mcp-server.zip
chmod +x unsplash-mcp-server

# Remove quarantine attribute to avoid security warnings
xattr -d com.apple.quarantine unsplash-mcp-server

# Install to your local bin directory
mkdir -p ~/.local/bin
mv unsplash-mcp-server ~/.local/bin/
rm unsplash-mcp-server.zip

Linux Installation

x86_64上的Linux(最常见):

# Download the amd64 version
curl -L https://github.com/okooo5km/unsplash-mcp-server-go/releases/latest/download/unsplash-mcp-server-linux-amd64.tar.gz -o unsplash-mcp-server.tar.gz
tar -xzf unsplash-mcp-server.tar.gz
chmod +x unsplash-mcp-server

# Install to your local bin directory
mkdir -p ~/.local/bin
mv unsplash-mcp-server ~/.local/bin/
rm unsplash-mcp-server.tar.gz

ARM64上的Linux(例如Raspberry Pi 4、AWS Graviton):

# Download the arm64 version
curl -L https://github.com/okooo5km/unsplash-mcp-server-go/releases/latest/download/unsplash-mcp-server-linux-arm64.tar.gz -o unsplash-mcp-server.tar.gz
tar -xzf unsplash-mcp-server.tar.gz
chmod +x unsplash-mcp-server

# Install to your local bin directory
mkdir -p ~/.local/bin
mv unsplash-mcp-server ~/.local/bin/
rm unsplash-mcp-server.tar.gz

Windows Installation

x86_64上的Windows(最常见):

  • 下载 Windows AMD64版本
  • 解压缩ZIP文件
  • 移动 unsplash-mcp-server.exe 到路径中的某个位置

ARM64上的Windows(例如ARM设备上的Windows):

  • 下载 Windows ARM64版本
  • 解压缩ZIP文件
  • 移动 unsplash-mcp-server.exe 到路径中的某个位置

确保安装目录在PATH中:

  • macOS/Linux:添加 export PATH="$HOME/.local/bin:$PATH" 到您的shell配置文件(.bashrc, .zshrc等等)
  • 视窗:通过“系统属性”>“环境变量”对话框将目录添加到系统PATH中

选项2:从源代码构建

  1. 克隆存储库:
   git clone https://github.com/okooo5km/unsplash-mcp-server-go.git
   cd unsplash-mcp-server-go
  1. 构建项目:

使用Make(推荐):

   # Build for your current platform
   make

   # Or build for a specific platform
   make build-darwin-universal    # macOS Universal Binary
   make build-darwin-arm64        # macOS Apple Silicon
   make build-darwin-amd64        # macOS Intel
   make build-linux-amd64         # Linux x86_64
   make build-linux-arm64         # Linux ARM64
   make build-windows-amd64       # Windows x86_64

   # Or build for all platforms at once
   make build-all

   # Create distribution packages for all platforms
   make dist

二进制文件将被放置在 .build 目录。

直接使用Go:

   go build -o unsplash-mcp-server
  1. 安装二进制文件:
   # Install to user directory (recommended, no sudo required)
   mkdir -p ~/.local/bin
   cp unsplash-mcp-server ~/.local/bin/

确保 ~/.local/bin 通过将以下内容添加到shell配置文件中,将其添加到PATH中:

   echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc  # or ~/.bashrc
   source ~/.zshrc  # or source ~/.bashrc

配置

环境变量

服务器需要Unsplash API访问密钥才能运行。在您的环境中设置它:

export UNSPLASH_ACCESS_KEY="your-access-key-here"

获取Unsplash API访问密钥

  1. 转到 Unsplash开发者门户
  2. 注册或登录您的Unsplash帐户
  3. 注册新应用程序
  4. 接受API使用和指南
  5. 填写您的申请详细信息(姓名、描述等)
  6. 注册后,您将收到您的访问密钥(也称为客户端ID)

为Claude.app进行配置

添加到您的Claude设置中:

"mcpServers": {
  "unsplash": {
    "command": "unsplash-mcp-server",
    "env": {
      "UNSPLASH_ACCESS_KEY": "your-access-key-here"
    }
  }
}

配置光标

将以下配置添加到游标编辑器中 settings.json:

{
  "mcpServers": {
    "unsplash": {
      "command": "unsplash-mcp-server",
      "env": {
        "UNSPLASH_ACCESS_KEY": "your-access-key-here"
      }
    }
  }
}

配置Chatwise

![](screenshots/chatwise.webp)

备注:在Chatwise中添加环境变量时,不要将值括在引号中(修复#1)

命令行参数

服务器支持以下命令行参数:

  • -h, --help:显示有关服务器、其使用情况和可用选项的帮助信息
  • -v, --version:显示非闪存mcp服务器的版本号
  • -t, --transport :要使用的传输类型(默认值:“stdio”)

- stdio:与LLM直接集成的标准输入/输出模式 - sse:基于web的连接的服务器发送事件模式

  • -p, --port :在SSE模式下运行时使用的端口(默认值:8080)

示例用法:

# Display help information
unsplash-mcp-server --help

# Display version information
unsplash-mcp-server --version

# Start server with default settings (stdio mode)
unsplash-mcp-server

# Start server in SSE mode on the default port (8080)
unsplash-mcp-server --transport sse

# Start server in SSE mode on a custom port
unsplash-mcp-server --transport sse --port 9090

在SSE模式下运行时,服务器将可通过指定端口上的HTTP访问,从而允许基于web的客户端连接。在stdio模式(默认)下,服务器通过标准输入/输出进行通信,这非常适合与LLM应用程序直接集成。

系统提示示例

您可以使用以下系统提示来帮助Claude有效地利用unsplash mcp服务器:

You have access to Unsplash photo search tools through MCP. You can:

1. Search for photos using specific keywords, colors, or orientations:
   - Use the search_photos tool to find images on any topic
   - Filter by color or orientation as needed
   - You can page through results and control how many appear per page

2. Get detailed information about specific photos:
   - Use get_photo with a photo ID to retrieve comprehensive details
   - This includes EXIF data, location info, and photographer details

3. Fetch random photos with customizable filters:
   - Use random_photo tool to get surprise images based on criteria
   - Filter random selections by topic, collection, username, etc.

When the user asks for images, use these tools to find relevant Unsplash photos.
Include photo URLs in your responses so users can view the images.

开发要求

  • 转到1.20或更高版本
  • 取消屏蔽API访问密钥
  • MCP Go SDK 0.19.0或更高版本

使用示例

搜索照片

{
  "query": "mountain landscape",
  "per_page": 5,
  "color": "blue",
  "orientation": "landscape"
}

获取照片详细信息

{
  "photoId": "Dwu85P9SOIk"
}

获取随机照片

{
  "count": 3,
  "query": "coffee",
  "orientation": "portrait"
}

版本历史记录

有关版本历史记录和更改日志,请参阅GitHub Release。

☕️ 支持项目

如果您发现unsplash mcp服务器有用,请考虑支持其开发:

  • ⭐️ 在GitHub上启动该项目
  • 🐛 在问题跟踪器中报告错误或建议功能
  • 🔄 提交pull请求以帮助改进代码
  • 💝 支持方式:

许可证

unsplash mcp服务器go根据MIT许可证获得许可。这意味着您可以根据MIT许可证的条款和条件自由使用、修改和分发软件。有关更多详细信息,请参阅项目存储库中的LICENSE文件。

目录标签

目录标签

GoClaude开发工具developer-tools图片搜索本地部署UnsplashAPIGo语言开发图片检索随机图片

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP