Skip to main content
Glama

MCPTrello

一个 MCP(Model Context Protocol)服务器,暴露一组小型、精选的 Trello 工具——目的是让智能体无需手工粘贴上下文即可读取并轻度更新 Trello 看板,同时也是一次关于工具描述如何塑造智能体行为的学习练习(每个工具背后的设计理由见 DESIGN_NOTES.md)。

工具

工具名

用途

list_boards

列出可访问的看板(id、名称、url)。

get_board_state

获取看板的完整开放状态:各列表中嵌套的未完成卡片。

get_card

按 id 读取单个卡片,包括其完整描述。

search_cards

按自由文本搜索卡片,可在单个看板或所有看板中搜索。

create_card

在列表中创建卡片。

update_card

更新卡片的名称、描述和/或截止日期。

move_card

将卡片移动到其他列表。

add_checklist_item

向卡片的清单中添加一项信息。

不在此 v1 范围之内:完整 CRUD、远程/OAuth 认证、访问限流、MCP resources/prompts、cc-init 命令、自动创建清单,以及多次调用之间缓存看板/列表名称。

Related MCP server: trello-mcp-server

设置

1. 获取 Trello 凭据

  1. 访问 https://trello.com/power-ups/admin,创建(或选择)一个 Power-Up,获得 API 密钥。

  2. 在同一密钥页面,按“Token”链接生成一个 令牌——这会授权该密钥以你的 Trello 账户身份进行操作。

2. 配置环境

cp .env.example .env

填写 .env:

TRELLO_API_KEY=...
TRELLO_TOKEN=...
DEFAULT_BOARD_ID=...   # optional — id of the board to use when `board` is omitted

DEFAULT_BOARD_ID 可选。未设置时,需要看板的工具要么要求你一个显式传入,要么(对于 search_cards)搜索你能访问的所有看板。

3. 安装并构建

需要 Node.js 18+。

npm install
npm run build

4. 注册到 Claude Code

claude mcp add trello -- node <absolute-path-to-repo>\dist\index.js

验证

  • npm run build —— TypeScript 构建;在任意源码改动后运行它。

  • npm run verify —— 将构建后的服务器作为子启动进程,通过 stdio 启动,并使用 MCP SDK 自带的 Client + StdioClientTransport, 列出所有工具,并针对你的真实 Trello 账户逐一调用每个工具(每个工具都包含至少一个错误/歧义情形)。**要求完全填好 .env`** —— 它会进行真实 API 调用。

  • MCP Inspector(npx @modelcontextprotocol/inspector --cli node ../../dist/index.js --method tools/list)是辅助、尽力而为的检查。每个已发布版本的 Inspector 都需要 Node ≥ 22.7.5;在 Node 18 上无法启动。如果你想运行它,请使用单独的 Node 22+ 安装(如 nvm),而不是提高项目的运行时要求。

Available Tools

11 tools
add_checklist_itemAdd Trello checklist itemA

Add an item to a checklist on a Trello card. card must be a card id (from get_board_state or search_cards). If the card has exactly one checklist, checklist is not needed — the item is added there. If the card has multiple checklists, checklist (a name, matched exact-then-substring) is required to pick one; if the card has no checklists at all, this tool errors rather than creating one — creating checklists is out of scope.

Inputs: card (required), item (required), checklist.

add_commentAdd Trello card commentA

Add a comment to a Trello card. card must be a card id (from get_board_state, search_cards, or get_card) — card names aren't resolved here because they're not reliably unique. Use this, not update_card, to leave feedback, findings, or a progress note: a comment is timestamped, attributed to the account behind the token, and appends to the card's thread, whereas update_card replaces the whole description and destroys whatever the human wrote there. Reach for update_card only when the card's own requirements have changed. Comment text is plain text with Trello's markdown (no tables), and is capped at 16384 characters.

Inputs: card (required), text (required).

create_cardCreate Trello cardA

Create a new Trello card in a list. list accepts a list id or a list name; if you pass a name, board narrows which board to search for it in (falls back to the server's default board if configured, otherwise every accessible board — pass board explicitly if you already know it, to avoid an ambiguous match across boards with same-named lists). name is the card title (required). desc, due (ISO 8601), pos (position within the list), idMembers and idLabels are optional.

Inputs: list (required), name (required), due, pos, +4 more.

get_board_metaGet Trello board members and labelsA

List the members and labels of a Trello board. Returns each member's id, full name and username, and each label's id, name and color. Use this to discover the ids/names to pass to update_card or create_card when assigning members (idMembers) or setting labels (idLabels). The board parameter accepts a board id or name; if omitted, falls back to the server's default board.

Inputs: board.

get_board_stateGet Trello board stateA

Get the full open state of a Trello board: every open list with its open cards nested underneath (card id, name, description, due date, and url). Use this to see what's currently on a board before deciding where to create or move a card. The board parameter accepts either a board id (from list_boards) or a board name; if omitted, falls back to the server's configured default board — omit it only when you know a default is configured, otherwise call list_boards first.

Inputs: board.

get_cardGet Trello cardA

Get a single Trello card by id, including its full description. Returns the card's id, name, description, due date, url, position, member ids, label ids, and the ids of its list and board. Use this to read one card's requirements or notes without pulling the whole board — card must be a card id (from get_board_state or search_cards), not a name.

Inputs: card (required).

get_card_commentsGet Trello card commentsA

Read the comment thread on a Trello card, newest first. Returns {comments, count, truncated}, where each comment has an id, author username, author display name, timestamp, and text. card must be a card id (from get_board_state, search_cards, or get_card), not a name. Comments are invisible to every other tool — get_card and get_board_state return only the description — so call this before starting work on a card to pick up feedback left there, and before add_comment to see what has already been said. limit caps how many are returned (default 20, max 1000); when truncated is true, older comments exist that you have not seen — raise limit if the start of the thread matters.

Inputs: card (required), limit.

list_boardsList Trello boardsA

List all Trello boards accessible with the configured token. Returns each board's id, name, and url. Call this first to discover which boards exist and their ids — other tools accept either a board id or a board name, but passing the id returned here avoids a redundant name-lookup call.

Inputs: no named parameters.

move_cardMove Trello cardA

Move an existing Trello card to a different list. card must be a card id (from get_board_state or search_cards) — card names aren't resolved here because they're not reliably unique and a fuzzy search-based match could move the wrong card. list is the destination list, accepted as an id or a name; if you pass a name, board narrows which board to search for it in (same fallback behavior as create_card: server default board, else every accessible board).

Inputs: card (required), list (required), board.

search_cardsSearch Trello cardsA

Search for Trello cards by keyword across boards. Returns matching cards with id, name, description, due date, url, and — resolved from ids — the board name and list name each card lives in. query is a free-text search (Trello's search operators like list:"To Do" work too). board scopes the search to one board (accepts id or name) and overrides any configured default board; omit it to search the default board if one is configured, or every accessible board otherwise — which can be slow and noisy, so prefer passing board when you already know it.

Inputs: query (required), board.

update_cardUpdate Trello cardA

Update an existing Trello card's name, description, due date, position, members, and/or labels. card must be a card id (from get_board_state, search_cards, or get_card) — card names aren't resolved here because they're not reliably unique. At least one field is required; only the fields you pass are changed, the others are left untouched. Use this to update a card's own requirements, reorder it within its list (pos), assign members (idMembers), or set labels (idLabels). To leave feedback, findings, or a progress note, use add_comment instead — desc is a whole-field replace, so writing a note there means re-sending the human's original text and risking its loss.

pos accepts a number (e.g. 16384) or a string like "top", "bottom", or a number as a string. idMembers and idLabels accept ids or names (names are resolved against the card's board); pass an empty array to clear all members/labels. due is ISO 8601 (e.g. 2026-08-15).

Inputs: card (required), due, pos, desc, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a distinct resource+action target, and the descriptions actively route the agent between the easy-to-confuse pairs (get_board_state vs. search_cards vs. get_card; update_card vs. add_comment; list_boards vs. get_board_meta). The id-vs-name and default-board rules are stated consistently across tools, so there is little risk of misselection.

    Naming Consistency5/5

    All names are snake_case, verb-first, and follow a predictable get_/list_/search_/create_/update_/move_/add_ pattern. The board_* and card_* family naming makes the resource grouping obvious at a glance.

    Tool Count5/5

    Eleven tools is a well-scoped set for a Trello board/card workflow, and each one covers a distinct capability rather than a permutation of another. Nothing feels padded or redundant.

    Completeness3/5

    Core read/create/update/comment flows are covered, but the lifecycle has dead ends: there is no delete or archive for cards, no way to create a checklist or check items off (add_checklist_item is one-way and no tool reads checklist state), and no list/board creation. An agent asked to clean up or finish checklist work would have to stop.

    Related MCP Connectors

    Related MCP Servers