图像搜索与生成工具

一个提供图像搜索、下载和生成功能的MCP服务器,支持Unsplash、Pexels和Pixabay的图片搜索,以及使用Google Gemini生成图像。

  • by jeffreyruoss
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 jeffreyruoss/ru-image-tools-mcp

使用说明

RU图像获取器

一个MCP(模型上下文协议)服务器,为Claude Code提供图像搜索、下载和生成工具。

特性

  • 搜索库存照片 横跨Unsplash、Pexels和Pixabay
  • 下载库存照片 通过Sharp自动进行WebP转换
  • 生成图像 使用谷歌Gemini

设置

  1. 安装依赖项:

    npm install
    
  2. 复制 .env.example 到 .env 并添加您的API密钥:

    cp .env.example .env
    
  3. 构建:

    npm run build
    

配置

将服务器添加到项目的 .mcp.json:

{
  "mcpServers": {
    "image-tools": {
      "command": "node",
      "args": ["path/to/image-tools/dist/index.js"],
      "env": {
        "PROJECT_ROOT": "."
      }
    }
  }
}

API密钥

服务 密钥 注册
Unsplash UNSPLASH_ACCESS_KEY https://unsplash.com/developers
像素 PEXELS_API_KEY https://www.pexels.com/api/
Pixabay PIXABAY_API_KEY https://pixabay.com/api/docs/
双子座 GEMINI_API_KEY https://aistudio.google.com/apikey

发展

npm run dev    # Watch mode
npm run build  # One-time build