@sjalq/trello-mcp-lite(这个名称在中文中可能没有直接对应的翻译,因为它看起来像是一个特定项目或库的名称,结合上下文,可以理解为“Trello MCP 轻量级插件/库(由 sjalq 开发)”,但具体翻译可能需根据项目或库的实际功能和背景来调整。)
最小化的Trello MCP服务器,支持多账户和智能API透传
一个轻量级、纯功能性的Trello MCP服务器,支持多账户,并提供带有智能聚合功能的直接API访问。
特性/功能
- 🔄 翻译为中文是:循环/旋转(符号本身表示循环或重复的动作,具体含义需根据上下文确定)。 多账户支持 - 同时管理多个Trello账户
- 🎯(目标) 直接API透传 - 完全访问Trello REST API v1
- 🧠 这个表情符号通常代表“大脑”或“思考”,在中文中可以翻译为“🧠(思考/大脑)”或者直接用“思考中”、“大脑”等词汇来表达其含义。不过,由于表情符号的直观性,直接保留“🧠”在某些语境下也是可以的,尤其是在网络交流中,它能迅速传达出思考或大脑的概念。 智能聚合 - 自动查询所有账户以进行读取操作
- 💾 表示“软盘”或“存储设备”。 持久存储 - 在本地安全地存储凭据
- ⚡(闪电符号,常用于表示快速、能量或警告等含义) 纯功能性 - 不可变操作,强大的错误处理
- 羽毛 轻便的 - 单文件,依赖极小
- ✅ 经过充分测试 - 基于属性的测试和集成测试
安装
通过Claude MCP CLI一键安装:
npx @sjalq/trello-mcp-lite或者在您的MCP设置中添加:
{
"mcpServers": {
"trello": {
"command": "npx",
"args": ["@sjalq/trello-mcp-lite"]
}
}
}快速入门
1. 获取您的Trello凭据
- API密钥访问 https://trello.com/app-key
- 代币点击同一页面上的“Token”链接以进行授权
2. 添加您的账户
// Using the manage_tokens tool
{
"operation": "add",
"name": "personal",
"apiKey": "your_api_key_here",
"token": "your_token_here"
}3. 开始使用Trello
// List all boards (aggregates across all accounts)
{
"endpoint": "/members/me/boards",
"method": "GET"
}
// Create a card on specific account
{
"endpoint": "/cards",
"method": "POST",
"account": "personal",
"body": {
"name": "My New Task",
"idList": "list_id_here",
"desc": "Task description"
}
}工具
1. trello_api 主API直通
直接访问支持多账户的Trello REST API v1。
参数:
endpoint(必填):API 端点(例如。,/boards/{id}/lists)method(必需):HTTP 方法(GET,POST,PUT,DELETE)account(可选):特定账户名称。省略此字段则对所有账户执行读取操作进行聚合query(可选):查询参数对象body(可选):POST/PUT/DELETE 请求的请求体
常见操作:
// 📋 List all boards (across all accounts)
{ "endpoint": "/members/me/boards", "method": "GET" }
// 📑 Get lists on a board
{ "endpoint": "/boards/{boardId}/lists", "method": "GET", "account": "work" }
// 📝 List cards in a list
{ "endpoint": "/lists/{listId}/cards", "method": "GET" }
// ➕ Create a card
{
"endpoint": "/cards",
"method": "POST",
"account": "personal",
"body": {
"name": "Task name",
"idList": "list_id",
"desc": "Description",
"due": "2025-12-31"
}
}
// ✏️ Update a card
{
"endpoint": "/cards/{cardId}",
"method": "PUT",
"body": { "name": "Updated name" }
}
// 📌 Move card to different list
{
"endpoint": "/cards/{cardId}",
"method": "PUT",
"body": { "idList": "new_list_id" }
}
// ✅ Complete/archive a card
{
"endpoint": "/cards/{cardId}",
"method": "PUT",
"body": { "closed": true }
}
// 💬 Add comment to card
{
"endpoint": "/cards/{cardId}/actions/comments",
"method": "POST",
"query": { "text": "My comment" }
}
// 🏷️ Add label to card
{
"endpoint": "/cards/{cardId}/idLabels",
"method": "POST",
"body": { "value": "label_id" }
}响应格式:
{
"status": 200,
"ok": true,
"data": { /* Trello API response */ }
}多账户聚合: 当你省略了 account 可聚合读取操作的参数(如 /members/me/boards), 该工具会自动查询所有已配置的账户:
{
"status": 207,
"ok": true,
"data": {
"personal": [{ "id": "abc", "name": "Personal Board" }],
"work": [{ "id": "xyz", "name": "Work Board" }],
"client": [{ "id": "def", "name": "Client Board" }]
}
}2. manage_tokens - 账户管理
管理您的Trello帐户凭据。
添加账户:
{
"operation": "add",
"name": "work",
"apiKey": "your_api_key",
"token": "your_token"
}移除账户:
{
"operation": "remove",
"name": "work"
}列出账户:
{
"operation": "list"
}多账户工作流
示例:管理个人与工作Trello(任务管理工具)
// 1. Add both accounts
manage_tokens({ operation: "add", name: "personal", apiKey: "...", token: "..." })
manage_tokens({ operation: "add", name: "work", apiKey: "...", token: "..." })
// 2. List all boards from both accounts
trello_api({ endpoint: "/members/me/boards", method: "GET" })
// Returns: { personal: [...], work: [...] }
// 3. Create card on work account
trello_api({
endpoint: "/cards",
method: "POST",
account: "work",
body: { name: "Work task", idList: "list123" }
})
// 4. Create card on personal account
trello_api({
endpoint: "/cards",
method: "POST",
account: "personal",
body: { name: "Personal task", idList: "list456" }
})存储
凭证安全地存储在:
~/.trello-mcp-lite/tokens.json格式:
{
"personal": {
"apiKey": "...",
"token": "..."
},
"work": {
"apiKey": "...",
"token": "..."
}
}API 参考文档
完整的Trello REST API文档:https://developer.trello.com/reference
最常见的终点(或结局指标):
/members/me/boards- 列出用户的板块/boards/{id}/lists- 在板上获取列表/lists/{id}/cards- 获取列表中的卡片/cards- 创建一张新卡片/cards/{id}- 更新/删除卡片/cards/{id}/actions/comments- 添加评论
发展
# Clone the repo
git clone https://github.com/sjalq/trello-mcp-lite.git
cd trello-mcp-lite
# Install dependencies
npm install
# Run tests
npm test建筑学
- 纯粹功能性所有操作都是不可变的转换
- 错误处理优雅降级,附带详细错误信息
- 记录日志用于调试的最小 stderr 日志记录
- 无国家突变读取 → 转换 → 写入模式
测试
包含全面的测试套件:
- 基于属性的测试(使用 fast-check)
- 集成测试
- 单元测试
npm test许可证
ISC(国际标准化组织/国际标准分类号等,具体含义需根据上下文确定)
作者
sjalq(注:此词在中文中无直接对应含义,可能是特定领域或语境下的术语,或为音译词汇,根据上下文可能需要具体解释或保留原样使用)
做出贡献
欢迎在 https://github.com/sjalq/trello-mcp-lite 上提出问题和提交拉取请求(PRs)
