Skip to main content
Glama

trellio-mcp — Trello 的 MCP 服务器

License: GPL v3 Python 3.10+ MCP

一个 MCP 服务器,为 Claude Desktop、Claude Code 和 Gemini CLI 提供对 Trello API 的完全访问权限。基于 trellio 异步客户端库和官方 Python MCP SDK 构建。遵循 BDD 指南 v1.8.0 开发。

功能

  • 48 个 MCP 工具 — 与 trellio 方法 1:1 映射,外加一个复合工具 get_board_overview

  • 2 个资源模板trello://board/{id}trello://card/{id},用于加载丰富上下文

  • 3 个提示词summarize_boardcreate_sprintdaily_standup 作为工作流快捷方式

  • 内置认证流程python -m trello_mcp auth 打开浏览器,用户点击“允许”,令牌安全存储

  • 结构化错误处理 — Trello API 错误被转换为清晰、可操作的 MCP 错误消息

  • stdio 传输 — 作为本地子进程运行,无网络暴露面

Related MCP server: Trello MCP Server

工具

类别

工具

数量

发现

list_boards, search

2

看板

get_board_overview, create_board, get_board, update_board, delete_board

5

列表

list_lists, create_list, update_list, archive_list

4

卡片

list_cards, create_card, get_card, update_card, archive_card, unarchive_card, delete_card, add_label_to_card, remove_label_from_card

9

标签

list_board_labels, create_label, update_label, delete_label

4

核对清单

list_card_checklists, create_checklist, delete_checklist, create_check_item, update_check_item, delete_check_item

6

评论

list_comments, add_comment, update_comment, delete_comment

4

成员

get_me, list_board_members, get_member

3

附件

list_attachments, create_attachment, get_attachment, upload_attachment, download_attachment, delete_attachment

6

Webhooks

list_webhooks, create_webhook, get_webhook, update_webhook, delete_webhook

5

卡片工具在创建和更新时支持 pos(顶部/底部)、idLabels(逗号分隔)、due(ISO 8601)和 dueComplete(true/false)。

先决条件

  • Python 3.10+

  • Trello API Key(将 http://localhost:8095 添加到允许的来源)

安装

Smithery

npx @smithery/cli install gupta/trellio-mcp --client claude

使用 pipx (推荐)

全局安装以便在 PATH 中使用 trellio-mcp 命令:

pipx install trellio-mcp

或者,您可以直接运行而无需安装:

pipx run trellio-mcp

(注意:如果您使用 pipx run,您的 MCP 客户端配置也必须使用 pipx 作为命令,并将 run trellio-mcp 作为参数。)

使用 pip

pip install trellio-mcp

从源码安装

git clone https://github.com/scaratec/trellio-mcp.git
cd trellio-mcp
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"

认证

交互式 (推荐)

在每台机器上运行 auth 命令以连接您的 Trello 账户:

如果您已全局安装(pipx installpip install):

TRELLO_API_KEY=your_api_key trellio-mcp auth

如果使用即时执行(pipx run):

TRELLO_API_KEY=your_api_key pipx run trellio-mcp auth

这将打开一个浏览器,您可以在其中授权该应用程序。令牌会被自动捕获并存储在 ~/.config/trellio-mcp/credentials.json 中(权限 0600)。

认证后,无需环境变量 — 服务器在启动时会读取存储的凭据。

环境变量 (备选)

如果未找到存储的凭据,服务器将回退到环境变量:

export TRELLO_API_KEY=your_api_key
export TRELLO_TOKEN=your_token

MCP 客户端配置

Claude Desktop

添加到 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "trello": {
      "command": "pipx",
      "args": ["run", "trellio-mcp"]
    }
  }
}

如果使用环境变量认证而不是存储的凭据,请添加:

"env": {
  "TRELLO_API_KEY": "your_api_key",
  "TRELLO_TOKEN": "your_token"
}

Claude Code

添加到 ~/.claude/settings.json 或项目 .claude/settings.json

{
  "mcpServers": {
    "trello": {
      "command": "pipx",
      "args": ["run", "trellio-mcp"]
    }
  }
}

Gemini CLI

添加到 ~/.gemini/settings.json

{
  "mcpServers": {
    "trello": {
      "command": "pipx",
      "args": ["run", "trellio-mcp"]
    }
  }
}

架构

MCP Client (Claude / Gemini)
    │ stdio (JSON-RPC)
    ▼
trellio-mcp (FastMCP)
    │ async/await
    ▼
trellio (httpx)
    │ HTTPS
    ▼
Trello API

关键决策(记录在 docs/adr/ 中):

ADR

决策

001

Python MCP SDK,与 trellio 语言对齐

002

stdio 传输 — 无网络攻击面

003

存储凭据,支持环境变量回退

004

1:1 工具映射 — 每个 trellio 方法对应一个工具

005

trellio 作为 PyPI 依赖 (>=1.4.0)

006

工具 + 资源 + 提示词作为 MCP 能力

007

isError=true + 结构化错误内容

测试

该项目使用 behave 进行 BDD 测试,遵循 BDD 指南 v1.8.0

PYTHONPATH=src .venv/bin/python -m behave
17 features passed, 0 failed, 0 skipped
163 scenarios passed, 0 failed, 0 skipped
970 steps passed, 0 failed, 0 skipped

测试架构:

  • AsyncMock(spec=TrellioClient) — 在客户端边界进行模拟,而非 HTTP 层

  • 通过模拟调用记录进行持久化验证 (§4.3)

  • 通过具有 >= 2 个变体的场景大纲防止硬编码 (§2.3)

  • 逐层枚举失败路径 (§4.5)

  • 按照 §13 进行独立规范审计

有关 BDD 驱动开发过程的详细说明,请参阅 案例研究

项目结构

trellio-mcp/
├── src/trello_mcp/
│   ├── __init__.py        # Tool registration
│   ├── __main__.py        # Entry point (server + auth)
│   ├── server.py          # FastMCP instance + client mgmt
│   ├── auth.py            # OAuth flow + credential storage
│   ├── errors.py          # Error translation (ADR 007)
│   ├── tools/             # 10 modules, 48 tools
│   ├── resources.py       # 2 resource templates
│   └── prompts.py         # 3 prompts
├── features/              # 17 BDD feature files
│   └── steps/             # Step definitions
├── docs/
│   ├── adr/               # 7 Architecture Decision Records
│   ├── tool-design.md     # Scenario-driven tool analysis
│   └── case-study-bdd-mcp-server.md
└── pyproject.toml

发布

PyPI

uv build
twine upload dist/trellio_mcp-<version>*

Smithery

命名空间为 gupta。在新的 PyPI 版本发布后更新版本:

npx @smithery/cli mcp publish "https://github.com/scaratec/trellio-mcp" -n gupta/trellio-mcp

同时更新 smithery.yaml commandFunction 中的固定版本。

许可证

本项目采用 GNU 通用公共许可证 v3.0 — 详情请参阅 LICENSE 文件。

Install Server
A
license - permissive license
B
quality
B
maintenance

Maintenance

Maintainers
Response time
1dRelease cycle
11Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • DoStuff network MCP.

  • Project management MCP for AI agents with safe task reads and writes.

  • Monday.com MCP — wraps the Monday.com GraphQL API (BYO API key)

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scaratec/trellio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server