2025-03-09 16:42:28 +00:00
# Basecamp MCP Integration
2025-06-02 17:19:35 +01:00
This project provides a MCP (Model Context Protocol) integration for Basecamp 3, allowing Cursor to interact with Basecamp directly through the MCP protocol.
2025-03-09 16:42:28 +00:00
2025-06-02 17:19:35 +01:00
## Quick Setup for Cursor
2025-03-09 16:42:28 +00:00
### Prerequisites
- Python 3.7+
2025-06-06 10:23:50 +01:00
- A Basecamp 3 account
2025-03-09 16:42:28 +00:00
- A Basecamp OAuth application (create one at https://launchpad.37signals.com/integrations)
2025-06-02 17:19:35 +01:00
### Step-by-Step Instructions
2025-03-09 16:42:28 +00:00
2025-06-02 17:19:35 +01:00
1. **Clone and setup the project: **
```bash
2025-03-09 16:42:28 +00:00
git clone <repository-url>
cd basecamp-mcp
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
2025-06-02 17:19:35 +01:00
pip install --upgrade pip
2025-03-09 16:42:28 +00:00
pip install -r requirements.txt
```
2025-06-02 17:19:35 +01:00
2. **Create your `.env` file with your Basecamp OAuth credentials: **
2025-03-09 16:42:28 +00:00
```
2025-06-02 17:19:35 +01:00
BASECAMP_CLIENT_ID=your_client_id_here
BASECAMP_CLIENT_SECRET=your_client_secret_here
2025-03-09 16:42:28 +00:00
BASECAMP_REDIRECT_URI=http://localhost:8000/auth/callback
2025-06-02 17:19:35 +01:00
BASECAMP_ACCOUNT_ID=your_account_id_here
2025-03-09 16:42:28 +00:00
USER_AGENT="Your App Name (your@email .com)"
2025-06-02 17:19:35 +01:00
FLASK_SECRET_KEY=any_random_string_here
MCP_API_KEY=any_random_string_here
2025-03-09 16:42:28 +00:00
```
2025-06-02 17:19:35 +01:00
3. **Authenticate with Basecamp: **
```bash
2025-03-09 16:42:28 +00:00
python oauth_app.py
```
2025-06-02 17:11:39 +01:00
Visit http://localhost:8000 and complete the OAuth flow.
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
4. **Generate and install Cursor configuration: **
2025-06-02 17:19:35 +01:00
```bash
python generate_cursor_config.py
2025-03-09 16:42:28 +00:00
```
2025-06-06 10:23:50 +01:00
2025-06-02 17:11:39 +01:00
This script will:
- Generate the correct MCP configuration with full paths
2025-06-06 10:23:50 +01:00
- Automatically detect your virtual environment
2025-06-02 17:11:39 +01:00
- Include the BASECAMP_ACCOUNT_ID environment variable
- Update your Cursor configuration file automatically
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
5. **Restart Cursor completely ** (quit and reopen, not just reload)
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
6. **Verify in Cursor: **
- Go to Cursor Settings → MCP
- You should see "basecamp" with a **green checkmark **
- Available tools: "get_projects", "search_basecamp", "get_project", etc.
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
### Test Your Setup
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
```bash
# Quick test the MCP server
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | python mcp_server_cli.py
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
# Run automated tests
python -m pytest tests/ -v
```
2025-03-09 16:42:28 +00:00
2025-06-02 17:19:35 +01:00
## Available MCP Tools
2025-03-09 16:42:28 +00:00
2025-06-02 17:19:35 +01:00
Once configured, you can use these tools in Cursor:
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
- `get_projects` - Get all Basecamp projects
2025-06-06 10:23:50 +01:00
- `get_project` - Get details for a specific project
2025-06-02 17:11:39 +01:00
- `get_todolists` - Get todo lists for a project
- `get_todos` - Get todos from a todo list
- `search_basecamp` - Search across projects, todos, and messages
- `get_comments` - Get comments for a Basecamp item
2025-06-26 22:34:01 +01:00
- `get_campfire_lines` - Get recent messages from a Basecamp campfire
- `get_daily_check_ins` - Get project's daily check-in questions
- `get_question_answers` - Get answers to daily check-in questions
### Card Table Tools
- `get_card_table` - Get the card table details for a project
- `get_columns` - Get all columns in a card table
- `get_column` - Get details for a specific column
- `create_column` - Create a new column in a card table
- `update_column` - Update a column title
- `move_column` - Move a column to a new position
- `update_column_color` - Update a column color
- `put_column_on_hold` - Put a column on hold (freeze work)
- `remove_column_hold` - Remove hold from a column (unfreeze work)
- `watch_column` - Subscribe to notifications for changes in a column
- `unwatch_column` - Unsubscribe from notifications for a column
- `get_cards` - Get all cards in a column
- `get_card` - Get details for a specific card
- `create_card` - Create a new card in a column
- `update_card` - Update a card
- `move_card` - Move a card to a new column and/or position
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
### Example Cursor Usage
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
Ask Cursor things like:
- "Show me all my Basecamp projects"
- "What todos are in project X?"
- "Search for messages containing 'deadline'"
- "Get details for the Technology project"
2025-06-26 22:34:01 +01:00
- "Show me the card table for project X"
- "Create a new card in the 'In Progress' column"
- "Move this card to the 'Done' column"
- "Update the color of the 'Urgent' column to red"
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
## Architecture
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
The project consists of:
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
1. **OAuth App ** (`oauth_app.py` ) - Handles OAuth 2.0 flow with Basecamp
2025-06-06 10:23:50 +01:00
2. **MCP Server ** (`mcp_server_cli.py` ) - Implements MCP protocol for Cursor
2025-06-02 17:11:39 +01:00
3. **Token Storage ** (`token_storage.py` ) - Securely stores OAuth tokens
4. **Basecamp Client ** (`basecamp_client.py` ) - Basecamp API client library
5. **Search Utilities ** (`search_utils.py` ) - Search across Basecamp resources
2025-03-09 16:42:28 +00:00
## Troubleshooting
2025-06-02 17:11:39 +01:00
### Common Issues
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
- **Yellow indicator (not green):** Check that paths in Cursor config are correct
- **"No tools available":** Make sure you completed OAuth authentication first
- **"Tool not found" errors:** Restart Cursor completely and check `mcp_cli_server.log`
- **Missing BASECAMP_ACCOUNT_ID:** The config generator automatically includes this from your `.env` file
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
### Configuration Issues
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
If automatic configuration doesn't work, manually edit your Cursor MCP configuration:
2025-03-09 16:42:28 +00:00
2025-06-06 10:23:50 +01:00
**On macOS/Linux:** `~/.cursor/mcp.json`
2025-06-02 17:11:39 +01:00
**On Windows:** `%APPDATA%\Cursor\mcp.json`
```json
2025-03-09 16:42:28 +00:00
{
2025-06-02 17:11:39 +01:00
"mcpServers": {
"basecamp": {
"command": "/full/path/to/your/project/venv/bin/python",
"args": ["/full/path/to/your/project/mcp_server_cli.py"],
"cwd": "/full/path/to/your/project",
"env": {
"PYTHONPATH": "/full/path/to/your/project",
"VIRTUAL_ENV": "/full/path/to/your/project/venv",
"BASECAMP_ACCOUNT_ID": "your_account_id"
}
}
}
2025-03-09 16:42:28 +00:00
}
```
2025-06-02 17:11:39 +01:00
### Key Requirements
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
Based on [Cursor community forums ](https://forum.cursor.com/t/mcp-servers-no-tools-found/49094 ), the following are essential:
2025-03-09 16:42:28 +00:00
2025-06-02 17:11:39 +01:00
1. **Full executable paths ** (not just "python")
2. **Proper environment variables ** (PYTHONPATH, VIRTUAL_ENV, BASECAMP_ACCOUNT_ID)
3. **Correct working directory ** (cwd)
4. **MCP protocol compliance ** (our server handles this correctly)
2025-03-09 16:42:28 +00:00
2025-06-02 17:26:56 +01:00
## Finding Your Account ID
2025-03-09 16:42:28 +00:00
2025-06-02 17:19:35 +01:00
If you don't know your Basecamp account ID:
1. Log into Basecamp in your browser
2. Look at the URL - it will be like `https://3.basecamp.com/4389629/projects`
3. The number (4389629 in this example) is your account ID
2025-03-09 16:42:28 +00:00
2025-06-02 17:19:35 +01:00
## Security Notes
2025-03-09 17:29:28 +00:00
2025-06-02 17:19:35 +01:00
- Keep your `.env` file secure and never commit it to version control
- The OAuth tokens are stored locally in `oauth_tokens.json`
- This setup is designed for local development use
2025-03-09 17:29:28 +00:00
2025-06-02 17:19:35 +01:00
## License
2025-03-09 17:29:28 +00:00
2025-06-02 17:26:56 +01:00
This project is licensed under the MIT License.