Files
clubber/openspec/changes/add-mcp-server/tasks.md
T

49 lines
2.1 KiB
Markdown
Raw Normal View History

# Implementation Tasks
## 1. Dependencies
- [ ] 1.1 Add `mcp` package to pyproject.toml dependencies
- [ ] 1.2 Run `uv sync` to install new dependency
## 2. MCP Server Implementation
- [ ] 2.1 Create `src/mcp_server.py` with server scaffold
- [ ] 2.2 Implement GraphQL client class with httpx
- [ ] 2.3 Implement `list_members` tool
- [ ] 2.4 Implement `get_member` tool with ID parameter
- [ ] 2.5 Implement `create_member` tool with member input
- [ ] 2.6 Implement `update_member` tool with member update input
- [ ] 2.7 Add configuration via environment variable CLUBBER_API_URL
- [ ] 2.8 Add proper error handling and validation
- [ ] 2.9 Add tool descriptions and parameter schemas
## 3. Documentation
- [ ] 3.1 Update README with "MCP Server" section
- [ ] 3.2 Document installation and setup steps
- [ ] 3.3 Document environment variable configuration
- [ ] 3.4 Add Claude Code integration instructions
- [ ] 3.5 Provide usage examples for each tool
- [ ] 3.6 Document running the server (`python -m src.mcp_server`)
## 4. Testing & Validation
- [ ] 4.1 Start GraphQL API server
- [ ] 4.2 Test `list_members` tool returns all members
- [ ] 4.3 Test `get_member` tool with valid ID
- [ ] 4.4 Test `get_member` tool with invalid ID (error handling)
- [ ] 4.5 Test `create_member` tool with minimal data (firstName only)
- [ ] 4.6 Test `create_member` tool with complete data
- [ ] 4.7 Test `create_member` tool with invalid email (validation error)
- [ ] 4.8 Test `update_member` tool updates member successfully
- [ ] 4.9 Test `update_member` tool with invalid ID (error handling)
- [ ] 4.10 Verify MCP server works with Claude Code
## 5. Code Quality
- [ ] 5.1 Run Black formatting: `uv run black src/mcp_server.py`
- [ ] 5.2 Run isort: `uv run isort src/mcp_server.py`
- [ ] 5.3 Run ruff linting: `uv run ruff check src/mcp_server.py`
- [ ] 5.4 Add type hints to all functions
- [ ] 5.5 Add docstrings to classes and key functions
## 6. Git & OpenSpec
- [ ] 6.1 Commit all changes with conventional commit message
- [ ] 6.2 Validate OpenSpec proposal: `openspec validate add-mcp-server --strict`
- [ ] 6.3 Push to remote branch