使用说明
克劳德代码的Trello MCP服务器
一种模型上下文协议(MCP)服务器,将Trello与Claude Code集成在一起,提供高级项目规划和任务管理功能以及智能任务分析。
特性
🎯 核心任务管理
- 创建、读取、更新和删除任务 跨Trello董事会和名单
- 自动板设置 使用标准列表(待办事项、进行中、已完成)
- 优先级管理 带有视觉指示器
- 到期日处理 支持自然语言(“明天”、“下周”)
- 状态跟踪 它映射到Trello列表位置
🧠 智能任务分析
- 复杂性评估 (简单/中等/复杂)基于内容分析
- 模糊任务检测 使用自然语言处理
- 自动任务拆分 用于过于复杂的任务
- 清晰度验证 生成澄清问题
- 全委员会分析 重点报道
🔧 高级功能
- 批量操作 高效的任务管理
- 自然语言到期日 (今天、明天、下周)
- 基于优先级的任务组织
- 全面的任务过滤 按状态、优先级或截止日期
- 实时任务智能 在创作过程中
安装
-
克隆并设置项目:
git clone <repository-url> cd trello-mcp-server npm install -
配置Trello API凭据:
- 复制
.env.example向.env - 从以下位置获取您的Trello API密钥:https://trello.com/app-key
- 通过访问生成API令牌:https://trello.com/1/authorize?expiration=never&scope=read,写入和响应类型=令牌和名称=克劳德%20Code%20MCP&key=YOUR_API_key
- 更新
.env使用您的凭据:TRELLO_API_KEY=your_api_key_here TRELLO_API_TOKEN=your_api_token_here DEFAULT_TRELLO_BOARD_ID=optional_default_board_id
- 复制
-
构建服务器:
npm run build
Claude代码集成
项目级配置(推荐)
创建 .mcp.json 在项目根目录中:
{
"mcpServers": {
"trello": {
"command": "node",
"args": ["/path/to/trello-mcp-server/build/index.js"],
"env": {
"TRELLO_API_KEY": "your_api_key",
"TRELLO_API_TOKEN": "your_api_token",
"DEFAULT_TRELLO_BOARD_ID": "your_default_board_id"
}
}
}
}
全局配置
添加到您的Claude代码配置中:
claude mcp add-json '{
"command": "node",
"args": ["/path/to/trello-mcp-server/build/index.js"],
"env": {
"TRELLO_API_KEY": "your_api_key",
"TRELLO_API_TOKEN": "your_api_token"
}
}'
使用示例
基本任务管理
// List available boards
await trello_list_boards();
// Setup a board with default lists
await trello_setup_board({ boardId: "board_id" });
// Create a task with intelligence
await trello_create_task({
boardId: "board_id",
title: "Implement user authentication",
description: "Create login/logout functionality with JWT tokens",
priority: "high",
dueDate: "next week"
});
// Update task status (automatically moves between lists)
await trello_update_task({
cardId: "card_id",
status: "in_progress"
});
智能任务分析
// Analyze entire board for improvements
await trello_analyze_board({
boardId: "board_id",
focusArea: "vague" // or "complex", "overdue", "all"
});
// Get clarifying questions for a vague task
await trello_clarify_task({
cardId: "card_id"
});
// Split a complex task into smaller ones
await trello_split_task({
cardId: "card_id",
autoCreate: true // Automatically create the suggested splits
});
高级过滤
// Get tasks by status
await trello_get_tasks({
boardId: "board_id",
status: "in_progress"
});
// Get tasks from specific list
await trello_get_tasks({
boardId: "board_id",
listName: "To Do"
});
可用工具
| 工具 | 说明 | 关键参数 |
|---|---|---|
trello_list_boards |
列出所有可访问的板 | - |
trello_get_board |
通过统计数据获取董事会详细信息 | boardId |
trello_create_task |
用智能创建任务 | boardId, title, description, priority, dueDate |
trello_update_task |
更新任务或更改状态 | cardId, title, description, status |
trello_analyze_board |
分析电路板以进行改进 | boardId, focusArea |
trello_split_task |
拆分复杂任务 | cardId, autoCreate |
trello_clarify_task |
生成澄清问题 | cardId |
trello_get_tasks |
筛选和检索任务 | boardId, listName, status |
trello_setup_board |
设置默认任务管理列表 | boardId |
任务智能功能
复杂性检测
系统根据以下因素自动识别任务复杂性:
- 内容长度 句子结构
- 技术关键词 (API、数据库、身份验证等)
- 多个动作动词 指示复合任务
- 实现复杂性 指标
模糊任务检测
自动标记包含以下内容的任务:
- 语言不清楚 (“不知何故”、“弄清楚”、“处理”等)
- 缺少验收标准
- 要求不明确
- 实施细节不完整
自动任务拆分
基于以下因素智能地建议任务划分:
- 自然语言连词 (“和”、“或”)
- 逗号分隔要求
- 复杂的实施模式
- 标准开发阶段 (规划、实施、测试)
发展
以开发模式运行
npm run dev # Watches for changes and rebuilds
MCP检验员测试
npx @modelcontextprotocol/inspector build/index.js
环境变量
TRELLO_API_KEY-您的Trello API密钥(必需)TRELLO_API_TOKEN-您的Trello API代币(必需)DEFAULT_TRELLO_BOARD_ID-默认操作板(可选)
建筑
组件
- TrelloClient:具有完整CRUD操作的核心API包装器
- 任务分析器:用于任务智能的自然语言处理
- MCP服务器:使用全面的工具处理程序实现协议
数据流
Claude Code → MCP Client → Trello MCP Server → Trello REST API → Trello Boards
任务状态映射
- 待定 → “待办事项”列表
- 进行中 → “进行中”列表
- 完成 → “完成”列表
贡献
- 分叉存储库
- 创建要素分支
- 添加新功能的测试
- 提交拉取请求
许可证
MIT许可证-有关详细信息,请参阅许可证文件。
支持
有关问题和功能请求,请在GitHub上打开一个问题,或参阅Trello API文档了解API相关问题。