# Trello MCP Server Setup Guide

## Issue
Cursor was unable to find the `mcp-server-trello` command, showing the error:
```
'mcp-server-trello' is not recognized as an internal or external command
Client error for command spawn mcp-server-trello ENOENT
```

## Solution

### 1. Installation Status
✅ The `mcp-server-trello` package has been installed globally via npm.

**Installation Location:**
- Executable: `C:\Users\JacoBrits\AppData\Roaming\npm\mcp-server-trello.cmd`
- Main script: `C:\Users\JacoBrits\AppData\Roaming\npm\node_modules\mcp-server-trello\build\index.js`

### 2. Configuration Steps

#### Step 1: Get Trello API Credentials

1. Go to [Trello API Keys](https://trello.com/app-key)
2. Copy your **API Key**
3. Click "Token" link to generate an API token
4. Copy the generated **Token**

#### Step 2: Configure Cursor MCP Settings

Cursor's MCP servers are configured in one of these locations:
- `%APPDATA%\Cursor\User\settings.json` (user settings)
- Workspace-specific `.cursor` folder
- Cursor's MCP configuration file

**Option A: Using Command Name (Recommended if PATH is set)**
```json
{
  "mcpServers": {
    "trello": {
      "command": "mcp-server-trello",
      "env": {
        "TRELLO_API_KEY": "your_api_key_here",
        "TRELLO_TOKEN": "your_token_here",
        "TRELLO_BOARD_ID": "optional_default_board_id"
      }
    }
  }
}
```

**Option B: Using Full Path (More Reliable)**
```json
{
  "mcpServers": {
    "trello": {
      "command": "node",
      "args": [
        "C:\\Users\\JacoBrits\\AppData\\Roaming\\npm\\node_modules\\mcp-server-trello\\build\\index.js"
      ],
      "env": {
        "TRELLO_API_KEY": "your_api_key_here",
        "TRELLO_TOKEN": "your_token_here",
        "TRELLO_BOARD_ID": "optional_default_board_id"
      }
    }
  }
}
```

**Option C: Using Wrapper Script**
```json
{
  "mcpServers": {
    "trello": {
      "command": "C:\\Users\\JacoBrits\\AppData\\Roaming\\npm\\mcp-server-trello.cmd",
      "env": {
        "TRELLO_API_KEY": "your_api_key_here",
        "TRELLO_TOKEN": "your_token_here",
        "TRELLO_BOARD_ID": "optional_default_board_id"
      }
    }
  }
}
```

### 3. Restart Cursor

After updating the configuration:
1. Close Cursor completely
2. Restart Cursor
3. The MCP server should now connect successfully

### 4. Verify Installation

To test if the server works from command line:
```powershell
$env:TRELLO_API_KEY="your_key"
$env:TRELLO_TOKEN="your_token"
mcp-server-trello
```

The server should start without errors (it will wait for MCP protocol messages via stdio).

## Available Trello MCP Tools

Once configured, the following tools will be available:

- `get_cards_by_list_id` - Fetch cards from a specific list
- `get_lists` - Retrieve all lists from a board
- `get_recent_activity` - Fetch recent board activity
- `add_card_to_list` - Add a new card
- `update_card_details` - Update card information
- `archive_card` - Archive a card
- `move_card` - Move card between lists
- `add_list_to_board` - Create a new list
- `archive_list` - Archive a list
- `get_my_cards` - Get all cards assigned to you
- `attach_image_to_card` - Attach image to card
- `list_boards` - List all accessible boards
- `set_active_board` - Set default board
- `list_workspaces` - List all workspaces
- `set_active_workspace` - Set default workspace
- `list_boards_in_workspace` - List boards in workspace
- `get_active_board_info` - Get current board info
- `get_board_members` - Get board members
- `assign_member_to_card` - Assign member to card
- `remove_member_from_card` - Remove member from card
- `get_board_labels` - Get board labels
- `create_label` - Create new label
- `update_label` - Update label
- `delete_label` - Delete label
- `get_card_history` - Get card action history

## Troubleshooting

### Command Not Found
- Ensure `C:\Users\JacoBrits\AppData\Roaming\npm` is in your PATH
- Use Option B (full path) in configuration instead

### Environment Variables Not Set
- Ensure `TRELLO_API_KEY` and `TRELLO_TOKEN` are set in the MCP configuration
- Restart Cursor after updating environment variables

### Server Not Starting
- Check Cursor's output/logs for MCP server errors
- Verify Node.js is installed: `node --version`
- Test the server manually with environment variables set

## References

- Package: [mcp-server-trello on npm](https://www.npmjs.com/package/mcp-server-trello)
- GitHub: [Infall-Insurance/mcp-server-trello](https://github.com/Infall-Insurance/mcp-server-trello)
- Trello API: [Trello API Documentation](https://developer.atlassian.com/cloud/trello/)
