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>
16 lines
1.1 KiB
Markdown
16 lines
1.1 KiB
Markdown
# Tasks: Update MCP Server for Organization Members
|
|
|
|
- [x] Update `create_member` tool definition with memberType and companyName fields <!-- id: 0 -->
|
|
- [x] Update `update_member` tool definition with memberType and companyName fields <!-- id: 1 -->
|
|
- [x] Add memberType and companyName to listMembers GraphQL query <!-- id: 2 -->
|
|
- [x] Add memberType and companyName to getMember GraphQL query <!-- id: 3 -->
|
|
- [x] Add memberType and companyName to createMember mutation response <!-- id: 4 -->
|
|
- [x] Add memberType and companyName to updateMember mutation response <!-- id: 5 -->
|
|
- [x] Update formatMember function to distinguish between individual and organization members <!-- id: 6 -->
|
|
- [x] Test individual member creation (verify existing behavior) <!-- id: 7 -->
|
|
- [x] Test organization member creation (verify new behavior) <!-- id: 8 -->
|
|
- [x] Test member listing with mixed member types (verify formatting) <!-- id: 9 -->
|
|
- [x] Verify GraphQL schema introspection includes MemberType enum <!-- id: 10 -->
|
|
|
|
**Note**: All changes are in a single file: `src/mcp_server.ts`
|