This change implements a Model Context Protocol (MCP) server that enables AI assistants to manage society members through natural language interactions. Changes: - Add MCP server implementation (src/mcp_server.py) - Implement 4 core tools: * list_members - Query all members * get_member - Get specific member by ID * create_member - Create new member * update_member - Update member information - Add mcp and httpx dependencies to pyproject.toml - Update README with comprehensive MCP server documentation - Create OpenSpec proposal in openspec/changes/add-mcp-server/ The MCP server connects to the GraphQL API via HTTP and provides structured tools that abstract away GraphQL complexity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
1.6 KiB
Markdown
30 lines
1.6 KiB
Markdown
# Add MCP Server for Member Management
|
|
|
|
## Why
|
|
|
|
AI assistants need a standardized way to interact with the Clubber GraphQL API. The Model Context Protocol (MCP) provides a standard interface for AI tools to access application functionality. Currently, AI assistants can only interact with the API through raw GraphQL queries, which requires the assistant to construct queries manually and handle responses. An MCP server will provide structured tools that abstract away GraphQL complexity and enable seamless member management through AI agents like Claude.
|
|
|
|
## What Changes
|
|
|
|
- Add official MCP Python SDK (`mcp`) as dependency
|
|
- Create MCP server implementation in `src/mcp_server.py`
|
|
- Implement 4 core tools for member management:
|
|
- `list_members` - Query all members with their details
|
|
- `get_member` - Retrieve a single member by ID
|
|
- `create_member` - Create a new member (only firstName required)
|
|
- `update_member` - Update an existing member's information
|
|
- Use HTTP client (httpx) to connect to GraphQL API
|
|
- Configure via environment variable (CLUBBER_API_URL)
|
|
- Update README with MCP server setup, configuration, and usage instructions
|
|
- Document Claude Code integration steps
|
|
|
|
## Impact
|
|
|
|
- **Affected specs**: New capability `mcp-integration`
|
|
- **Affected code**:
|
|
- New file: `src/mcp_server.py` (~150-200 lines)
|
|
- Modified: `pyproject.toml` (add mcp dependency)
|
|
- Modified: `README.md` (add MCP server documentation)
|
|
- **User impact**: Enables AI assistants to manage society members through natural language
|
|
- **No breaking changes**: This is additive functionality
|