dhis2_register_compatible_server
Register compatible MCP servers for composition workflows by providing name, version, capabilities, and description to enable integration with DHIS2 health information systems.
Instructions
Register information about a compatible MCP server for composition workflows
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the MCP server | |
| version | Yes | Version of the MCP server | |
| capabilities | Yes | Server capabilities | |
| description | Yes | Description of the server |
Implementation Reference
- src/index.ts:1597-1641 (handler)Main handler implementation for the 'dhis2_register_compatible_server' tool. Registers a compatible MCP server by calling multiServerComposition.registerCompatibleServer and returns success message with next steps.case 'dhis2_register_compatible_server': const serverRegistrationArgs = args as { name: string; version: string; capabilities: Array<{ domain: string; operations: string[]; version: string }>; description: string; }; multiServerComposition.registerCompatibleServer({ name: serverRegistrationArgs.name, version: serverRegistrationArgs.version, capabilities: serverRegistrationArgs.capabilities, description: serverRegistrationArgs.description, compatibleWith: ['dhis2-mcp'], compositionMode: true }); auditLogger.log({ toolName: name, parameters: serverRegistrationArgs, outcome: 'success', dhis2Instance: dhis2Client?.baseURL, userId: currentUser?.username, executionTime: Date.now() - startTime }); return { content: [{ type: 'text', text: `ā Successfully registered MCP server: ${serverRegistrationArgs.name} v${serverRegistrationArgs.version} **Capabilities Added:** ${serverRegistrationArgs.capabilities.map(cap => ` ⢠${cap.domain}: ${cap.operations.join(', ')}` ).join('\n')} š **Multi-Server Workflows:** Now enabled with ${multiServerComposition.getCompatibleServers().length} registered server(s) š” **Next Steps:** ⢠Use dhis2_get_composition_recommendations to see integration suggestions ⢠Use dhis2_export_for_composition to share data with other servers ⢠Check dhis2_get_composition_examples for workflow ideas` }] };
- Core helper method that stores the compatible server information in a Map for multi-server composition tracking.registerCompatibleServer(serverInfo: MCPServerInfo): void { this.compatibleServers.set(serverInfo.name, serverInfo); console.log(`[COMPOSITION] Registered compatible server: ${serverInfo.name}`); }
- src/multi-server-composition.ts:7-16 (helper)Type definition for the MCPServerInfo used in registration, defining the structure expected by the tool.export interface MCPServerInfo { name: string; version: string; capabilities: ServerCapability[]; compatibleWith: string[]; compositionMode: boolean; description: string; authors?: string[]; documentation?: string; }