Trello模型上下文协议服务端TypeScript工具
通过 Model Context Protocol (MCP) 工具启用与 Trello 看板、列表和卡片的交互,利用 TypeScript 实现类型安全和异步操作。
服务介绍
Trello MCP 服务器 (TypeScript)
这是一个用于 Trello 集成的 Model Context Protocol (MCP) 服务器的 TypeScript 实现,提供了工具让 AI 助手能够与 Trello 的看板、列表和卡片进行交互。
特性
- 通过 MCP 工具实现完整的 Trello API 集成
- 异步操作以提高性能
- 使用 TypeScript 实现类型安全
- 全面的错误处理
- 基于环境的配置
前提条件
- Node.js 18.x 或更高版本
- npm 或 yarn
- Trello API 凭证
安装
# Install dependencies
make install
配置
在根目录下创建一个 .env 文件,并填写您的 Trello 凭证:
TRELLO_API_KEY=your_api_key
TRELLO_TOKEN=your_token
可用命令
# Install dependencies
make install
# Build the project
make build
# Start the server
make start
# Clean build artifacts
make clean
# Run linter
make lint
MCP 工具
get_boards
检索经过身份验证用户的所有 Trello 看板。
// No input parameters required
get_lists
从指定的看板中获取所有列表。
{
"request": {
"board_id": string // ID of the board
}
}
get_cards
从看板或特定列表中获取卡片。
{
"request": {
"board_id": string, // ID of the board
"list_id"?: string // Optional: ID of a specific list
}
}
get_card_details
检索特定卡片的详细信息。
{
"request": {
"card_id": string // ID of the card
}
}
开发
该项目使用 TypeScript 以确保类型安全并提供更好的开发体验。源代码组织如下:
src/index.ts- 主服务器入口点src/trello-client.ts- Trello API 客户端实现src/types.ts- TypeScript 类型定义
构建
该项目使用 TypeScript 编译器进行构建:
# Build the project
make build
# The output will be in the build/ directory
错误处理
该服务器实现了全面的错误处理,包括:
- API 身份验证错误
- 速率限制
- 网络问题
- 无效的请求参数
贡献
- 分叉仓库
- 创建你的特性分支 (
git checkout -b feature/amazing-feature) - 提交你的更改 (
git commit -m 'Add some amazing feature') - 推送到分支 (
git push origin feature/amazing-feature) - 打开一个 Pull Request
与 Cline 一起使用
要将此 MCP 服务器与 Cline 一起使用,请将以下配置添加到你的 Cline MCP 设置文件中 (~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):
{
"mcpServers": {
"trello-ts": {
"command": "node",
"args": ["/path/to/mcp-server-ts-trello/build/index.js"],
"env": {
"TRELLO_API_KEY": "your_api_key",
"TRELLO_TOKEN": "your_token"
}
}
}
}
添加配置并重启 Cline 后,您可以使用以下 MCP 工具:
get_boards: 列出所有 Trello 看板get_lists: 从看板获取列表get_cards: 从看板或列表获取卡片get_card_details: 获取卡片详细信息
许可证
ISC 许可证 - 详情请参见 LICENSE 文件