- Update README to reflect migration to FastMCP framework and improved setup instructions
- Introduce a new setup.py script for automated environment setup, including virtual environment creation, dependency installation, and .env file generation
- Ensure compatibility with Python 3.8+ and provide clear troubleshooting steps for common issues
- Update generate_cursor_config.py to support both FastMCP and legacy servers
- Add --legacy flag to switch to old mcp_server_cli.py during transition
- Default to new FastMCP server (basecamp_fastmcp.py) - RECOMMENDED
- Auto-cleanup old server configs when switching
- Provide clear migration instructions and fallback options
Usage:
python generate_cursor_config.py # Use FastMCP (default)
python generate_cursor_config.py --legacy # Use legacy server
Following migration plan P-5: Safe dual-run deployment with easy rollback
- Create new basecamp_fastmcp.py using official Anthropic MCP SDK
- Migrate 19 essential tools following official MCP best practices
- Maintain identical tool names and API compatibility with original server
- Add FastMCP dependencies (mcp[cli]>=1.2.0, httpx, anyio)
- Use async/await with anyio.to_thread for sync→async bridge
- Follow official logging practices (stderr + file, not stdout)
- Full compatibility with Cursor and Claude Desktop
Core tools migrated:
✅ Projects: get_projects, get_project, get_todolists, get_todos
✅ Search: search_basecamp, global_search
✅ Communication: get_comments, get_campfire_lines
✅ Card Tables: get_card_tables, get_card_table, get_columns, get_cards
✅ Card Management: create_card, get_card, update_card, move_card, complete_card
✅ Column Management: get_column, create_column
Next: Update config generation for dual-run support
- Add card_table_id to the required properties in MCPServer class.
- Modify the move_column method to retrieve card_table_id from arguments.
- Refactor subprocess call in card_table_example.py to use subprocess.run for better error handling.
- Rename and enhance methods for retrieving card tables and managing cards.
- Introduce new methods for completing and uncompleting cards and card steps.
- Update MCP server CLI to include new card and card step functionalities.
- Revise README to reflect changes in card management tools and usage examples.
- Implement methods for managing card tables and columns in BasecampClient.
- Add corresponding tools in MCP server CLI for card table operations.
- Update README with new card table tools and usage examples.
- Create example script demonstrating card table API usage.
- Add unit tests for card table functionality.
This commit introduces two new files:
- `basecamp_client.py`: A client for interacting with the Basecamp 3 API, supporting both Basic Authentication and OAuth 2.0.
- `basecamp_oauth.py`: A module for handling OAuth 2.0 authentication with Basecamp 3, including methods for obtaining authorization URLs, exchanging codes for tokens, and refreshing tokens.
These additions provide essential functionality for integrating with the Basecamp API, enhancing the overall capabilities of the project.
This commit deletes obsolete files related to the Basecamp MCP integration, including:
- `basecamp_client.py`
- `basecamp_oauth.py`
- `composio_client_example.py`
- `composio_integration.py`
- `mcp_integration.py`
- `setup.sh`
- `start_basecamp_mcp.sh`
Additionally, a new file `mcp_server_cli.py` is introduced to streamline the MCP server functionality. The README has been updated to reflect these changes and provide clearer setup instructions.
This cleanup aims to enhance maintainability and focus on the core components of the integration.
This commit introduces a Server-Sent Events (SSE) endpoint at `/mcp/stream`
to improve compatibility with Cursor, which appears to expect an SSE stream
for actions like `ListOfferings`.
Changes include:
- Added a new `/mcp/stream` route to `mcp_server.py`.
- This stream sends an initial "connected" event.
- It then attempts to fetch and stream Basecamp projects as "offering" events.
- Handles authentication errors (e.g., missing tokens) by sending an
`auth_error` event over SSE.
- Sends an "offerings_complete" event after successfully streaming projects.
- The stream sends periodic "ping" events to keep the connection alive.
- The `Content-Type` header for `/mcp/stream` is correctly set to
`text/event-stream`.
- Updated `README.md` to suggest the new `/mcp/stream` URL for Cursor
configuration and provide context.
Issue #3 (regarding refactoring BasecampClient initialization) was
investigated. The existing `get_basecamp_client()` in `mcp_server.py`,
which includes token refresh logic, was found to be more suitable than
alternatives in `mcp_integration.py` or `composio_integration.py`.
No code changes were made for Issue #3.
Testing with `curl` confirmed the SSE endpoint's functionality,
including correct event flow and error handling.