mcp-trello

mcp-trello

MCP server for Trello integration, enabling management of workspaces, boards, lists, cards, and checklists through natural language.

Category
访问服务器

README

MCP Trello Extension

A Model Context Protocol (MCP) extension for Claude that provides comprehensive Trello integration. This extension allows you to manage Trello workspaces, boards, lists, cards, and checklists directly through Claude.

Features

Workspace Management

  • List Workspaces: View all accessible Trello workspaces
  • Create Workspace: Create new workspaces with optional display name, description, and website
  • Delete Workspace: Permanently delete workspaces
  • Set Current Workspace: Set a workspace as current for context-aware operations
  • Get Current Workspace: View information about the currently selected workspace

Board Management

  • List Boards: View all boards in the current workspace
  • Create Board: Create new boards with optional descriptions
  • Delete Board: Permanently delete boards

List (Column) Management

  • List Board Lists: View all lists/columns in a specific board
  • Create Board List: Create new lists with positioning options (top, bottom, or specific position)
  • Delete Board List: Archive/delete lists from boards

Card Management

  • List Board Cards: View all cards in a specific board with detailed information
  • Create Card: Create new cards with optional descriptions and due dates
  • Update Card: Modify existing cards (name, description, due date, or move between lists)
  • Delete Card: Permanently delete cards

Checklist Management

  • Create Checklist: Create new checklists in cards
  • Delete Checklist: Permanently delete checklists
  • Add Checklist Item: Add items to checklists with optional checked state
  • Delete Checklist Item: Remove items from checklists

Prerequisites

  • Python 3.11+
  • Trello API credentials (API Key and Token)
  • Optional: uv package manager (for development or uvx installation)

Installation

Option 1: Desktop Extension (Recommended for Claude Desktop)

Download the latest .dxt file from the releases page and install it directly in Claude Desktop:

  1. Open Claude Desktop
  2. Go to Settings > Extensions
  3. Click "Install Extension"
  4. Select the downloaded .dxt file
  5. Configure your Trello API credentials in the extension settings

Option 2: Standard MCP Server (via PyPI)

pip install mbeauv-mcp-trello

Option 3: Install from source

  1. Clone the repository:

    git clone https://github.com/mbeauv/mcp-trello.git
    cd mcp-trello
    
  2. Install dependencies:

    uv sync
    
  3. Set up environment variables: Create a .env file in the project root:

    TRELLO_API_KEY=your_trello_api_key
    TRELLO_TOKEN=your_trello_token
    LOG_LEVEL=INFO
    TRELLO_MCP_SAFE_MODE=true
    

Safe Mode

The extension includes a Safe Mode feature to prevent accidental destructive operations. When enabled (default), destructive tools are not available:

Safe Mode Enabled (Default)

  • ✅ Available: All read and create operations
  • ❌ Disabled: All delete operations

Safe Mode Disabled

  • ✅ Available: All operations including destructive ones

Destructive Tools (Disabled in Safe Mode)

  • delete_workspace - Delete workspaces
  • delete_board - Delete boards
  • delete_board_list - Delete lists
  • delete_card - Delete cards
  • delete_checklist - Delete checklists
  • delete_checklist_item - Delete checklist items

Configuration

Set TRELLO_MCP_SAFE_MODE=false in your environment variables to enable destructive operations:

TRELLO_MCP_SAFE_MODE=false

⚠️ Warning: Only disable safe mode when you're confident about destructive operations. Deletions are permanent and cannot be undone.

Getting Trello Credentials

  1. Get your API Key:

  2. Generate a Token:

    • Visit: https://trello.com/1/authorize?expiration=never&scope=read,write&response_type=token&name=MCP%20Trello&key=YOUR_API_KEY
    • Replace YOUR_API_KEY with your actual API key
    • Authorize the application
    • Copy the generated token

Configuration

For Claude Desktop

Create or update your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

Option 1: Using pip installation (Recommended)

{
  "mcpServers": {
    "trello": {
      "command": "python",
      "args": ["-m", "mcp_trello.main"],
      "env": {
        "TRELLO_API_KEY": "your_api_key",
        "TRELLO_TOKEN": "your_token",
        "LOG_LEVEL": "INFO",
        "TRELLO_MCP_SAFE_MODE": "true"
      }
    }
  }
}

Option 2: Using uvx (if you prefer uv)

{
  "mcpServers": {
    "trello": {
      "command": "uvx",
      "args": ["--from", "mbeauv-mcp-trello", "mbeauv-mcp-trello"],
      "env": {
        "TRELLO_API_KEY": "your_api_key",
        "TRELLO_TOKEN": "your_token",
        "LOG_LEVEL": "INFO",
        "TRELLO_MCP_SAFE_MODE": "true"
      }
    }
  }
}

Option 3: From source (development)

{
  "mcpServers": {
    "trello": {
      "command": "/path/to/uv",
      "args": ["run", "python", "-m", "mcp_trello.main"],
      "env": {
        "TRELLO_API_KEY": "your_api_key",
        "TRELLO_TOKEN": "your_token",
        "LOG_LEVEL": "INFO",
        "TRELLO_MCP_SAFE_MODE": "true"
      }
    }
  }
}

For mcp-cli

Create a server_config.json file in the project root:

{
  "mcpServers": {
    "trello": {
      "command": "/path/to/uv",
      "args": ["run", "python", "main.py"],
      "env": {
        "PYTHONPATH": ".",
        "TRELLO_API_KEY": "your_api_key",
        "TRELLO_TOKEN": "your_token",
        "LOG_LEVEL": "INFO",
        "TRELLO_MCP_SAFE_MODE": true
      }
    }
  }
}

Usage

Starting the Server

uv run python main.py

Using with mcp-cli

# List available tools
uv run mcp-cli tools --server main.py list

# List workspaces
uv run mcp-cli tools --server main.py list_workspaces

# Set current workspace
uv run mcp-cli tools --server main.py set_workspace --workspace_id "your_workspace_id"

# List boards in current workspace
uv run mcp-cli tools --server main.py list_boards_for_selected

# Create a board
uv run mcp-cli tools --server main.py create_board --name "New Project" --description "Project description"

# List cards in a board
uv run mcp-cli tools --server main.py list_board_cards --board_id "your_board_id"

# Create a card
uv run mcp-cli tools --server main.py create_card --name "New Task" --list_id "your_list_id" --description "Task description"

# Update a card
uv run mcp-cli tools --server main.py update_card --card_id "your_card_id" --name "Updated Task" --description "Updated description"

Using with Claude Desktop

Once configured, the Trello tools will be available in Claude's interface. You can interact with them naturally:

  • "Show me all my Trello workspaces"
  • "Create a new board called 'Project Alpha'"
  • "List all cards in my current board"
  • "Create a card called 'Important Task' in the 'To Do' list"

Available Tools

Workspace Tools

  • list_workspaces - List all accessible workspaces
  • create_workspace - Create a new workspace
  • delete_workspace - Delete a workspace
  • set_workspace - Set current workspace
  • get_current_workspace - Get current workspace info

Board Tools

  • list_boards_for_selected - List boards in current workspace
  • create_board - Create a new board
  • delete_board - Delete a board

List Tools

  • list_board_lists - List all lists in a board
  • create_board_list - Create a new list
  • delete_board_list - Delete a list

Card Tools

  • list_board_cards - List all cards in a board
  • create_card - Create a new card
  • update_card - Update an existing card
  • delete_card - Delete a card

Checklist Tools

  • create_checklist - Create a new checklist
  • delete_checklist - Delete a checklist
  • add_checklist_item - Add item to checklist
  • delete_checklist_item - Delete item from checklist

Architecture

TrelloClient Class

The core API client that handles all Trello API interactions:

  • Refactored Design: Uses a centralized _make_request() method to reduce code duplication
  • Error Handling: Consistent error handling across all API calls
  • Authentication: Automatic inclusion of API credentials in all requests
  • Type Safety: Full type hints for better development experience

MCP Server

Built using FastMCP for simplified tool definition:

  • Tool Decorators: Uses @mcp.tool() decorators for clean tool definitions
  • Global State: Maintains current workspace context
  • Comprehensive Logging: Detailed logging for debugging and monitoring
  • Error Recovery: Graceful error handling with user-friendly messages

Building Desktop Extension

To build the .dxt file for Desktop Extension deployment:

# From the project root (recommended)
uv run python dxt/build_dxt.py

# Or with regular Python (if uv not available)
python dxt/build_dxt.py

This creates a mbeauv-mcp-trello-{version}.dxt file that can be installed directly in Claude Desktop.

Development

Project Structure

mcp-trello/
├── main.py              # MCP server implementation
├── trello_client.py     # Trello API client
├── pyproject.toml       # Project dependencies
├── server_config.json   # mcp-cli configuration
├── .env                 # Environment variables (create this)
└── README.md           # This file

Adding New Features

  1. Add API method to trello_client.py:

    async def new_feature(self, param: str) -> dict:
        return await self._make_request(
            method="GET",
            endpoint="/api/endpoint",
            params={"param": param},
            error_message="Error message"
        )
    
  2. Add MCP tool to main.py:

    @mcp.tool()
    async def new_tool(param: str) -> List[TextContent]:
        # Tool implementation
        pass
    

Testing

Test individual tools using mcp-cli:

# Test workspace listing
uv run mcp-cli tools --server main.py list_workspaces

# Test card creation
uv run mcp-cli tools --server main.py create_card --name "Test Card" --list_id "your_list_id"

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Troubleshooting

Common Issues

  1. "Missing Trello credentials"

    • Ensure .env file exists with TRELLO_API_KEY and TRELLO_TOKEN
    • Check that credentials are valid
  2. "uv not found"

    • Update the command path in configuration files
    • Use absolute path to uv executable
  3. "Server disconnected"

    • Check log files for detailed error messages
    • Verify API credentials are correct
    • Ensure network connectivity

Logging

The server provides comprehensive logging:

  • File: mcp_trello.log (if file logging is enabled)
  • Console: Real-time logging to stderr
  • Levels: DEBUG, INFO, WARNING, ERROR

Set log level via LOG_LEVEL environment variable.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Submit a pull request

License

[Add your license information here]

Support

For issues and questions:

  • Check the troubleshooting section
  • Review the Trello API documentation
  • Open an issue in the repository

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选