Trello Task Manager MCP Server

Trello Task Manager MCP Server

Enables AI applications to manage tasks on a real Trello board by exposing four MCP tools for adding, listing, completing, and deleting tasks.

Category
访问服务器

README

Trello Task Manager MCP Server

A Python MCP server that allows AI applications to manage tasks on a real Trello board.

This project began as a local JSON Task Manager on Day 4. On Day 5, the storage layer was replaced with the Trello REST API while keeping the same MCP tool interface.

Features

The server exposes four MCP tools:

Tool Action
add_task Creates a Trello card in the To Do list
list_tasks Lists active cards from the To Do list
complete_task Moves a card to the Done list
delete_task Safely archives a Trello card

Architecture

User request
      ↓
AI application
      ↓
MCP client
      ↓
Trello Task Manager MCP Server
      ↓
Async HTTP client
      ↓
Trello REST API
      ↓
Trello board updated
      ↓
Structured MCP response

The MCP server defines the capabilities exposed to AI clients.

The Trello client handles:

  • Authentication
  • Asynchronous HTTP requests
  • Timeouts
  • HTTP errors
  • Network failures
  • Trello card operations

Project structure

task-manager-mcp/
├── .env.example
├── .gitignore
├── .python-version
├── README.md
├── get_trello_ids.py
├── main.py
├── pyproject.toml
├── trello_client.py
└── uv.lock

Main files

  • main.py — Defines the MCP server and its tools
  • trello_client.py — Handles Trello REST API communication
  • get_trello_ids.py — Discovers the Trello board and list IDs
  • .env.example — Documents the required environment variables
  • .env — Stores local credentials and is excluded from Git

Requirements

  • Python 3.11 or newer
  • uv
  • Node.js and npx for MCP Inspector
  • A Trello account
  • A Trello board with the required lists
  • Trello API credentials

Trello board structure

Create a board named:

MCP Task Manager

Create these lists:

To Do
In Progress
Done

Tasks are represented as Trello cards.

Installation

Clone the repository:

git clone YOUR_REPOSITORY_URL
cd task-manager-mcp

Install the dependencies:

uv sync

Environment configuration

Create your local .env file from the example:

Copy-Item .env.example .env

Add your private configuration:

TRELLO_API_KEY=your_api_key
TRELLO_TOKEN=your_token
TRELLO_BOARD_ID=your_board_id
TRELLO_TODO_LIST_ID=your_todo_list_id
TRELLO_IN_PROGRESS_LIST_ID=your_in_progress_list_id
TRELLO_DONE_LIST_ID=your_done_list_id

Never commit .env.

The public .env.example file must contain only empty values:

TRELLO_API_KEY=
TRELLO_TOKEN=
TRELLO_BOARD_ID=
TRELLO_TODO_LIST_ID=
TRELLO_IN_PROGRESS_LIST_ID=
TRELLO_DONE_LIST_ID=

Discovering Trello IDs

After adding TRELLO_API_KEY and TRELLO_TOKEN to .env, run:

uv run python get_trello_ids.py

The script finds the board named MCP Task Manager and displays its board and list IDs.

Copy those IDs into .env.

Board and list IDs are configuration identifiers. The API token is the sensitive credential and must never be shared.

Verify the configuration

Run:

uv run python -c "from trello_client import validate_configuration; validate_configuration(); print('Trello configuration is valid')"

Expected output:

Trello configuration is valid

Test the Trello connection

Run:

uv run python -c "import asyncio; from trello_client import trello_request; result = asyncio.run(trello_request('GET', '/members/me', params={'fields': 'username'})); print('Connected to Trello as:', result['username'])"

Run with MCP Inspector

Start the server through MCP Inspector:

uv run mcp dev main.py

Connect to the server and select List Tools.

The following tools should appear:

add_task
list_tasks
complete_task
delete_task

Tool examples

Add a task

Tool:

add_task

Input:

{
  "title": "Prepare Day 6 MCP article",
  "description": "Add resources and reusable prompts"
}

The server creates a card in the Trello To Do list.

List tasks

Tool:

list_tasks

Input:

{}

This returns the active cards from the configured To Do list.

Complete a task

Tool:

complete_task

Input:

{
  "card_id": "your-trello-card-id"
}

The card moves from its current list to Done.

Delete a task

Tool:

delete_task

Input:

{
  "card_id": "your-trello-card-id"
}

The server archives the card instead of permanently deleting it.

Archiving is safer because the card remains recoverable through Trello.

Structured responses

Trello returns large card objects containing internal metadata.

The MCP server returns only the useful fields:

{
  "id": "trello-card-id",
  "title": "Prepare Day 6 MCP article",
  "description": "Add resources and reusable prompts",
  "completed": false,
  "url": "https://trello.com/c/..."
}

This creates a stable boundary between Trello and MCP clients.

Error handling

The server handles:

  • Missing configuration
  • Empty task titles
  • Empty card IDs
  • Invalid card IDs
  • Trello HTTP errors
  • Authentication failures
  • Network failures
  • Request timeouts

Expected failures are converted into clear MCP tool errors instead of exposing long internal tracebacks.

Security

The following values must never be committed or published:

  • Trello API token
  • Real .env contents
  • Credentials in screenshots
  • Credentials in documentation
  • Credentials in Git history

Before committing, verify that .env is ignored:

git check-ignore -v .env

If a token is accidentally committed, revoke it immediately and generate a new one.

Local storage versus Trello

Day 4

MCP tool
    ↓
Local Python function
    ↓
tasks.json

Day 5

MCP tool
    ↓
Trello API client
    ↓
Trello REST API
    ↓
Real Trello card

The public tool names remain familiar even though the backend implementation changed completely.

Key lessons

This project demonstrates:

  • Building MCP tools with FastMCP
  • Connecting MCP to a real external platform
  • REST API authentication
  • Secure environment-variable configuration
  • Asynchronous HTTP requests with httpx
  • Request timeouts
  • Controlled API error handling
  • Structured MCP responses
  • Separation between MCP logic and integration logic
  • Safe deletion through archiving
  • Keeping an external system as the source of truth

Next step

Day 6 will extend this server with:

  • MCP resources
  • Resource URIs
  • Board and card context
  • Reusable prompts
  • Daily planning workflows
  • Weekly task-summary workflows

Day 5 gave the server the ability to act.

Day 6 will give it reusable context and guided workflows.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选