Files
clubber/openspec/changes
gurixandClaude d32dc99c66 feat: Update MCP server to support organization members
Implement organization member support in the TypeScript MCP server to align
with the GraphQL backend changes from support-organization-members.

Changes to src/mcp_server.ts:
- Update create_member tool definition:
  * Add memberType enum field (INDIVIDUAL, ORGANIZATION)
  * Add companyName field for organizations
  * Remove firstName from required fields
  * Update description to explain conditional requirements
- Update update_member tool definition:
  * Add memberType and companyName fields
  * Update description to mention type transitions
- Update all GraphQL queries and mutations:
  * Add memberType and companyName to listMembers query
  * Add memberType and companyName to getMember query
  * Add memberType and companyName to createMember mutation
  * Add memberType and companyName to updateMember mutation
- Update formatMember function:
  * Check memberType to determine formatting approach
  * Show "Type: Individual" or "Type: Organization"
  * For individuals: display "Name: firstName lastName"
  * For organizations: display "Company: companyName"
  * For organizations with contact: display "Contact Person: firstName lastName"
  * Maintain backward compatibility (defaults to INDIVIDUAL if missing)

Testing:
- All 11 implementation tasks completed
- Created test script test_organization_members.py
- Verified individual member creation with validation
- Verified organization member creation with companyName
- Verified organization with contact person
- Verified member listing with mixed types
- Verified GraphQL schema introspection includes MemberType enum
- Verified validation: INDIVIDUAL requires firstName, ORGANIZATION requires companyName

All tests passed successfully. MCP server now fully supports both individual
and organization members with proper formatting and validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:44:01 +01:00
..