Adoliin/trello-mcp-server
If you are the rightful owner of trello-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that provides tools for interacting with the Trello API.
Trello MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with the Trello API. Built on the Generic MCP Server Template.
Features
- Trello Integration: Complete access to Trello boards, lists, cards, and more
- Comprehensive API Coverage: Support for all major Trello operations
- Modular Architecture: Clear separation of concerns with a well-defined structure
- Type Safety: Full TypeScript support with proper typing for Trello objects
- Error Handling: Robust error management throughout the codebase
Project Structure
trello-mcp-server/
āāā src/
ā āāā services/ # Service classes for Trello API interactions
ā ā āāā base-service.ts # Abstract base service with common functionality
ā ā āāā trello-service.ts # Core Trello API service
ā ā āāā board-service.ts # Service for Trello boards
ā ā āāā list-service.ts # Service for Trello lists
ā ā āāā card-service.ts # Service for Trello cards
ā ā āāā member-service.ts # Service for Trello members
ā ā āāā label-service.ts # Service for Trello labels
ā ā āāā checklist-service.ts # Service for Trello checklists
ā ā āāā service-factory.ts # Factory for creating service instances
ā āāā tools/ # MCP tool definitions and handlers
ā ā āāā board-tools.ts # Board tool definitions
ā ā āāā board-tool-handlers.ts # Board tool handlers
ā ā āāā list-tools.ts # List tool definitions
ā ā āāā list-tool-handlers.ts # List tool handlers
ā ā āāā card-tools.ts # Card tool definitions
ā ā āāā card-tool-handlers.ts # Card tool handlers
ā ā āāā member-tools.ts # Member tool definitions
ā ā āāā member-tool-handlers.ts # Member tool handlers
ā ā āāā label-tools.ts # Label tool definitions
ā ā āāā label-tool-handlers.ts # Label tool handlers
ā ā āāā checklist-tools.ts # Checklist tool definitions
ā ā āāā checklist-tool-handlers.ts # Checklist tool handlers
ā ā āāā trello-tools.ts # Combined tool definitions
ā ā āāā trello-tool-handlers.ts # Combined tool handlers
ā āāā types/ # TypeScript type definitions
ā ā āāā trello-types.ts # Trello type definitions
ā āāā config.ts # Configuration management
ā āāā index.ts # Main entry point
āāā .env.example # Example environment variables
āāā package.json # Project dependencies and scripts
āāā tsconfig.json # TypeScript configuration
āāā README.md # Project documentation
Getting Started
Prerequisites
- Node.js 18 or higher
- npm or yarn
- Trello API key and token
Installation
-
Clone this repository:
git clone https://github.com/yourusername/trello-mcp-server.git cd trello-mcp-server
-
Install dependencies:
npm install
-
Create a
.env
file based on.env.example
:cp .env.example .env
-
Edit the
.env
file with your Trello API key and token:TRELLO_API_KEY=your_trello_api_key TRELLO_TOKEN=your_trello_token
You can obtain these from the Trello Developer Portal.
Building and Running
-
Build the project:
npm run build
-
Run the server:
npm start
Available Tools
The server provides tools for interacting with all major Trello resources:
Board Tools
get_boards
- Get all boards for the authenticated userget_board
- Get a specific board by IDcreate_board
- Create a new boardupdate_board
- Update an existing boarddelete_board
- Delete a boardget_board_lists
- Get all lists on a boardget_board_members
- Get all members of a boardget_board_labels
- Get all labels on a boardclose_board
- Close (archive) a boardreopen_board
- Reopen a closed board
List Tools
get_list
- Get a specific list by IDcreate_list
- Create a new list on a boardupdate_list
- Update an existing listarchive_list
- Archive a listunarchive_list
- Unarchive a listmove_list_to_board
- Move a list to a different boardget_cards_in_list
- Get all cards in a listarchive_all_cards
- Archive all cards in a listmove_all_cards
- Move all cards in a list to another listupdate_list_position
- Update the position of a list on a boardupdate_list_name
- Update the name of a listsubscribe_to_list
- Subscribe to a list
Card Tools
get_card
- Get a specific card by IDcreate_card
- Create a new cardupdate_card
- Update an existing carddelete_card
- Delete a cardarchive_card
- Archive a cardunarchive_card
- Unarchive a cardmove_card_to_list
- Move a card to a different listadd_comment
- Add a comment to a cardget_comments
- Get comments on a cardadd_attachment
- Add an attachment to a cardget_attachments
- Get attachments on a carddelete_attachment
- Delete an attachment from a cardadd_member
- Add a member to a cardremove_member
- Remove a member from a cardadd_label
- Add a label to a cardremove_label
- Remove a label from a cardset_due_date
- Set the due date for a cardset_due_complete
- Mark a card's due date as complete or incomplete
Member Tools
get_me
- Get the authenticated member (current user)get_member
- Get a specific member by ID or usernameget_member_boards
- Get boards that a member belongs toget_member_cards
- Get cards assigned to a memberget_boards_invited
- Get boards that a member has been invited toget_member_organizations
- Get organizations that a member belongs toget_notifications
- Get notifications for the authenticated memberupdate_me
- Update the authenticated member's informationget_avatar
- Get the authenticated member's avatarsearch_members
- Search for members by nameget_board_members
- Get members of a boardget_organization_members
- Get members of an organizationget_card_members
- Get members assigned to a card
Label Tools
get_label
- Get a specific label by IDcreate_label
- Create a new label on a boardupdate_label
- Update an existing labeldelete_label
- Delete a labelget_board_labels
- Get all labels on a boardupdate_label_name
- Update the name of a labelupdate_label_color
- Update the color of a labelcreate_label_on_card
- Create a new label directly on a cardget_card_labels
- Get all labels on a cardadd_label_to_card
- Add a label to a cardremove_label_from_card
- Remove a label from a card
Checklist Tools
get_checklist
- Get a specific checklist by IDcreate_checklist
- Create a new checklist on a cardupdate_checklist
- Update an existing checklistdelete_checklist
- Delete a checklistget_checkitems
- Get all checkitems on a checklistcreate_checkitem
- Create a new checkitem on a checklistget_checkitem
- Get a specific checkitem on a checklistupdate_checkitem
- Update a checkitem on a checklistdelete_checkitem
- Delete a checkitem from a checklistupdate_checklist_name
- Update the name of a checklistupdate_checklist_position
- Update the position of a checklist on a cardget_checklist_board
- Get the board a checklist is onget_checklist_card
- Get the card a checklist is onupdate_checkitem_state_on_card
- Update a checkitem's state on a card
Configuration
The server uses a centralized configuration system in src/config.ts
. Configuration can be provided through:
- Environment variables
- Command line arguments (with
--env KEY=VALUE
) - Default values in the code
Required environment variables:
TRELLO_API_KEY
- Your Trello API keyTRELLO_TOKEN
- Your Trello API token
Optional environment variables:
TRELLO_ALLOWED_BOARD_IDS
- Comma-separated list of board IDs to restrict access to
Board Access Control
You can restrict the MCP server to only access specific Trello boards by setting the TRELLO_ALLOWED_BOARD_IDS
environment variable. This is useful for limiting the scope of the server to only work with certain boards.
To use this feature:
- Identify the board IDs you want to allow access to
- Set the
TRELLO_ALLOWED_BOARD_IDS
environment variable to a comma-separated list of these IDs:TRELLO_ALLOWED_BOARD_IDS=board123,board456,board789
- Alternatively, use the command line argument:
npm start -- --env TRELLO_ALLOWED_BOARD_IDS=board123,board456,board789
When this feature is enabled:
- The server will deny operations on boards not in the allowed list
- Access attempts to unauthorized boards will return an error message
- Cards and lists are checked based on the board they belong to
- Debugging can be enabled by setting
DEBUG=true
to see detailed logs of unauthorized access attempts
If no board IDs are specified, the server will allow access to all boards.
Error Handling
The server includes comprehensive error handling:
- Service-level error handling with rate limiting support
- Tool-level error handling with proper error messages
- MCP protocol error handling
- Trello API error handling
- Board access control logging
License
This project is licensed under the MIT License - see the LICENSE file for details.