Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameYesName of the MCP server
versionYesVersion of the MCP server
capabilitiesYesServer capabilities
descriptionYesDescription of the server

Implementation Reference

  • 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}`);
    }
  • 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;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dradebo/dhis2-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server