Skip to main content
Glama
JaxonDigital

Optimizely DXP MCP Server

by JaxonDigital

verify_access

Check API credentials and environment permissions before deployment. Verifies access to Integration, Preproduction, and Production environments with detailed read/write/deploy levels.

Instructions

πŸ”‘ Verify API credentials and environment permissions. REAL-TIME: 2-5s. Checks which environments (Integration, Preproduction, Production) are accessible with current credentials. Returns detailed permission levels (read/write/deploy) for each environment. Use before deployment operations to confirm access. Optional: project. Returns environment access matrix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNo
projectNameNo
apiKeyNo
apiSecretNo
forceRefreshNoForce re-check even if cached

Implementation Reference

  • The core handler function for the 'verify_access' tool. It verifies API credentials against Optimizely DXP environments (Integration, Preproduction, Production) using REST API calls, handles self-hosted projects with special messaging, determines accessible environments, and formats a user-friendly permission report.
    static async verifyAccess(args: any): Promise<any> {
        try {
            // Get project configuration
            const projectConfig = await this.getProjectConfig(args.projectName, args);
    
            // Check if this is a self-hosted project
            if (projectConfig.isSelfHosted || projectConfig.connectionString) {
                return ResponseBuilder.success(
                    `🏒 **Self-Hosted Project Detected**\n\n` +
                    `Project: ${projectConfig.name}\n` +
                    `Type: Self-hosted Azure Storage\n\n` +
                    `Self-hosted projects don't have Optimizely DXP environment permissions.\n` +
                    `They have direct access to Azure Storage containers.\n\n` +
                    `**Available Operations:**\n` +
                    `β€’ List and download from storage containers\n` +
                    `β€’ Download Application Insights logs\n` +
                    `β€’ Access existing database backups\n` +
                    `β€’ Download blobs and media files\n\n` +
                    `Use \`test_connection\` to verify Azure Storage access.`
                );
            }
    
            // Test all environments using direct REST API
            const accessible: string[] = [];
            const inaccessible: string[] = [];
    
            for (const environment of this.ENVIRONMENTS) {
                try {
                    const hasAccess = await this.testEnvironmentAccessDirect(
                        projectConfig.projectId || projectConfig.id || '',
                        projectConfig.apiKey || '',
                        projectConfig.apiSecret || '',
                        environment,
                        { timeout: 5000 }  // 5 second timeout per environment (3 envs = ~15s total)
                    );
    
                    if (hasAccess) {
                        accessible.push(environment);
                    } else {
                        inaccessible.push(environment);
                    }
                } catch (error) {
                    inaccessible.push(environment);
                }
            }
    
            // Determine highest environment access
            let highestEnvironment: string | null = null;
            if (accessible.includes('Production')) {
                highestEnvironment = 'Production';
            } else if (accessible.includes('Preproduction')) {
                highestEnvironment = 'Preproduction';
            } else if (accessible.includes('Integration')) {
                highestEnvironment = 'Integration';
            }
    
            // Format the response
            const permissions: Partial<PermissionResult> = {
                projectName: projectConfig.name,
                accessible,
                inaccessible,
                highestEnvironment,
                hasProductionAccess: accessible.includes('Production'),
                environments: {}
            };
    
            // Add detailed environment info
            this.ENVIRONMENTS.forEach(env => {
                permissions.environments![env] = {
                    hasAccess: accessible.includes(env),
                    testedAt: new Date().toISOString()
                } as any;
            });
    
            return ResponseBuilder.success(this.formatPermissionsMessage(permissions as PermissionResult, false));
    
        } catch (error: any) {
            OutputLogger.error(`Permission check failed: ${error}`);
            return ResponseBuilder.error(`Permission check failed: ${error.message}`);
        }
    }
  • Tool availability configuration entry for 'verify_access', defining it as available across all hosting types in the 'Support' category.
    'verify_access': {
        hostingTypes: ['dxp-paas', 'dxp-saas', 'self-hosted', 'unknown'],
        category: 'Support',
        description: 'Verify access and permissions'
    },

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/JaxonDigital/optimizely-dxp-mcp'

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