tomatrello-mcp
# tomatrello-mcp
MCP server สำหรับอ่าน เพิ่ม แก้ไข และลบ comment ใน Trello card
## เครื่องมือที่มี
- `list_comments` — อ่าน comment ล่าสุด และคืน `actionId` สำหรับนำไปแก้ไขหรือลบ
- `add_comment` — เพิ่ม comment
- `update_comment` — แก้ไข comment ด้วย `actionId`
- `delete_comment` — ลบ comment ด้วย `actionId`
`cardId` ใช้ได้ทั้ง ID เต็มของ card หรือ short link จาก URL เช่น URL
`https://trello.com/c/AbCd1234/card-name` จะใช้ `AbCd1234`
## การตั้งค่า Trello credentials
1. เปิด [Trello Power-Up Admin](https://trello.com/apps/admin) แล้วสร้างหรือเลือก Power-Up
2. ไปที่แท็บ **API Key** แล้วกด **Generate a new API Key** ค่านี้คือ `TRELLO_API_KEY`
3. สร้าง token ที่มีสิทธิ์ `read,write` โดยเปิด URL ด้านล่าง และแทนค่า `<API_KEY>`
```text
https://trello.com/1/authorize?expiration=never&scope=read,write&response_type=token&name=Trello%20Comment%20MCP&key=<API_KEY>
```
4. กด **Allow** แล้วคัดลอก token ที่แสดง ค่านี้คือ `TRELLO_TOKEN`
5. สร้างไฟล์ `.env` จาก `.env.example`
```dotenv
TRELLO_API_KEY=ค่าจากแท็บ_API_Key
TRELLO_TOKEN=ค่าจากหน้าหลังจากกด_Allow
```
อย่า commit หรือส่งต่อไฟล์ `.env` เพราะ token ใช้เข้าถึงข้อมูล Trello ในนามบัญชีผู้อนุญาตได้ หากรั่วให้ revoke แล้วสร้างใหม่ทันที
## เริ่มใช้งาน
```bash
npm install
npm run build
npm start
```
ระหว่างพัฒนาใช้ `npm run dev` และตรวจ type ด้วย `npm run check`
ตัวอย่าง config สำหรับ MCP client หลังจาก `npm run build`:
```json
{
"mcpServers": {
"tomatrello-mcp": {
"command": "node",
"args": ["/absolute/path/to/tomatrello-mcp/dist/index.js"],
"env": {
"TRELLO_API_KEY": "your_trello_api_key",
"TRELLO_TOKEN": "your_trello_token"
}
}
}
}
```
ถ้าใช้ `env` ใน MCP config อยู่แล้ว ไม่จำเป็นต้องสร้าง `.env`
TDQS
Scored across 4 tools
Each tool performs a distinct CRUD action (list, add, update, delete) on the same resource type, with no overlapping purposes. An agent can easily select the right tool for the intended operation.
All tool names follow the exact same verb_noun pattern (list_, add_, update_, delete_ + comment), making the set predictable and easy to navigate. The naming convention is uniform across all tools.
Four tools is a well-scoped count for a focused comments-only Trello server. Each tool covers a necessary operation without redundancy, and the count fits comfortably within the ideal range.
The tool set provides full CRUD coverage for the comments domain: read (list), create (add), update, and delete. There are no obvious gaps for the stated purpose of managing Trello card comments.