T

Trello集成器

@diegofornalha/mcp-server-trello
0 Stars 15 次浏览 diegofornalha 更新于 2026-08-23

启用与Trello看板的无缝集成,允许用户管理卡片、列表和活动,同时自动处理速率限制并提供类型安全性。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "trello": {
      "args": [
        "-y",
        "@modelcontextprotocol/server-trello"
      ],
      "command": "npx",
      "env": {
        "TRELLO_API_KEY": "your-api-key",
        "TRELLO_BOARD_ID": "your-board-id",
        "TRELLO_TOKEN": "your-token"
      }
    }
  }
}

该服务需要配置环境变量:TRELLO_API_KEY、TRELLO_BOARD_ID、TRELLO_TOKEN

服务介绍

MCP Server Trello

一个提供与Trello看板交互工具的Model Context Protocol (MCP) 服务器。该服务器能够无缝集成Trello的API,同时自动处理速率限制、类型安全和错误处理。

特性

  • 完整的Trello看板集成:与卡片、列表及看板活动进行交互
  • 内置速率限制:遵守Trello API的限制(每个API密钥每10秒300次请求,每个令牌每10秒100次请求)
  • 类型安全实现:使用TypeScript编写,并带有全面的类型定义
  • 输入验证:对所有API输入进行强大的验证
  • 错误处理:优雅地处理错误并提供信息性的消息

安装

npm install @modelcontextprotocol/mcp-server-trello

配置

在你的MCP设置文件中添加服务器,配置如下:

{
  "mcpServers": {
    "trello": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-trello"],
      "env": {
        "TRELLO_API_KEY": "your-api-key",
        "TRELLO_TOKEN": "your-token",
        "TRELLO_BOARD_ID": "your-board-id"
      }
    }
  }
}

必需的环境变量

  • TRELLO_API_KEY:你的Trello API密钥(从https://trello.com/app-key获取)
  • TRELLO_TOKEN:你的Trello令牌(使用你的API密钥生成)
  • TRELLO_BOARD_ID:要交互的Trello看板ID(可在看板URL中找到)

可用工具

get_cards_by_list_id

从特定列表中获取所有卡片。

{
  name: 'get_cards_by_list_id',
  arguments: {
    listId: string  // ID of the Trello list
  }
}

get_lists

从配置的看板中检索所有列表。

{
  name: 'get_lists',
  arguments: {}
}

get_recent_activity

获取看板上的最近活动。

{
  name: 'get_recent_activity',
  arguments: {
    limit?: number  // Optional: Number of activities to fetch (default: 10)
  }
}

add_card_to_list

向指定列表添加新卡片。

{
  name: 'add_card_to_list',
  arguments: {
    listId: string,       // ID of the list to add the card to
    name: string,         // Name of the card
    description?: string, // Optional: Description of the card
    dueDate?: string,    // Optional: Due date (ISO 8601 format)
    labels?: string[]    // Optional: Array of label IDs
  }
}

update_card_details

更新现有卡片的详细信息。

{
  name: 'update_card_details',
  arguments: {
    cardId: string,       // ID of the card to update
    name?: string,        // Optional: New name for the card
    description?: string, // Optional: New description
    dueDate?: string,    // Optional: New due date (ISO 8601 format)
    labels?: string[]    // Optional: New array of label IDs
  }
}

archive_card

将卡片存档。

{
  name: 'archive_card',
  arguments: {
    cardId: string  // ID of the card to archive
  }
}

add_list_to_board

向看板添加新列表。

{
  name: 'add_list_to_board',
  arguments: {
    name: string  // Name of the new list
  }
}

archive_list

将列表存档。

{
  name: 'archive_list',
  arguments: {
    listId: string  // ID of the list to archive
  }
}

get_my_cards

获取分配给当前用户的所有卡片。

{
  name: 'get_my_cards',
  arguments: {}
}

速率限制

服务器实现了令牌桶算法来遵守Trello的API限制:

  • 每个API密钥每10秒300次请求
  • 每个令牌每10秒100次请求

如果达到限制,速率限制会自动处理,请求将被排队。

错误处理

服务器为各种情况提供了详细的错误消息:

  • 无效的输入参数
  • 超出速率限制
  • API认证错误
  • 网络问题
  • 无效的看板/列表/卡片ID

开发

前提条件

  • Node.js 16或更高版本
  • npm 或 yarn

设置

  1. 克隆仓库
git clone https://github.com/modelcontextprotocol/server-trello.git
cd server-trello
  1. 安装依赖项
npm install
  1. 构建项目
npm run build

运行测试

npm test

贡献

欢迎贡献!请阅读我们的贡献指南,了解行为准则以及提交拉取请求的过程。

许可证

本项目根据MIT许可证发布 - 详情请参阅LICENSE文件。

致谢