Skip to main content
Glama
Optimizely DXP MCP Server

Optimizely DXP MCP Server

by JaxonDigital

Optimizely DXP MCP Server

npm version License: MIT Downloads

🎉 What's New in v3.46

Major improvements since September 2024:

  • ⚡ 3-10x Faster Operations: PowerShell fully removed, direct REST API with HMAC-SHA256 authentication

  • 🔷 TypeScript Migration: Complete codebase conversion with strict mode compliance (479 errors fixed)

  • 📊 Streaming Log Analysis: New analyze_logs_streaming tool - 2x faster than download+analyze

  • 🔄 45 Tools: Expanded from 38 tools with unified naming and complete automation support

  • 🤖 24 Tools with structuredContent: Perfect for automation platforms (n8n, Zapier, Make.com)

  • 🔴 Redis Integration: Optional caching with circuit breaker and reconnection logic

  • 📡 MCP Resources: Real-time deployment monitoring via event subscription

  • 🔀 Dual Transport Modes: stdio for Claude Desktop, HTTP for automation platforms (n8n, Zapier, Docker)

  • 🎯 Zero Dependencies: No PowerShell, no Python, no external tools - just npm install

Related MCP server: Dokploy MCP Server

🤔 The Problem

You invested in enterprise DXP, but you're only using 10% of its power.

You chose Optimizely to deliver exceptional digital experiences, but:

  • Your team spends more time on DevOps tasks than building features

  • Critical issues hide in logs until customers complain

  • Deployments are scary, manual, multi-step processes

  • Setting up dev environments takes hours or days

  • You can't move fast enough to beat competitors embracing AI

Meanwhile, AI is revolutionizing how software gets built and managed. Companies using AI-powered automation are shipping 10x faster, finding issues before customers do, and freeing their teams to focus on innovation.

✨ The Solution

Your infinite DevOps workforce - AI that never sleeps, never breaks, always delivers.

This MCP server transforms your Optimizely DXP into an AI-powered platform that goes far beyond replacing Google searches. Just as Optimizely Opal provides an infinite workforce for marketing, this MCP creates your infinite workforce for DXP operations:

  • AI Specialists that understand your infrastructure, deployments, and data

  • Intelligent Agents that handle complex multi-step workflows autonomously

  • 24/7 Operations that scale infinitely without adding headcount

  • Your team elevated from operators to innovators

Finally get the ROI your DXP investment promised - ship faster, break less, sleep better.

🚀 The Transformation

From DXP operator to digital experience innovator:

  • Ship 10x faster - What took hours now takes seconds

  • Zero-downtime deployments - AI handles the complexity

  • Proactive issue resolution - Fix problems before customers notice

  • Instant dev environments - Full production replicas in minutes

  • Competitive advantage - Move at AI speed while others click through portals

  • Maximum DXP ROI - Finally use all those powerful features you're paying for

🔌 What is MCP?

Model Context Protocol (MCP) is the bridge between AI's intelligence and your DXP's capabilities.

While others use AI just to search documentation or write code snippets, MCP enables something revolutionary: AI that takes action. This isn't about better search results - it's about AI that can:

  • Execute complex operations autonomously

  • Orchestrate multi-step workflows across environments

  • Monitor systems and self-heal issues

  • Learn from your infrastructure to make smarter decisions

  • Scale infinitely without human bottlenecks

Think of it as evolving from "AI as advisor" to "AI as workforce" - the difference between asking for directions and having a chauffeur.

🌟 Key Features & Capabilities

Zero Dependencies Architecture

Direct REST API - No External Tools Required

  • HMAC-SHA256 authentication: Secure, standards-based API access

  • No PowerShell: Completely removed in v3.44 - never needed again

  • No Python: All JavaScript/TypeScript with Node.js runtime

  • Cross-platform: Identical behavior on macOS, Linux, and Windows

  • Dual transport modes: stdio for Claude Desktop, HTTP for automation platforms

  • Single install: Just npm install - that's it!

Performance Improvements:

  • Deployment operations: 3-10x faster vs PowerShell

  • Database exports: 5x faster

  • Log downloads: 3x faster

AI-Powered Operations (45 Tools)

Comprehensive DXP Management:

1. Deployment Management

  • Autonomous deployment with health monitoring

  • Rollback and reset capabilities

  • Content sync between environments

  • Real-time progress tracking with ETAs

  • MCP Resources subscription for live events

2. Log Analysis & Intelligence

  • Streaming analysis (2x faster than download+analyze)

  • Compare logs tool for deployment decisions

  • AI agent detection and pattern recognition

  • Performance metrics and error analysis

  • Structured output for automation workflows

3. Database Operations

  • Interactive export workflow with smart monitoring

  • Automated backup downloads

  • Export status tracking

  • Background downloads with progress updates

4. Storage Management

  • Incremental blob downloads (only changed files)

  • Manifest tracking for efficiency

  • Pattern-based filtering (*.pdf, *.jpg, etc.)

  • 5x faster with parallel downloads

5. Real-Time Monitoring

  • MCP Resources subscription for deployment events

  • Webhook notifications for external automation

  • Health checks and connection testing

  • Environment access verification

Enterprise-Ready Architecture

Built for Scale and Reliability:

  • Redis Integration (Optional)

    • Circuit breaker pattern for automatic fallback

    • Reconnection logic with exponential backoff

    • Caching layer for repeated queries

    • 12 integration tests covering all scenarios

  • Rate Limiting & Retry

    • Automatic retry with exponential backoff

    • HTTP 429 (rate limit) handling

    • Respects Retry-After headers

  • Event System

    • MCP Resources for real-time updates

    • Webhook-ready for external integration

    • Event streaming without polling

  • Type Safety

    • Full TypeScript with strict mode

    • 479 type errors fixed across codebase

    • Better IDE support and auto-completion

Automation Platform Support

Native Integration with Workflow Tools:

  • HTTP Transport Mode: Dual-mode operation (stdio for Claude, HTTP for automation)

  • 24 Tools with structuredContent: Native MCP field for structured data

  • Direct Property Access: No JSON.parse() needed - response.structuredContent.data.deploymentId

  • Platform Support: n8n, Zapier, Make.com, custom workflows

  • Webhook-Ready: Event system for external automation

See N8N_INTEGRATION.md for automation platform setup.

🔀 Transport Modes

The MCP server supports two transport modes for different deployment scenarios:

stdio Mode (Default)

Best for: Claude Desktop, local AI clients, single-user development

Characteristics:

  • Process-to-process communication via stdin/stdout

  • No network ports required

  • Automatically started by Claude Desktop

  • Lowest latency and most secure (no network exposure)

  • Ideal for local development and desktop AI applications

Setup:

{
  "mcpServers": {
    "optimizely-dxp": {
      "command": "npx",
      "args": ["-y", "@jaxon-digital/optimizely-dxp-mcp"],
      "env": {
        "OPTIMIZELY_PROJECT_ID": "your-id",
        "OPTIMIZELY_PROJECT_KEY": "your-key",
        "OPTIMIZELY_PROJECT_SECRET": "your-secret"
      }
    }
  }
}

No additional configuration needed - stdio is the default mode.


HTTP Mode

Best for: n8n, Zapier, Make.com, Docker, remote access, multi-tenant platforms

Characteristics:

  • RESTful HTTP server with JSON-RPC 2.0

  • MCP endpoint: POST /mcp

  • Health check: GET /health

  • Supports concurrent remote connections

  • Production-ready with graceful shutdown

Setup:

# Start HTTP server
DXP_MCP_MODE=http DXP_MCP_PORT=3001 npm start

# Or with Docker
docker run -p 3001:3001 \
  -e DXP_MCP_MODE=http \
  -e OPTIMIZELY_PROJECT_ID=your-id \
  -e OPTIMIZELY_PROJECT_KEY=your-key \
  -e OPTIMIZELY_PROJECT_SECRET=your-secret \
  jaxon-digital/optimizely-dxp-mcp

Configuration:

Variable

Default

Description

DXP_MCP_MODE

stdio

Set to http to enable HTTP mode

DXP_MCP_PORT

3001

HTTP server port (1-65535)

DXP_MCP_HOST

0.0.0.0

Bind address (localhost for local only, 0.0.0.0 for Docker/remote)

Health Check:

curl http://localhost:3001/health
# Returns: {"status":"ok","service":"optimizely-dxp-mcp","version":"3.46.0"}

Decision Guide

Scenario

Mode

Why

Claude Desktop usage

stdio

Default, fastest, most secure

n8n workflow automation

http

REST API, remote access

Zapier/Make.com integration

http

Webhook support, structured data

Docker deployment

http

Network connectivity, multiple clients

Local development (single user)

stdio

Simplest setup, no ports needed

Multi-tenant SaaS platform

http

Concurrent connections, load balancing

Remote server deployment

http

Network accessibility required

All 45 tools work identically in both modes - only the transport layer changes.

📋 Complete Tool Reference (45 Tools)

Permission & Access Management (4 tools)

  • test_connection - Validate setup and show capabilities

  • check_permissions - Detailed environment access breakdown

  • verify_access - Confirm specific environment access

  • health_check - System status with structured health data

Deployments & Content Sync (10 tools)

  • list_deployments - Show deployment history with filters

  • start_deployment - Initiate code deployment

  • monitor_deployment - Real-time progress with auto-refresh

  • complete_deployment - Finish verification state

  • reset_deployment - Rollback if needed

  • get_deployment_status - Current status with wait-then-check support

  • copy_content - Sync content between environments

  • list_content_copies - Show content copy history

Database Management (4 tools)

  • export_database - Interactive workflow with smart monitoring

  • check_export_status - Progress tracking with auto-download flag

  • download_database_export - Get export file with background progress

  • list_recent_exports - Export history and monitoring

Log Analysis & Downloads (6 tools)

  • analyze_logs_streaming - NEW: Stream and analyze in-memory (2x faster)

  • compare_logs - NEW: Side-by-side comparison for deployment decisions

  • download_logs - Download with manifest tracking (incremental)

  • list_log_containers - Show available log containers

  • discover_logs - Find logs by date range and type

  • check_download_status - Progress tracking for active downloads

Storage Management (5 tools)

  • list_storage_containers - Show blob containers with structured data

  • download_blobs - Incremental downloads (only changed files, 5x faster with parallel)

  • generate_storage_sas_link - Create temporary access URLs

  • list_download_history - Show completed downloads with manifests

Multi-Project Management (3 tools)

  • list_projects - Show all configured projects

  • switch_project - Change active project context

  • current_project - Display active project info

Configuration & Utilities (6 tools)

  • get_ai_guidance - Context-aware best practices

  • get_version - Version info with update checks

  • get_download_paths - Show download configuration

  • set_download_path - Configure paths by type

  • list_active_downloads - Progress for all background downloads

  • cancel_download - Stop background download

Advanced Features (7 tools)

  • get_rate_limit_status - Show API quota and limits

  • get_cache_status - Redis cache statistics (if enabled)

  • monitor_project_upgrades - Track DXP CMS version updates

  • enable_http_logs - Configure HTTP log streaming

  • disable_http_logs - Disable HTTP log streaming

  • get_tool_availability - Show which tools work in current context

  • subscribe_deployment_events - NEW: MCP Resources for real-time updates

Total: 45 tools organized in 8 categories

🎯 Performance Benchmarks

REST API vs PowerShell (v3.44+)

Operation

PowerShell

REST API

Improvement

Start Deployment

8-12s

1-2s

5-10x faster

Database Export

10-15s

2-3s

5x faster

Log Download

6-9s

2-3s

3x faster

Environment List

4-6s

0.5-1s

6-8x faster

Streaming vs Download+Analyze

Operation

Download+Analyze

Streaming

Improvement

Last Hour Logs

30-45s

15-20s

2x faster

Memory Usage

High (full download)

Low (streaming)

4-6x less

Disk I/O

Heavy (write + read)

None (memory only)

Eliminated

Automation Ready

Post-processing needed

Structured output

Immediate

Parallel Downloads

Files

Sequential

Parallel

Improvement

100 blobs

250s

50s

5x faster

500 blobs

1250s

260s

5x faster

Log archives

180s

45s

4x faster

⚠️ IMPORTANT: No Manual Startup Required

DO NOT run npm start or node index.js - The MCP is NOT a traditional server!

❌ What NOT to Do

  • DO NOT run npm start - The MCP is not a standalone server

  • DO NOT run node dist/index.js directly - Claude handles execution automatically

  • DO NOT keep a terminal window open - The MCP runs on-demand

  • DO NOT look for a running process - It starts and stops as needed

✅ How MCP Actually Works

  1. Claude automatically starts the MCP when you open a conversation

  2. The MCP runs as a subprocess managed entirely by Claude

  3. It starts and stops automatically based on your usage

  4. No manual intervention required - just use Claude normally

🎯 Correct Installation & Usage

# ONE-TIME SETUP:
# Option 1: Configure to use npx (always latest)
# Add to Claude's config - no install needed!

# Option 2: Global install for faster startup
npm install -g @jaxon-digital/optimizely-dxp-mcp

# THEN: Just use Claude! The MCP starts automatically

That's it! Configure once in Claude's settings, then forget about it. The MCP runs invisibly in the background whenever Claude needs it.

🛠️ System Requirements

Minimal Requirements - Zero External Dependencies:

  • Node.js 18+ (LTS recommended) - Download

  • Optimizely DXP Project with API credentials

  • That's it! No PowerShell, no Python, no external tools

Supported Platforms:

  • ✅ macOS (Intel & Apple Silicon)

  • ✅ Linux (Ubuntu, Debian, RHEL, etc.)

  • ✅ Windows 10/11 (no PowerShell needed!)

Optional Enhancements:

  • Redis (optional) - For caching and performance boost

  • Docker (optional) - For containerized deployment with automation platforms

🚀 Quick Start

Installation

No installation needed! Configure Claude to use npx:

{
  "mcpServers": {
    "optimizely-dxp": {
      "command": "npx",
      "args": [
        "-y",
        "@jaxon-digital/optimizely-dxp-mcp"
      ],
      "env": {
        "OPTIMIZELY_PROJECT_ID": "your-project-id",
        "OPTIMIZELY_PROJECT_KEY": "your-key",
        "OPTIMIZELY_PROJECT_SECRET": "your-secret"
      }
    }
  }
}

Option 2: Global Install (Faster Startup)

npm install -g @jaxon-digital/optimizely-dxp-mcp

Then configure Claude:

{
  "mcpServers": {
    "optimizely-dxp": {
      "command": "jaxon-optimizely-dxp-mcp",
      "env": {
        "OPTIMIZELY_PROJECT_ID": "your-project-id",
        "OPTIMIZELY_PROJECT_KEY": "your-key",
        "OPTIMIZELY_PROJECT_SECRET": "your-secret"
      }
    }
  }
}

Configuration

Single Project Setup

Using Environment Variables:

export OPTIMIZELY_PROJECT_ID="12345678-1234-1234-1234-123456789012"
export OPTIMIZELY_PROJECT_KEY="your_api_key"
export OPTIMIZELY_PROJECT_SECRET="your_api_secret"

In Claude's config.json:

{
  "env": {
    "OPTIMIZELY_PROJECT_ID": "12345678-1234-1234-1234-123456789012",
    "OPTIMIZELY_PROJECT_KEY": "your_api_key",
    "OPTIMIZELY_PROJECT_SECRET": "your_api_secret"
  }
}

Multi-Project / Multi-Tenant Setup

For agencies managing multiple clients:

export CLIENT1="id=uuid1;key=key1;secret=secret1;logPath=/logs/client1;dbPath=/db/client1"
export CLIENT2="id=uuid2;key=key2;secret=secret2;logPath=/logs/client2;dbPath=/db/client2"

Then use:

"switch to CLIENT2"
"list projects"
"show current project"

See MULTI_PROJECT_CONFIG.md for complete guide.

Advanced Configuration

Redis Integration (Optional):

export REDIS_HOST="localhost"
export REDIS_PORT="6379"
export REDIS_PASSWORD="optional"
export REDIS_ENABLED="true"

HTTP Transport for Automation Platforms:

export DXP_MCP_MODE="http"
export DXP_MCP_PORT="3001"
export DXP_MCP_HOST="0.0.0.0"

Download Path Configuration (7-level priority):

  1. Command parameter: downloadPath=/custom/path

  2. Compact field: PROJECT="...;logPath=/path"

  3. Project + type: OPTIMIZELY_PROJECT_DOWNLOAD_PATH_LOGS=/path

  4. Project-specific: OPTIMIZELY_PROJECT_DOWNLOAD_PATH=/path

  5. Type-specific: OPTIMIZELY_DOWNLOAD_PATH_LOGS=/path

  6. Global: OPTIMIZELY_DOWNLOAD_PATH=/path

  7. Smart OS defaults: ~/Downloads/optimizely-mcp/

🛠️ AI-Enabled Solutions

Empower AI to handle your entire DXP lifecycle - from development to production:

1️⃣ Permission & Access Management

# Know exactly what your AI can do
"test connection"                          # Validates setup & shows capabilities
"check permissions"                        # Detailed environment access breakdown
"verify access to production"              # Confirm specific environment access

2️⃣ Deployments & Content Sync

# Deploy code and sync content between environments
"start deployment to production"           # Code deployment from preproduction
"start deployment from int to prep"        # Explicit source and target
"copy content from prod to integration"    # Content sync (downward)
"reset deployment in production"           # Rollback if needed
"complete deployment"                      # Finish verification state

3️⃣ Real-Time Monitoring & Status

# Track everything happening in your DXP
"show deployment dashboard"                # Visual progress with ETAs
"check production status"                  # Environment health check
"monitor current deployments"              # Live updates with auto-refresh
"list recent deployments"                  # History and patterns

4️⃣ Development Environment Setup

# Get production-quality data for local development
"export production database"               # Interactive workflow with smart monitoring
"check database export status"             # Check progress of running exports
"download latest database backup"          # Get most recent backup file
"download production blobs"                # Smart incremental - only changed files
"download blobs with filter *.pdf"         # Selective downloads with patterns
"download blobs force full"                # Bypass incremental, get everything
# AI tracks what you've downloaded to save bandwidth

5️⃣ Log Analysis & Downloads

# ⚡ NEW: Stream and analyze logs in-memory (2x faster than download + analyze)
"analyze logs from last hour"             # Streaming analysis with structured output
"analyze application logs last 30 min"    # Console logs for errors and patterns
"analyze web logs from production"        # HTTP logs with performance metrics
"compare logs before and after deploy"    # Side-by-side comparison tool

# Traditional downloads with manifest tracking
"download logs from last 7 days"          # Incremental - skips unchanged logs
"download web logs"                       # HTTP/IIS logs with manifest tracking
"download application logs"               # App logs for external analysis
"download all logs"                       # All available log types
# Generates manifest files for external log analyzer tools

6️⃣ Multi-Project Management

# Perfect for agencies managing multiple clients
"switch to CLIENT2"                        # Instantly switch between projects
"list projects"                            # See all configured clients
"show current project"                     # Display active project details

7️⃣ Automation & Integration

# Real-time events and automation workflows
"subscribe to deployment events"           # MCP Resources for live updates
"generate SAS link for container"          # Temporary blob access URLs
"check rate limit status"                  # API quota and usage
"check cache status"                       # Redis statistics (if enabled)

🔄 Automation & Integration

HTTP Transport Mode

For n8n, Zapier, Make.com, and custom workflows:

# Start in HTTP mode
DXP_MCP_MODE=http DXP_MCP_PORT=3001 node dist/index.js

# Or with Docker
docker run -p 3001:3001 \
  -e DXP_MCP_MODE=http \
  -e OPTIMIZELY_PROJECT_ID=your-id \
  -e OPTIMIZELY_PROJECT_KEY=your-key \
  -e OPTIMIZELY_PROJECT_SECRET=your-secret \
  jaxon-digital/optimizely-dxp-mcp

Health Check:

curl http://localhost:3001/health

Structured Data Support

24 tools with native structuredContent field:

// Example: Start deployment
{
  "content": [
    {
      "type": "text",
      "text": "✅ Deployment started to Production..."
    }
  ],
  "structuredContent": {
    "success": true,
    "data": {
      "deploymentId": "c88fa98f-9d3c-4e91-8f77-5a7f3e2d1b0a",
      "status": "InProgress",
      "environment": "Production",
      "previewUrl": "https://..."
    }
  }
}

Direct property access in workflows:

// n8n, Zapier, Make.com
const deploymentId = response.structuredContent.data.deploymentId;
const status = response.structuredContent.data.status;
// No JSON.parse() needed!

Supported Tools:

  • All deployment tools (list, start, monitor, complete, reset, status)

  • Database operations (export, status, download, list)

  • Log operations (download, status, streaming analysis)

  • Storage operations (list containers, generate SAS, download blobs)

  • Download management (status, active downloads, history)

  • Project management (list, switch, current)

  • System utilities (test connection, health check, version, rate limits)

Webhook Integration

For external automation:

# Subscribe to deployment events
"subscribe to deployment events"

# Events are pushed to external systems:
# - Deployment started
# - Deployment progress updates
# - Deployment completed/failed
# - Content sync completed
# - Database export ready

See N8N_INTEGRATION.md for complete automation setup guide.

📚 Documentation

📊 Structured Logging

DXP MCP uses structured JSON logging for production observability. All operations log machine-parseable JSON to stdout.

Log Format

Each log entry is a single-line JSON object:

{
  "timestamp": "2025-11-09T12:00:00.123Z",
  "level": "info",
  "message": "Deployment initiated",
  "correlation_id": "1699564800000-abc123xyz",
  "tool": "start_deployment",
  "environment": "production",
  "deployment_id": "12345"
}

Standard Fields:

  • timestamp - ISO 8601 timestamp with milliseconds

  • level - Log level (debug, info, warn, error)

  • message - Human-readable message

  • correlation_id - Links related operations together

  • Additional metadata fields vary by operation

Log Levels

  • debug - API requests, detailed progress, internal operations

  • info - Significant events (deployment started, export complete)

  • warn - Recoverable issues (retries, fallbacks)

  • error - Failures requiring attention

Querying Logs

CloudWatch Logs Insights:

# Find all deployments in last hour
fields @timestamp, message, deployment_id, environment
| filter level = "info" and tool = "start_deployment"
| sort @timestamp desc

# Track specific deployment by correlation ID
fields @timestamp, message, duration_ms
| filter correlation_id = "1699564800000-abc123xyz"
| sort @timestamp asc

# Find slow operations (>5 seconds)
fields @timestamp, message, duration_ms, tool
| filter duration_ms > 5000
| sort duration_ms desc

Datadog:

# Find errors in production deployments
level:error tool:start_deployment environment:production

# Track deployment flow
correlation_id:"1699564800000-abc123xyz"

# Performance analysis
@duration_ms:>5000

Splunk:

# Find all deployment errors
index=dxp_mcp level=error tool=start_deployment

# Average deployment duration
index=dxp_mcp tool=start_deployment duration_ms=*
| stats avg(duration_ms) by environment

# Correlation ID trace
index=dxp_mcp correlation_id="1699564800000-abc123xyz"
| sort _time

Correlation IDs

All related operations share a correlation ID. Example flow:

  1. start_deployment - correlation_id: 12345-abc

  2. monitor_deployment - correlation_id: 12345-abc (same)

  3. complete_deployment - correlation_id: 12345-abc (same)

Query by correlation ID to see full deployment lifecycle.

Developer Guide

When adding logging to a new tool:

const { StructuredLogger } = require('../structured-logger');

// Create logger with tool context
const logger = new StructuredLogger({
  context: { tool: 'your_tool_name' }
});

// Log significant events
logger.info('Operation started', {
  key1: value1,
  key2: value2
});

// Log API calls
logger.logAPIRequest('POST', '/api/endpoint', { body: requestBody });
logger.logAPIResponse('/api/endpoint', response.status, duration);

// Log errors
logger.error('Operation failed', {
  error: error.message,
  stack: error.stack
});

// Track duration
logger.startTimer('operation_name');
// ... do work ...
logger.endTimer('operation_name', { result_count: 10 });

Security

Headers are automatically sanitized to remove:

  • Authorization tokens

  • API keys

  • Authentication credentials

Logs are safe to aggregate and store without exposing secrets.

🔍 Audit Trail

DXP MCP maintains an immutable audit trail of all tool invocations for compliance and observability.

What is Audited

Every tool invocation is logged with:

  • Timestamp - When the operation occurred

  • Tool name - Which tool was invoked

  • Parameters - Input arguments (sanitized to remove secrets)

  • Result - Operation outcome (success/error)

  • Duration - How long the operation took

  • Metadata - Additional context (environment, project, etc.)

Example audit entry:

{
  "timestamp": "2025-11-09T12:00:00.123Z",
  "operation": "start_deployment",
  "operation_type": "deployment",
  "status": "success",
  "user": { "id": "user-123" },
  "environment": { "project_id": "proj-456", "slot": "production" },
  "request": {
    "tool": "start_deployment",
    "parameters": { "sourceEnvironment": "integration", "targetEnvironment": "production" },
    "correlation_id": "12345-abc"
  },
  "response": {
    "result": "success",
    "duration_ms": 1250
  }
}

Storage Location

Audit logs are stored in ./audit-logs/ as JSON Lines files:

audit-logs/
├── audit-2025-11-09.jsonl
├── audit-2025-11-08.jsonl
└── audit-2025-11-07.jsonl

Each line is a complete JSON object for easy parsing.

Querying Audit Logs

Via MCP Tool:

// Get all deployments in last 24 hours
query_audit_log({
  tool_name: "start_deployment",
  start_time: "2025-11-08T12:00:00Z",
  end_time: "2025-11-09T12:00:00Z"
})

// Get failed operations
query_audit_log({
  status: "failure",
  limit: 50
})

Via Command Line:

# View all audit logs
cat audit-logs/audit-*.jsonl | jq

# Filter by tool
cat audit-logs/audit-*.jsonl | jq 'select(.operation=="start_deployment")'

# Find errors
cat audit-logs/audit-*.jsonl | jq 'select(.status=="failure")'

# Count operations by tool
cat audit-logs/audit-*.jsonl | jq -r '.operation' | sort | uniq -c

Retention Policy

Recommended retention periods:

  • Active logs: Keep 90 days online for queries

  • Archive: Move logs older than 90 days to cold storage (S3, tape)

  • Compliance: Retain 7 years for regulated industries (finance, healthcare)

  • Deletion: After retention period, securely delete per policy

Example archival script:

#!/bin/bash
# Archive audit logs older than 90 days

find ./audit-logs -name "audit-*.jsonl" -mtime +90 -exec mv {} ./archive/ \;

GDPR and Compliance

PII Handling:

  • Audit logs may contain user identifiers (email, username)

  • Support data subject access requests (query by user_id)

  • Support right to erasure (delete user's audit entries if required)

Data Sanitization:

  • Passwords, API keys, tokens automatically redacted

  • Field names containing "password", "secret", "token" are redacted

  • Authorization headers removed from API request logs

Compliance Features:

  • Immutable append-only logs (cannot modify/delete individual entries)

  • Timestamp integrity (ISO 8601 with milliseconds)

  • Unique correlation IDs for request tracking

  • Version tracking (MCP server version in each entry)

Configuration

Environment Variables:

# Disable audit logging (development only)
DXP_AUDIT_ENABLED=false

# Custom audit directory
DXP_AUDIT_DIR=/var/log/dxp-mcp

# Custom audit retention days (for automated cleanup)
DXP_AUDIT_RETENTION_DAYS=90

Security

  • Audit logs stored locally (not sent to external services)

  • File permissions: 600 (owner read/write only)

  • Directory permissions: 700 (owner access only)

  • Sensitive data automatically sanitized before logging

Monitoring

Key metrics to track:

  • Total tool invocations per day

  • Error rate by tool (errors / total invocations)

  • Average duration by tool

  • Failed authentication attempts

Example monitoring query:

# Daily summary report
cat audit-logs/audit-$(date +%Y-%m-%d).jsonl | jq -s '
  group_by(.operation) |
  map({
    tool: .[0].operation,
    total: length,
    errors: map(select(.status == "failure")) | length,
    avg_duration: (map(.response.duration_ms) | add / length)
  })
'

🔄 Migration from v3.3x

Major changes in v3.44-v3.46:

Breaking Changes

  1. Tool Renames (v3.42):

    • Database tools: db_export* prefix (was export_database*)

    • Download tools: download_* prefix (was get_*)

  2. PowerShell Removed (v3.44):

    • No action needed - automatic migration to REST API

    • 3-10x performance improvement

    • Identical functionality

  3. Deprecated Tools Removed:

    • download_media, download_assets → use download_blobs

    • Old database tool names → use db_export* versions

Migration Steps

If upgrading from v3.3x:

  1. Update to latest version:

    npm update -g @jaxon-digital/optimizely-dxp-mcp
  2. No configuration changes needed - credentials and environment variables work the same

  3. Test connection:

    "test connection"
  4. Update any scripts that reference old tool names (see API Reference)

Benefits:

  • 3-10x faster operations (REST API vs PowerShell)

  • 2x faster log analysis (streaming)

  • 45 tools (up from 38)

  • 24 tools with automation support

  • Zero dependencies - no PowerShell needed

🤝 Support & Community

Getting Help

Troubleshooting

Common Issues:

  1. "Cannot find module"

    • Run npm run build to generate dist/ folder

    • Verify dist/index.js exists

  2. "Connection failed"

    • Check credentials are correct

    • Verify project has API access enabled

    • Run test connection to diagnose

  3. "Rate limited (429)"

    • Automatic retry with exponential backoff handles this

    • Check get rate limit status for quota

  4. HTTP mode issues

    • Verify port 3001 is available

    • Check DXP_MCP_MODE=http is set

    • Test with curl http://localhost:3001/health

See N8N_INTEGRATION.md troubleshooting section for automation platform issues.

🛠️ Development

Building from Source

This project uses TypeScript and requires building before running:

# Clone the repository
git clone https://github.com/JaxonDigital/optimizely-dxp-mcp-private.git
cd optimizely-dxp-mcp-private

# Install dependencies
npm install

# Build TypeScript → JavaScript (REQUIRED after any code changes)
npm run build

# Run tests
npm test

Important: The TypeScript source files in lib/ and src/ are compiled to JavaScript in dist/. After editing any .ts files, you MUST run npm run build before testing changes.

Build Output:

  • dist/index.js - Main entry point (bundled with esbuild)

  • dist/lib/**/*.js - Compiled library modules

  • Build happens automatically on npm install (via prepare hook)

  • Build happens automatically before npm publish (via prepublishOnly hook)

Testing Changes Locally

# Build after making changes
npm run build

# Run CI test suite (fast - 15 tests)
npm test

# Run full test suite (comprehensive)
npm run test:full

# Run specific test suites
npm run test:logger      # Structured logger tests
npm run test:security    # Security helper tests
npm run test:projects    # Multi-project resolution tests

Development Workflow

  1. Make changes to TypeScript files in lib/ or src/

  2. Run npm run build to compile

  3. Run npm test to verify

  4. Create PR when tests pass

Project Structure

lib/                    # TypeScript source files
├── tools/             # MCP tool implementations
├── *.ts               # Core modules (telemetry, config, etc.)
src/
├── index.ts           # Main MCP server entry point
dist/                  # Compiled JavaScript (gitignored)
├── index.js           # Bundled server (esbuild output)
├── lib/               # Compiled modules
tests/                 # Test files
├── ci-test.js         # Fast CI test suite
├── test-suite.js      # Comprehensive tests

📜 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

Built with:


Made with ❤️ by Jaxon Digital

Transforming Optimizely DXP from platform to AI-powered workforce

Available Tools

42 tools
analyze_logs_streamingA

📊 Stream and analyze logs directly without downloading. FAST: 15-30sec vs 40-60sec for download+analyze. Returns structured health data: error count, performance metrics (p95/p99 response times), AI agent detection. Use this for deployment verification, health checks, or real-time diagnostics. Set slot=true when analyzing deployment slots. Required: environment. Optional: minutesBack (default 60), logType (http/application/all), slot. Returns health score, errors, performance, recommendations.

Inputs: environment, logType, minutesBack, startDateTime, +9 more.

compare_logsA

🔍 Compare baseline vs slot logs to make deployment decisions. ANALYSIS: <5s. Takes output from two analyze_logs_streaming() calls (baseline=production, slot=deployment slot). Returns safety recommendation (proceed/investigate/abort) with detailed reasoning based on error rate changes, performance degradation, and health score delta. Use in deployment workflow: analyze baseline → deploy → analyze slot → compare → decide to complete or reset. Required: baseline, slot objects. Returns decision and supporting metrics.

Inputs: baseline (required), slot (required), thresholds.

complete_deploymentA

✅ Finalize deployment after verification. ASYNC: 2-15min. For AI Agents: Subscribe to deployment://{deploymentId} resource for real-time completion events (preferred method). Alternatively, set monitor=true (default) for background polling fallback. Deployment transitions: AwaitingVerification → Completing → Succeeded/Failed. After completing, monitor automatically tracks progress and emits events. Production deployments take 2-15min, other environments <1min. Required: deploymentId. Optional: monitor (default true).

Inputs: deploymentId (required), monitor, projectName, projectId, +2 more.

copy_contentA

📋 Copy database and/or blob content between environments. ASYNC: 30-90min depending on content size. Use for refreshing staging/test environments with production data or promoting content changes. Set includeBlob=true to copy static files/media (slower). Set includeDB=true to copy CMS/Commerce databases. CONTENT typically flows downward (Production→Preproduction→Integration). This is a heavy operation - verify target environment before starting. Required: sourceEnvironment, targetEnvironment. Returns operation ID for tracking. Use status() tool to monitor progress.

Inputs: sourceEnvironment (required), targetEnvironment (required), projectName, projectId, +2 more.

current_projectA

📌 Show currently active project context. INSTANT: <1s. Returns name, ID, and environment access for the project currently in use. Use to confirm project context before critical operations. No parameters. Returns active project info.

Inputs: no named parameters.

db_exportA

💾 Start database export from specified environment. ASYNC: 10-60min depending on database size. Set autoMonitor=true to automatically poll status every 30s. Set autoDownload=true to automatically download when export completes. Returns exportId for tracking. Required: environment, database (epicms or epicommerce). Use db_export_status() to check progress. Agent workflow: start export → monitor status → download when complete.

Inputs: environment, database, previewOnly, forceNew, +13 more.

db_export_downloadA

📥 Download completed database export to local storage. BACKGROUND: returns immediately with download ID, actual download continues in background. Large files (>1GB) may take 5-20min. Use download_status() to monitor download progress and get local file path when complete. Required: downloadUrl. Optional: downloadPath, background (default true). Returns downloadId for tracking.

Inputs: exportId, environment, downloadUrl, downloadPath, +8 more.

db_export_statusA

📊 Check database export progress. REAL-TIME: <1s. Returns progress percentage, estimated time remaining, and download URL when export completes. Set monitor=true to poll every 30s until complete. Set autoDownload=true to automatically download when ready. Required: exportId, environment. Returns status and download URL when ready. Use db_export_download() with the URL to retrieve file.

Inputs: exportId, environment, latest, monitor, +14 more.

debug_containersD

Inputs: environment, projectName, projectId, apiKey, +1 more.

disable_telemetryA

🔇 Disable anonymous usage telemetry collection. INSTANT: <1s. Stops collecting tool usage analytics and error data. Telemetry helps improve MCP server but is fully optional. Change persists for session. No parameters. Returns confirmation of disabled telemetry.

Inputs: no named parameters.

discover_logsA

🔎 Discover available log containers across all environments. REAL-TIME: <2s. Returns container names, log types available (http, application), and environment availability. Use this before download_logs() or analyze_logs_streaming() to understand what logs exist. Useful for multi-environment projects to find which environments have logging enabled. Optional: project. Returns container inventory.

Inputs: projectName, projectId, apiKey, apiSecret.

download_blobsA

📦 Download files from Azure blob storage container to local path. ASYNC/BACKGROUND: returns immediately with download ID, continues in background. Supports date filtering to download specific time ranges. Use download_status() to monitor progress. Required: container, environment. Optional: downloadPath, dateFilter. Returns downloadId and estimated file count/size.

Inputs: environment, containerName, downloadPath, previewOnly, +10 more.

download_cancelA

❌ Cancel active download(s) immediately. INSTANT: <1s. Call with downloadId to cancel specific download, or call without parameters to cancel all active downloads. Database downloads cannot be cancelled (Azure streaming limitation). Returns count of successfully cancelled downloads. Use download_list() to verify cancellation. Optional: downloadId. Returns cancelled count.

Inputs: downloadId.

download_listA

📥 List downloads with flexible filtering and pagination. REAL-TIME: <1s. Filter by status (active/completed/failed/all) to monitor ongoing downloads or review history. Filter by type (logs/database/all) to track specific operations. Use pagination (limit, offset) for large download histories. Returns download IDs, status, progress percentage, file info, and start/completion times. Use this to find downloadId for download_status() or download_cancel() calls. All parameters optional.

Inputs: status, type, limit, offset.

download_logsA

📊 Download application logs from environment to local storage. BACKGROUND: returns immediately, download continues in background. Supports date filtering (dateFilter: "2025/10/14", "past-7-days") and log type (http, application, all). Use this when you need logs for offline analysis. For quick online analysis, use analyze_logs_streaming() instead (2x faster). Required: environment. Returns downloadId for monitoring with download_status().

Inputs: environment, logType, containerName, slot, +23 more.

download_statusA

📊 Get real-time status of specific download. REAL-TIME: <1s. Returns current progress percentage, download speed (MB/s), estimated time remaining, and local file path when download completes. Poll this every 5-10s to track long-running downloads. Download completes when status="completed" and file path is provided. Required: downloadId. Returns progress, speed, ETA, file path.

Inputs: downloadId (required), monitor.

enable_telemetryA

🔔 Enable anonymous usage telemetry collection. INSTANT: <1s. Resumes collecting tool usage patterns and error data for product improvement. No personal data collected, only tool names and error types. Change persists for session. No parameters. Returns confirmation of enabled telemetry.

Inputs: no named parameters.

get_ai_guidanceA

🤖 Get AI-powered tool recommendations for natural language tasks. ANALYSIS: <1s. Analyzes task description and suggests which MCP tool to use with recommended parameters. Use when uncertain which tool fits your workflow. Returns recommended tool name, suggested parameters, and reasoning. Required: taskDescription (natural language).

Inputs: topic.

get_cache_statusA

💾 View cache performance metrics. REAL-TIME: <1s. NOTE: Cache is now operation-specific (no central management). Shows cache hit/miss rates for different operation types. Use to understand caching effectiveness. No parameters. Returns cache statistics by operation type.

Inputs: projectName, projectId, action.

get_deployment_statusA

📊 Get detailed deployment status and progress. REAL-TIME: <2s. Returns current status (InProgress, AwaitingVerification, Succeeded, Failed, Reset), progress percentage, and slot validation URL when status is AwaitingVerification. Set monitor=true to poll every 30s until reaches AwaitingVerification. Set waitBeforeCheck (seconds) to pause before checking status. Required: deploymentId. Agent workflow: After start_deployment() → poll status until AwaitingVerification → test slot URL → complete_deployment().

Inputs: deploymentId (required), waitBeforeCheck, monitor, projectName, +3 more.

get_monitoring_statsA

📈 Get aggregate statistics for all monitors. REAL-TIME: <1s. Returns total monitor count, active monitors, average update frequency, and average monitor duration. Use to understand monitoring load and system activity. No parameters. Returns monitoring statistics summary.

Inputs: no named parameters.

get_projectA

📋 Get detailed project configuration. REAL-TIME: <1s. Returns project ID, name, configured environments, hosting type (DXP/self-hosted), and credential validation status. Use to inspect project settings or troubleshoot configuration issues. Required: projectName. Returns full project config object.

Inputs: projectName, projectId.

get_rate_limit_statusA

⏳ View current API rate limit status. REAL-TIME: <1s. Shows requests remaining (per minute and hourly), reset times, and current usage percentage. Optimizely API limits: 30/min, 500/hour per project. Use before batch operations to avoid hitting limits. Optional: project. Returns rate limit metrics and reset timestamps.

Inputs: projectName, projectId.

get_supportA

💬 Get support contact information and documentation. INSTANT: <1s. Returns support email, documentation URLs, API reference links, and GitHub issues page. Use when you need help or want to report issues. No parameters. Returns support resources object.

Inputs: no named parameters.

get_versionA

📌 Get current MCP server version and update availability. REAL-TIME: <1s. Checks local version against NPM registry for updates. Use this to verify you have latest features and bug fixes. Returns current version, latest available version, and update available flag. Suggests npm update command if outdated.

Inputs: no named parameters.

health_checkA

🏥 Check MCP server overall health status. REAL-TIME: 1-2s. Returns telemetry status, API rate limit info, active background monitors count, and system resource usage. Use this to verify server is operating normally before critical operations. No parameters. Returns health metrics and component status.

Inputs: projectId, projectName, apiKey, apiSecret, +1 more.

list_deploymentsA

📋 List recent deployments with filtering and pagination. REAL-TIME: <2s. Returns deployment IDs, status (InProgress, AwaitingVerification, Succeeded, Failed), source/target environments, and timestamps. Set activeOnly=true to show only in-progress/awaiting deployments. Use pagination (limit, offset) for large deployment histories. All parameters optional. Returns deployment history array. Use get_deployment_status() for detailed info on specific deployment.

Inputs: limit, offset, activeOnly, status, +6 more.

list_monitorsA

📡 List active background monitors tracking deployments. REAL-TIME: <1s. Shows all monitors polling deployment status, including monitor IDs, associated deployment IDs, current status, and update count. Use to discover active monitors for stop_monitoring() or update_monitoring_interval() calls. No parameters. Returns array of active monitor details.

Inputs: no named parameters.

list_projectsA

📂 List all configured projects in multi-project setup. REAL-TIME: <1s. Returns project names, IDs, hosting types (DXP/self-hosted), and active status. Use to discover available projects before switch_project() call. No parameters. Returns array of project summaries.

Inputs: limit, offset.

list_storage_containersA

📦 List Azure blob storage containers for environment. REAL-TIME: 1-3s. Returns container names, types (logs, blobs, websitelogs), and creation dates. Use this to discover available containers before download_blobs() or generate_storage_sas_link() calls. Containers vary by environment and project configuration. Required: environment. Optional: project. Returns array of container details.

Inputs: environment (required), limit, offset, projectName, +3 more.

quickA

⚡ Fast status check for active deployments only. REAL-TIME: <1s. Returns only critical issues and in-progress deployments without detailed logs. Use this for quick health checks before starting new operations. Returns filtered deployment summary. Optional: project.

Inputs: project.

reset_deploymentA

↩️ Rollback deployment to previous state. ASYNC: 5-15min. Reverses all changes made by deployment, restoring previous code and optionally database. Use when deployment verification fails or errors detected. Set resetWithDbRollback=true to also rollback database changes. Deployment transitions to "Reset" status when complete. Required: deploymentId. Agent workflow: If deployment verification fails → reset_deployment() → investigate logs with analyze_logs_streaming().

Inputs: deploymentId (required), projectName, projectId, apiKey, +1 more.

show_download_configA

📁 Show download directory configuration and disk space. REAL-TIME: <1s. Returns configured download path, available disk space, and write permissions status. Use this before starting large downloads to ensure sufficient space. Checks both configuration validity and file system permissions. Optional: project. Returns path, free space (GB), permissions.

Inputs: projectName.

start_deploymentA

🚀 Start new deployment from source to target environment. ASYNC: 5-30min. Initiates deployment and auto-monitors progress with real-time updates. CODE deployments flow upward (Integration→Preproduction→Production). CONTENT deployments flow downward (Production→Preproduction→Integration). Returns deploymentId immediately. Set includeBlob=true for static files, includeDB=true for database sync. When status reaches "AwaitingVerification", use get_deployment_status() to get slot URL for testing, then complete_deployment() to finalize. Required: sourceEnvironment, targetEnvironment.

Inputs: sourceEnvironment (required), targetEnvironment (required), deploymentType, sourceApps, +10 more.

statusA

📊 Show current deployment status and environment health. REAL-TIME: <1s. Returns deployment states (InProgress, AwaitingVerification, Succeeded, Failed), progress percentage, and error details. Use this to check if deployments need completion or investigation. Optional: environment, project. Returns active deployment info and environment health metrics.

Inputs: project, environment.

stop_monitoringA

🛑 Stop background monitoring for deployment. INSTANT: <1s. Stops polling immediately and returns final deployment status at time of stop. Monitor is removed from active monitors list. Use when deployment completes or when manual monitoring is preferred. Required: monitorId. Returns final deployment status and monitor summary.

Inputs: deploymentId, all.

switch_projectA

🔄 Switch active project context for multi-project setups. INSTANT: <1s. Changes default credentials and project ID for all subsequent tool calls. Use this before operations when managing multiple Optimizely projects. Project context persists for entire session. Required: projectName. Returns new active project details. Use list_projects() to see available projects.

Inputs: projectName (required).

test_connectionA

🔍 Test API connection and verify credentials. REAL-TIME: 2-5s. Validates API key/secret, checks environment accessibility (Integration, Preproduction, Production), and returns permission levels. Use this after configuration changes or when troubleshooting connection issues. Returns accessible environments and detected project info. Optional: project. Use verify_access() for detailed permission checks.

Inputs: projectId, projectName, apiKey, apiSecret, +3 more.

update_monitoring_intervalA

⏱️ Change polling frequency for specific monitor. INSTANT: <1s. Adjusts how often monitor checks deployment status. Valid range: 10-600 seconds. Lower intervals (10-30s) for urgent deployments, higher intervals (60-300s) for long-running operations to reduce API calls. Required: monitorId, intervalSeconds. Returns updated monitor configuration.

Inputs: interval (required), deploymentId.

update_projectA

✏️ Update project configuration settings. INSTANT: <1s. Modifies stored credentials, project name, or environment settings. Changes persist for session. Use with caution - invalid credentials will break subsequent operations. Required: projectName, updates (object with fields to change). Returns updated project config. Test with test_connection() after updating.

Inputs: projectName, projectId, renameTo, apiKey, +6 more.

verify_accessA

🔑 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.

Inputs: projectId, projectName, apiKey, apiSecret, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 42 tools

    Disambiguation3/5

    Most tools have distinct purposes, but there is some overlap that could cause confusion. For example, 'status' and 'get_deployment_status' both provide deployment status, and 'health_check' and 'quick' both offer health/status checks, though with different scopes. The descriptions help clarify, but an agent might misselect between these similar tools.

    Naming Consistency4/5

    The naming follows a consistent snake_case pattern throughout, with clear verb_noun structures (e.g., 'analyze_logs_streaming', 'complete_deployment'). There are minor deviations like 'quick' (a single word) and 'status' (noun-only), but overall the naming is predictable and readable.

    Tool Count2/5

    With 42 tools, the count is excessive for the server's purpose of managing Optimizely DXP deployments and logs. Many tools could be consolidated or removed (e.g., separate download tools for logs, blobs, and databases, or multiple status-checking tools), making the surface overwhelming and likely to confuse agents.

    Completeness5/5

    The tool set provides comprehensive coverage for deployment workflows, log analysis, content management, and project administration. It includes full CRUD operations (e.g., start, monitor, complete, reset deployments), detailed monitoring, and utility functions (e.g., telemetry, support), with no obvious gaps for the domain.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage Dokploy deployments, including creating and deploying applications, managing databases, configuring domains with SSL, and monitoring application status through a standardized interface.
      31 npm
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to manage cloud infrastructure through natural language by providing a unified interface to the Dokploy platform. Supports Docker containers, applications, databases, domains, monitoring, and deployment operations through conversational commands.
      31 npm
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Optimizely CMS via its GraphQL and Content Management APIs, supporting dynamic content discovery, retrieval, and management.
      12 npm
      6
      MIT