Back to MCP directory
publicPublicdnsLocal runtime

unsplash-smart-mcp-server

Unsplash智能MCP服务器是为AI代理设计的专业图库集成方案,提供智能搜索、自动归因和项目感知的图片管理功能,简化开发者的视觉内容获取流程。

article

README

🚀 图像搜索与处理工具

本工具主要为 AI 代理提供支持,借助强大的搜索引擎,可快速精准地搜索到合适的图片。同时,它还具备自动下载与分类功能,能根据项目类型将图像智能分类到指定文件夹,并且支持批量处理多个图像请求,还可自动从 URL 中提取关键属性,确保信息完整。

🚀 快速开始

安装依赖

npm install

配置环境变量

创建一个 .env 文件并添加以下内容:

UNSPLASH_ACCESS_KEY=你的Unsplash API密钥

启动服务器

运行以下命令启动开发服务器:

npm run dev

✨ 主要特性

  • AI 工具增强:为你的 AI 代理提供完美的图像,每次都能成功。
  • 智能图像搜索:通过强大的搜索引擎,快速找到合适的图片。
  • 自动下载与分类:根据项目类型和类别,自动将图像分类到指定文件夹。
  • 批量处理支持:高效处理多个图像请求。
  • 属性提取:自动从 URL 中提取关键属性,确保信息完整。

📦 安装指南

搜索图片

使用 search 命令搜索并下载图像:

npx unsplash-smart-mcp-server search --query "your search term" --output ~/Downloads/stock-photos --projectType next

获取属性

使用 get_attributions 命令获取图片的属性信息:

npx unsplash-smart-mcp-server get-attributions --format json --projectPath your_project_path

📚 详细文档

搜索参数

| 参数 | 类型 | 描述 | 默认值 | | -------------- | ------ | ------------------------ | -------------------- | | query | string | 搜索关键词 | - | | output | string | 下载目录 | ~/Downloads/stock-photos | | projectType | string | 项目类型(next, react, vue, angular) | - | | category | string | 图片分类 | - | | downloadMode | string | 下载模式(download, urls_only) | urls_only |

获取属性参数

| 参数 | 类型 | 描述 | 默认值 | | -------------- | ------ | ------------------------ | -------------------- | | format | string | 输出格式(json, html, react) | json | | projectPath | string | 项目路径 | - | | outputPath | string | 输出路径 | - |

🚨 常见问题

连接被拒绝

确保服务器在指定端口上运行。

鉴权错误

验证你的 Unsplash API 密钥是否正确设置。

没有找到图片

尝试更广泛的搜索词或检查你的搜索查询。

下载权限问题

使用 downloadMode: 'urls_only' 并手动执行下载命令。

📄 许可证

MIT License

🤝 贡献指南

欢迎贡献!请随意提交拉取请求。

开发流程

  1. 克隆仓库。
  2. 安装依赖:npm install
  3. 创建一个 .env 文件并添加你的 Unsplash API 密钥。
  4. 使用开发模式运行:npm run dev
  5. 运行测试:npm test

🗺️ 未来计划

计划功能

  • 图像编辑功能:基本的调整工具。
  • 高级搜索过滤器:更精细的控制。
  • 批量处理:高效处理多个请求。
  • 自定义集合:保存和管理项目中的图像组。
  • 团队协作:共享属性和图像集合。
  • 使用分析:跟踪项目的图像使用情况。

为你的 AI 代理赋能,每次都能找到完美的图像。
由 ❤️ 开发,专为开发者和 AI 爱好者打造。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client