ShotGrid MCP Server

ShotGrid MCP Server

site icon
2025.04.17 7
PythonShotGrid 集成CRUD 操作缩略图管理开发效率
ShotGrid MCP Server 是一个基于 fastmcp 的高性能 ShotGrid 模型上下文协议(MCP)服务器实现。它提供了一套完整的工具集,用于与 ShotGrid 平台进行交互,包括实体创建、读取、更新和删除(CRUD)操作,以及缩略图的上传和下载。该服务器支持跨平台运行(Windows、macOS、Linux),并提供了高效的连接池管理和全面的测试覆盖。
View on GitHub

Overview

✨ 核心功能

  • 🚀 基于 fastmcp 的高性能实现
  • 🛠 完整的 CRUD 操作工具集
  • 🖼 专用的缩略图下载/上传工具
  • 🔄 高效的连接池管理
  • ✅ 使用 pytest 进行全面的测试覆盖
  • 📦 使用 UV 进行依赖管理
  • 🌐 跨平台支持(Windows、macOS、Linux)

🚀 使用场景

  • 在 ShotGrid 平台上进行实体管理
  • 自动化处理 ShotGrid 数据
  • 开发与 ShotGrid 集成的应用程序

🔧 可用工具

  • create: 创建 ShotGrid 实体
  • read: 读取实体信息
  • update: 更新实体数据
  • delete: 删除实体
  • download_thumbnail: 下载实体缩略图
  • upload_thumbnail: 上传实体缩略图

🚀 快速开始

安装

使用 UV 安装:

uv pip install shotgrid-mcp-server

开发设置

  1. 克隆仓库:
git clone https://github.com/loonghao/shotgrid-mcp-server.git
cd shotgrid-mcp-server
  1. 安装开发依赖:
pip install -r requirements-dev.txt
  1. 开发命令 所有开发命令都通过 nox 管理。查看 noxfile.py 获取可用命令:
# 运行测试
nox -s tests

# 运行代码检查
nox -s lint

# 运行类型检查
nox -s type_check

# 更多...

⚙️ 配置

环境变量

创建一个 .env 文件,包含以下变量:

SHOTGRID_URL=your_shotgrid_url
SHOTGRID_SCRIPT_NAME=your_script_name
SHOTGRID_SCRIPT_KEY=your_script_key

🔌 MCP 客户端配置

要在您的 MCP 客户端中使用 ShotGrid MCP 服务器,请将以下配置添加到客户端的设置中:

{
  "mcpServers": {
    "shotgrid-server": {
      "command": "uvx",
      "args": [
        "shotgrid-mcp-server"
      ],
      "env": {
        "SHOTGRID_SCRIPT_NAME": "XXX",
        "SHOTGRID_SCRIPT_KEY": "XX",
        "SHOTGRID_URL": "XXXX"
      },
      "disabled": false,
      "alwaysAllow": [
        "search_entities",
        "create_entity",
        "batch_create",
        "find_entity",
        "get_entity_types",
        "update_entity",
        "download_thumbnail",
        "batch_update",
        "delete_entity",
        "batch_delete"
      ]
    }
  }
}

🔑 凭证设置

替换以下值为您的 ShotGrid 凭证: - SHOTGRID_SCRIPT_NAME: 您的 ShotGrid 脚本名称 - SHOTGRID_SCRIPT_KEY: 您的 ShotGrid 脚本密钥 - SHOTGRID_URL: 您的 ShotGrid 服务器 URL

🛡️ 工具权限

alwaysAllow 部分列出了无需用户确认即可执行的工具。这些工具经过精心选择,以确保操作的安全性。

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。