Trello MCP服务器(TypeScript)
用于Trello集成的模型上下文协议(MCP)服务器的TypeScript实现,为AI助手提供与Trello板、列表和卡片交互的工具。
特性
- 通过MCP工具全面集成Trello API
- 异步操作以获得更好的性能
- 使用TypeScript实现类型安全
- 全面的错误处理
- 基于环境的配置
先决条件
- Node.js 18.x或更高版本
- npm或纱线
- 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 lintMCP工具
get_boards
检索经过身份验证的用户的所有Trello板。
// No input parameters requiredget_lists
从指定板获取所有列表。
{
"request": {
"board_id": string // ID of the board
}
}get_card
从板或特定列表中获取卡片。
{
"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) - 打开拉取请求
与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许可证-有关详细信息,请参阅许可证文件
