Skip to main content
Glama

AgilePlace MCP Server

by jhigh1594
IMPLEMENTATION_SUMMARY.md8.63 kB
# AgilePlace MCP Server - Implementation Summary ## Project Overview Successfully implemented a comprehensive MCP server for AgilePlace API integration using the FastMCP framework. The server provides 40+ tools for managing boards, cards, connections, dependencies, and bulk operations. ## Architecture ### Core Components 1. **Authentication Module** (`src/auth.py`) - Environment variable-based configuration - Support for Bearer token authentication - Automatic domain normalization - Comprehensive validation 2. **API Client** (`src/client.py`) - Async HTTP client using httpx - Automatic rate limiting with exponential backoff - Retry logic for 429 responses (up to 3 retries) - Context manager support for resource management - Detailed error handling 3. **Data Models** (`src/models.py`) - Pydantic v2 models for all entities - Field aliases for API compatibility - Type safety and validation - Models: Board, Card, User, Team, Connection, Dependency, Comment, Attachment 4. **FastMCP Server** (`src/server.py`) - 40+ registered tools using @mcp.tool() decorator - Centralized error handling - Global client instance management - Comprehensive docstrings for all tools ### Tool Modules 1. **Board Tools** (`src/tools/boards.py`) - 11 functions covering all board operations - List, get, create, update, archive/unarchive, delete - Board cards, lanes, members, activity 2. **Card Tools** (`src/tools/cards.py`) - 15 functions for card management - Full CRUD operations - Comments, attachments, assignments - Card types, tags, activity history 3. **Connection Tools** (`src/tools/connections.py`) - 11 functions for parent-child relationships - Get children/parents with pagination - Create/delete connections (single and bulk) - Connection statistics - Cross-board connections 4. **Dependency Tools** (`src/tools/dependencies.py`) - 4 functions for dependency management - Multiple dependency types supported - Create, update, delete, list dependencies 5. **Query Tools** (`src/tools/query.py`) - 9 functions for users, teams, and organization - Search and filtering capabilities - Team membership and board access 6. **Bulk Tools** (`src/tools/bulk.py`) - 5 functions for bulk operations - Update, move, delete multiple cards - Bulk member assignment/removal - Max 500 operations per request ## Key Features Implemented ### Rate Limiting - Automatic detection of 429 responses - Exponential backoff (2, 4, 8 seconds) - Respect for Retry-After headers - Rate limit header monitoring ### Error Handling - Custom exception types (AgilePlaceAPIError, RateLimitError, AgilePlaceAuthError) - User-friendly error messages - Proper status code handling - Logging for debugging ### Data Validation - Pydantic models for all requests/responses - Type checking and validation - Optional field handling - Alias support for API compatibility ### Testing - pytest configuration with async support - Test fixtures for common data - Mocked API responses - Auth and client unit tests - Coverage reporting setup ## Installation & Configuration ### Environment Variables Required ```bash AGILEPLACE_DOMAIN=your-subdomain.leankit.com AGILEPLACE_API_TOKEN=your_api_token LOG_LEVEL=INFO # Optional ``` ### MCP Client Setup (Claude Desktop) ```json { "mcpServers": { "agileplace": { "command": "python", "args": ["-m", "agileplace_mcp.server"], "env": { "AGILEPLACE_DOMAIN": "your-subdomain.leankit.com", "AGILEPLACE_API_TOKEN": "your_token" } } } } ``` ### Running the Server ```bash # Install dependencies pip install -e . # Run server python -m agileplace_mcp.server # Run tests pytest # Run with coverage pytest --cov=src --cov-report=html ``` ## Tool Categories & Examples ### Board Management - `list_boards(search, limit, archived)` - List all accessible boards - `get_board(board_id)` - Get detailed board info - `create_board(title, description, template_id)` - Create new board - `get_board_cards(board_id, lanes, limit)` - Get cards on board ### Card Operations - `list_cards(board_id, since, limit)` - List cards with filters - `get_card(card_id)` - Get full card details - `create_card(board_id, lane_id, title, ...)` - Create new card - `update_card(card_id, **updates)` - Update card fields - `move_card(card_id, lane_id, position)` - Move card to lane - `delete_card(card_id)` - Delete card ### Connections - `get_card_children(card_id, limit)` - Get child cards - `get_card_parents(card_id, limit)` - Get parent cards - `create_connection(parent_id, child_id)` - Connect cards - `delete_connection(parent_id, child_id)` - Remove connection - `connect_cards_bulk(connections_list)` - Bulk connections ### Dependencies - `get_card_dependencies(card_id)` - Get all dependencies - `create_dependency(card_id, depends_on_card_id, type)` - Create dependency - `delete_dependency(dependency_id)` - Remove dependency ### Bulk Operations - `update_cards_bulk(card_ids, updates)` - Update multiple cards - `move_cards_bulk(moves)` - Move multiple cards - `delete_cards_bulk(card_ids)` - Delete multiple cards - `assign_members_bulk(board_ids, user_ids, role)` - Assign to boards ## File Structure ``` agileplace_mcp/ ├── src/ │ ├── __init__.py │ ├── __main__.py # Package entry point │ ├── server.py # FastMCP server with all tools │ ├── auth.py # Authentication handler │ ├── client.py # HTTP client with rate limiting │ ├── models.py # Pydantic models │ └── tools/ │ ├── __init__.py │ ├── boards.py # Board operations │ ├── cards.py # Card operations │ ├── connections.py # Parent/child relationships │ ├── dependencies.py # Card dependencies │ ├── bulk.py # Bulk operations │ └── query.py # User/team queries ├── tests/ │ ├── __init__.py │ ├── conftest.py # Pytest fixtures │ ├── test_auth.py # Auth tests │ └── test_client.py # Client tests ├── pyproject.toml # Package configuration ├── README.md # Main documentation ├── CONTRIBUTING.md # Contribution guidelines ├── LICENSE # MIT License ├── .gitignore └── CLAUDE_DESKTOP_CONFIG.json # Example MCP config ``` ## Dependencies ### Core Dependencies - **fastmcp** (>=0.1.0) - MCP framework - **httpx** (>=0.27.0) - Async HTTP client - **pydantic** (>=2.0.0) - Data validation - **python-dotenv** (>=1.0.0) - Environment variables ### Development Dependencies - **pytest** (>=8.0.0) - Testing framework - **pytest-asyncio** (>=0.23.0) - Async test support - **pytest-cov** (>=4.1.0) - Coverage reporting - **pytest-mock** (>=3.12.0) - Mocking - **black** (>=24.0.0) - Code formatting - **ruff** (>=0.3.0) - Linting ## Success Metrics ✅ All 15 planned todos completed: 1. Project structure initialized 2. Authentication module implemented 3. API client with rate limiting 4. Pydantic models defined 5. Board operations (11 functions) 6. Card operations (15 functions) 7. Connection tools (11 functions) 8. Dependency tools (4 functions) 9. Query tools (9 functions) 10. Bulk operations (5 functions) 11. FastMCP server integration (40+ tools) 12. Comprehensive error handling 13. Test suite with fixtures 14. Complete documentation 15. Deployment configuration ## Next Steps (Future Enhancements) 1. **Additional Tools** - Automation rules management - Planning series/increments - Board templates - Custom fields management - Board health metrics 2. **Enhanced Features** - Caching layer for frequently accessed data - Webhook support for real-time updates - Batch operation optimization - Advanced search/filtering 3. **Testing** - Integration tests with test account - More comprehensive unit test coverage - Performance benchmarks - Load testing 4. **Documentation** - Video tutorials - More usage examples - API reference documentation - Troubleshooting guide ## Notes - All code follows Python best practices and PEP 8 - Async/await used throughout for performance - Error handling is comprehensive and user-friendly - Rate limiting respects API constraints - Documentation is thorough and includes examples - Tests provide good coverage of core functionality - Package is ready for distribution via pip

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jhigh1594/agileplace-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server