aprabhu84/my_trello_mcp_server
3.1
If you are the rightful owner of my_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 dayong@mcphub.com.
A Python-based MCP server for interacting with Trello boards, lists, and cards using FastAPI and async operations.
Tools
1
Resources
0
Prompts
0
Trello MCP (Model-Context-Protocol) Server
A Python-based MCP server for interacting with Trello boards, lists, and cards. This server provides a clean interface to interact with Trello's API using FastAPI and async operations.
Prerequisites
- Python 3.8 or higher
- A Trello account
- Trello API credentials (API Key, API Secret, and Token)
Installation
- Clone the repository:
git clone https://github.com/aprabhu84/my_trello_mcp_server.git
cd my_trello_mcp_server
- Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Install dependencies:
pip install fastapi uvicorn python-dotenv py-trello pydantic
Configuration
-
Get your Trello credentials:
- Go to https://trello.com/app-key
- Get your API key and API secret
- Generate a token using the provided link
-
Create a
.envfile in the app directory with your Trello credentials:
TRELLO_API_KEY=your_api_key_here
TRELLO_API_SECRET=your_api_secret_here
TRELLO_TOKEN=your_token_here
Project Structure
my_trello_mcp_server/
├── app/
│ ├── __init__.py
│ ├── main.py
│ ├── models/
│ │ ├── __init__.py
│ │ └── trello_models.py
│ ├── controllers/
│ │ ├── __init__.py
│ │ └── trello_controller.py
│ ├── services/
│ │ ├── __init__.py
│ │ └── trello_service.py
│ └── tools/
│ └── trello_tools.py
├── .env
└── requirements.txt
Usage
Using in Python Scripts
from app.tools.trello_tools import TrelloTools
# Initialize the tools
trello = TrelloTools()
# Get all boards
boards = trello.get_boards()
for board in boards:
print(f"Board: {board['name']}")
print(f"ID: {board['id']}")
# Get lists from a board
lists = trello.get_lists(board_id="your_board_id")
for lst in lists:
print(f"List: {lst['name']}")
# Get cards from a list
cards = trello.get_cards(list_id="your_list_id")
for card in cards:
print(f"Card: {card['name']}")
# Create a new card
new_card = trello.create_card(
list_id="your_list_id",
name="New Task",
description="Task description"
)
Using the API Server
- Start the server:
uvicorn app.main:app --reload --port 8000
- Access the API documentation at
http://localhost:8000/docs
Available Endpoints
- GET
/api/v1/boards- List all boards - GET
/api/v1/boards/{board_id}/lists- Get lists in a board - GET
/api/v1/lists/{list_id}/cards- Get cards in a list - POST
/api/v1/lists/{list_id}/cards- Create a new card
Features
- Async operations for better performance
- Clean MCP architecture
- Type hints for better code quality
- Auto-generated API documentation
- Easy-to-use Python tools interface
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.