Trello MCP Server
# Trello MCP Server
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that connects your Trello workspace to Claude and other MCP-compatible AI clients. Manage boards, lists, cards, comments, labels, checklists, and more through natural language.
Supports both **local (stdio)** and **remote (Streamable HTTP)** transports — run it as a local process for Claude Desktop or deploy it as a remote server that anyone can connect to from Claude.ai, Claude Code, Cursor, and other MCP hosts.
---
## Features
**20 tools** covering the full Trello workflow:
| Category | Tools |
|---|---|
| **Boards** | `list_boards`, `get_board`, `create_board` |
| **Lists** | `get_lists`, `create_list`, `archive_list` |
| **Cards** | `get_cards`, `get_card`, `create_card`, `update_card`, `move_card`, `archive_card`, `delete_card` |
| **Comments** | `add_comment` |
| **Labels** | `get_labels`, `create_label` |
| **Checklists** | `add_checklist`, `add_checklist_item` |
| **Members** | `get_board_members` |
| **Search** | `search` |
---
## Prerequisites
- **Node.js** 18 or higher
- A **Trello account** with API credentials (see [Getting Your Trello Credentials](#getting-your-trello-credentials))
---
## Getting Your Trello Credentials
1. Go to **https://trello.com/power-ups/admin**
2. Create a new Power-Up (or select an existing one)
3. Click **"API Key"** in the left sidebar — copy the **API Key** shown at the top
4. On the same page, click the **"Token"** link (it appears as a hyperlink below the API Key) — this opens a new page asking you to authorize the app. Click **"Allow"** and then copy the long token string that appears.
> **Common mistake:** The Power-Up admin page also shows an **"API Secret"** field just below the API Key. Do **not** use this — it is not the same as the token. You must click the "Token" link and go through the authorization step to get a valid token.
> **Attachment downloads failing (401)?** The default "Token" link may generate a token with limited scope. For full functionality including image attachments, generate your token manually with explicit scope by visiting (replace `YOUR_API_KEY`):
> ```
> https://trello.com/1/authorize?expiration=never&name=TrelloMCP&scope=read,write&response_type=token&key=YOUR_API_KEY
> ```
> Keep both values safe. The API key identifies your app; the token grants access to your Trello data.
---
## Quick Start
```bash
git clone https://github.com/Haavi97/trello-mcp-server
cd trello-mcp-server
npm install
npm run build
```
---
## Usage
### Option A: Local Server (stdio) — Claude Desktop / Claude Code
This is the simplest setup. The MCP client launches the server as a subprocess.
#### Claude Desktop
Edit your config file:
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"trello": {
"command": "node",
"args": ["/absolute/path/to/trello-mcp-server/build/index.js"],
"env": {
"TRELLO_API_KEY": "your_api_key",
"TRELLO_TOKEN": "your_token"
}
}
}
}
```
Restart Claude Desktop to load the server.
#### Claude Code
```bash
claude mcp add trello \
-e TRELLO_API_KEY=your_api_key \
-e TRELLO_TOKEN=your_token \
-- node /absolute/path/to/trello-mcp-server/build/index.js
```
---
### Option B: Remote Server (Streamable HTTP)
Deploy the server as an HTTP service so any MCP client can connect over the network — no local install required.
#### Run locally
```bash
TRELLO_API_KEY=your_key TRELLO_TOKEN=your_token npm run start:http
```
The server starts on port 3000 by default. Override with the `PORT` env var.
```
Trello MCP server (Streamable HTTP) listening on port 3000
MCP endpoint: http://localhost:3000/mcp
Health check: http://localhost:3000/health
```
#### Connect from Claude.ai
1. Open **Settings → Connectors → Add Custom Connector**
2. Enter the URL: `https://your-deployed-server.example.com/mcp`
3. Click **Connect**
#### Connect from Claude Code
```bash
claude mcp add --transport http trello https://your-deployed-server.example.com/mcp
```
#### Connect from Cursor / Other Clients
Add to your MCP config (`.cursor/mcp.json`, etc.):
```json
{
"mcpServers": {
"trello": {
"url": "https://your-deployed-server.example.com/mcp"
}
}
}
```
For clients that don't support Streamable HTTP natively, use the `mcp-remote` proxy:
```json
{
"mcpServers": {
"trello": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-deployed-server.example.com/mcp"]
}
}
}
```
---
## Deployment
### Docker
```bash
docker build -t trello-mcp-server .
docker run -d \
--name trello-mcp \
-p 3000:3000 \
-e TRELLO_API_KEY=your_key \
-e TRELLO_TOKEN=your_token \
trello-mcp-server
```
### Docker Compose
```yaml
services:
trello-mcp:
build: .
ports:
- "3000:3000"
environment:
- TRELLO_API_KEY=${TRELLO_API_KEY}
- TRELLO_TOKEN=${TRELLO_TOKEN}
restart: unless-stopped
```
### Cloud Platforms
The Docker image runs on any container platform. Suggested options:
| Platform | Notes |
|---|---|
| **Railway / Render / Fly.io** | Push-to-deploy from Git, environment variables in dashboard |
| **Google Cloud Run** | Serverless, scales to zero, ideal for low-traffic usage |
| **AWS ECS / Fargate** | Production-grade, integrates with your existing AWS infra |
| **Koyeb** | Supports scale-to-zero, built-in autoscaling |
| **Portainer** | If you're already running Docker on your own server |
Whichever platform you choose, make sure to set `TRELLO_API_KEY` and `TRELLO_TOKEN` as environment variables and expose port `3000` (or set `PORT` to match the platform's expected port).
---
## Development
```bash
# Run stdio mode in dev (auto-compiles via tsx)
TRELLO_API_KEY=xxx TRELLO_TOKEN=xxx npm run dev
# Run HTTP mode in dev
TRELLO_API_KEY=xxx TRELLO_TOKEN=xxx npm run dev:http
# Use MCP Inspector for interactive debugging
npm run inspector
```
---
## Project Structure
```
trello-mcp-server/
├── src/
│ ├── index.ts # Entry point — stdio transport (local)
│ ├── http.ts # Entry point — Streamable HTTP transport (remote)
│ ├── tools.ts # All 20 Trello tool definitions (shared)
│ └── trello-client.ts # Thin wrapper around the Trello REST API
├── Dockerfile
├── tsconfig.json
├── package.json
└── .env.example
```
The tool definitions in `tools.ts` are transport-agnostic. Both `index.ts` (stdio) and `http.ts` (Streamable HTTP) import and register the same set of tools, so behavior is identical regardless of how you run the server.
---
## Authentication & Security
This server currently uses **API key + token authentication** passed via environment variables. Each deployed instance is tied to a single Trello user's credentials.
**For production / multi-user deployments**, consider:
- Adding **OAuth 2.0** support so each connecting user authenticates with their own Trello account. The MCP spec supports OAuth with Dynamic Client Registration (DCR).
- Placing the server behind a **reverse proxy** (e.g., Cloudflare Access, Pomerium, or nginx with auth) to restrict who can reach the `/mcp` endpoint.
- Using **HTTPS** in production. If testing locally, tools like `ngrok` or Cloudflare Tunnel can provide an HTTPS URL.
---
## Moving from Local to Remote: Security Checklist
Running the HTTP transport exposes a network endpoint that anyone can reach. Before you do, these are the issues that go from theoretical to real:
### Before you write a single line of remote code
**Never commit `.env` to git.**
Add `.env` to `.gitignore` before your first `git init` / `git add`. Once credentials are in git history they are effectively public — even in a private repo. Use `.env.example` (already included) for documenting required variables with placeholder values only.
**Generate a token with a sensible expiry.**
Replace `expiration=never` with `expiration=30days` in your token URL. For a remote server, token rotation is manageable; a leaked never-expiring token is not.
### Before you open a port to the network
**Add a shared-secret guard on `/mcp`.**
Right now the `/mcp` endpoint accepts connections from anyone. At minimum, require a secret header that clients must supply:
```typescript
app.use("/mcp", (req, res, next) => {
if (req.headers["x-mcp-secret"] !== process.env.MCP_SECRET) {
return res.status(401).json({ error: "Unauthorized" });
}
next();
});
```
Set `MCP_SECRET` to a long random string in your environment. This is not a substitute for proper auth, but it prevents open access from the internet.
**Add rate limiting.**
Without it, anyone who discovers your endpoint can exhaust your Trello API quota (300 req/10s), effectively taking down the server for legitimate use.
```bash
npm install express-rate-limit
```
```typescript
import rateLimit from "express-rate-limit";
app.use("/mcp", rateLimit({ windowMs: 60_000, max: 60 }));
```
**Add security headers.**
```bash
npm install helmet
```
```typescript
import helmet from "helmet";
app.use(helmet());
```
**Bind to `127.0.0.1` by default, not `0.0.0.0`.**
In `src/http.ts`, change the `listen` call so the server only binds to all interfaces when you explicitly opt in:
```typescript
const HOST = process.env.HOST ?? "127.0.0.1";
app.listen(PORT, HOST, () => { ... });
```
Set `HOST=0.0.0.0` only in your production container environment.
### Before you deploy to a public URL
**Validate attachment URLs before fetching.**
The `downloadAttachment` method will forward your OAuth credentials to whatever host an attachment URL points to. Add an origin check:
```typescript
const allowed = /^https:\/\/([a-z0-9-]+\.)?trello\.com\//;
if (!allowed.test(attachmentUrl)) throw new Error("Untrusted attachment URL");
```
**Use HTTPS exclusively.**
Never deploy over plain HTTP. Use a reverse proxy (Nginx, Caddy, Traefik) or a platform that provides TLS termination automatically (Railway, Render, Fly.io, Cloud Run).
**Do not expose the `/health` endpoint publicly** (or at minimum make it return no sensitive information). It currently reveals that the server is running and its version, which helps attackers profile the target.
---
## Rate Limits
Trello's API enforces approximately **300 requests per 10 seconds per API key** and **100 requests per 10 seconds per token**. The server does not implement client-side rate limiting, but Trello will return `429` errors if limits are exceeded. See the [Trello API rate limits documentation](https://developer.atlassian.com/cloud/trello/guides/rest-api/rate-limits/) for details.
---
## Example Prompts
Once connected, you can ask your AI client things like:
- *"Show me all my Trello boards"*
- *"What cards are in the 'In Progress' list on my EasyFeedback board?"*
- *"Create a card called 'Fix login bug' in the To Do list with a due date of next Friday"*
- *"Move the 'Design review' card to Done"*
- *"Add a checklist called 'Acceptance Criteria' to that card with items: unit tests, integration tests, code review"*
- *"Search for cards mentioning 'deployment'"*
- *"Archive all cards in the 'Done' list"*
---
## Roadmap
- [ ] OAuth 2.0 support for multi-user authentication
- [ ] Webhook tool for real-time board change notifications
- [ ] Attachment upload/download support
- [ ] Custom fields read/write
- [ ] Board activity / audit log tool
- [ ] Batch operations (bulk card creation, bulk moves)
---
## Contributing
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
---
## License
MIT — see [LICENSE](LICENSE) for details.
TDQS
Scored across 21 tools
Most tools target clearly distinct resources and actions (boards, lists, cards, labels, checklists, members, search). Minor overlap exists between update_card and move_card, since moving could be considered a card property update, but the descriptions clarify move_card as a convenience wrapper.
The set mostly follows a predictable verb_noun snake_case pattern: get_board, create_card, archive_list, add_comment, etc. The main inconsistency is list_boards, which uses list_ where most retrieval tools use get_, plus plural/singular variation in get_lists/get_cards/get_card.
At 21 tools, the surface is somewhat heavy for a Trello integration, especially with separate convenience tools like move_card and granular checklist operations. The tools are mostly purposeful, but the set sits in the borderline 16-25 range.
Core board, list, and card workflows are covered, along with comments, labels, checklists, members, attachments, and search. However, notable gaps remain: no update/delete board, no update list or reorder lists, no checklist item completion/removal, no label assignment tool, and attachments are read-only.