媒体资产管理服务

ImageKit MCP Server是一款基于Model Context Protocol的媒体资产管理工具,支持AI助手上传、搜索、转换和管理ImageKit媒体库中的资源。

  • by aiconnai
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 aiconnai/imagekit-mcp-server

使用说明

ImageKit MCP服务器

A. 模型上下文协议 (MCP)服务器 ImageKit.io 它允许AI助手上传、搜索、转换和管理ImageKit媒体库中的媒体资产。

快速开始

npx imagekit-mcp-server

需要三个环境变量:

IMAGEKIT_PUBLIC_KEY=public_xxx
IMAGEKIT_PRIVATE_KEY=private_xxx
IMAGEKIT_URL_ENDPOINT=https://ik.imagekit.io/your_id

从获取您的凭据 ImageKit仪表板.

MCP客户端配置

Claude 桌面版

增添 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "imagekit": {
      "command": "npx",
      "args": ["-y", "imagekit-mcp-server"],
      "env": {
        "IMAGEKIT_PUBLIC_KEY": "public_xxx",
        "IMAGEKIT_PRIVATE_KEY": "private_xxx",
        "IMAGEKIT_URL_ENDPOINT": "https://ik.imagekit.io/your_id"
      }
    }
  }
}

Claude 代码

增添 ~/.claude/settings.json:

{
  "mcpServers": {
    "imagekit": {
      "command": "npx",
      "args": ["-y", "imagekit-mcp-server"],
      "env": {
        "IMAGEKIT_PUBLIC_KEY": "public_xxx",
        "IMAGEKIT_PRIVATE_KEY": "private_xxx",
        "IMAGEKIT_URL_ENDPOINT": "https://ik.imagekit.io/your_id"
      }
    }
  }
}

光标

增添 .cursor/mcp.json 在您的项目中:

{
  "mcpServers": {
    "imagekit": {
      "command": "npx",
      "args": ["-y", "imagekit-mcp-server"],
      "env": {
        "IMAGEKIT_PUBLIC_KEY": "public_xxx",
        "IMAGEKIT_PRIVATE_KEY": "private_xxx",
        "IMAGEKIT_URL_ENDPOINT": "https://ik.imagekit.io/your_id"
      }
    }
  }
}

工具

工具 说明
list_files 使用过滤器(路径、类型、搜索查询、分页、排序)列出和搜索文件
list_folders 列出给定路径下的文件夹
get_file_details 获取文件的完整元数据(维度、标签、URL、日期)
upload_file 上传本地文件
upload_file_from_url 从远程URL上传
upload_base64_file 从base64数据上传
delete_file 按ID删除文件
create_folder 创建新文件夹
delete_folder 删除文件夹
move_file 将文件移动到其他文件夹
generate_url 通过转换(调整大小、裁剪、格式化、签名URL)生成URL

示例

问你的AI助手:

  • “列出/products/文件夹中的所有图像”
  • “将此屏幕截图上传到/shotscreens/2026/”
  • “为/heor banner.jpg生成300x300的缩略图”
  • “搜索名为'logo'的文件”
  • “将/旧文件夹/image.jpg移动到/新文件夹/”
  • “删除ID为abc123的文件”

发展

git clone https://github.com/aiconnai/imagekit-mcp-server.git
cd imagekit-mcp-server
npm install

# Set credentials
export IMAGEKIT_PUBLIC_KEY=public_xxx
export IMAGEKIT_PRIVATE_KEY=private_xxx
export IMAGEKIT_URL_ENDPOINT=https://ik.imagekit.io/your_id

# Run
node index.js

许可证

麻省理工学院