Skip to main content
This guide covers common issues you might encounter when using Dokploy MCP Server and their solutions.

Installation Issues

Problem: Running npx -y @ahdev/dokploy-mcp fails with package errors.Solution: Try adding @latest to ensure you’re getting the most recent version:
npx -y @ahdev/dokploy-mcp@latest
Update your MCP client configuration:
{
  "mcpServers": {
    "dokploy-mcp": {
      "command": "npx",
      "args": ["-y", "@ahdev/dokploy-mcp@latest"],
      "env": {
        "DOKPLOY_URL": "https://your-dokploy-server.com/api",
        "DOKPLOY_API_KEY": "your-dokploy-api-token"
      }
    }
  }
}
Problem: Errors about missing fetch or other modern Node.js features.Solution: Dokploy MCP Server requires Node.js v18 or higher for native fetch support.Verify your Node.js version:
node --version
Install Node.js v18 or higher:
  • Using nvm (recommended):
    nvm install 18
    nvm use 18
    
  • Download from nodejs.org: https://nodejs.org/
Alternative: Use Docker to avoid Node.js version issues entirely.
Problem: MCP client can’t execute npx on Windows.Solution: Use cmd as the command wrapper:
{
  "mcpServers": {
    "dokploy-mcp": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@ahdev/dokploy-mcp"],
      "env": {
        "DOKPLOY_URL": "https://your-dokploy-server.com/api",
        "DOKPLOY_API_KEY": "your-dokploy-api-token"
      }
    }
  }
}

Connection Issues

Problem: Server fails to start with “DOKPLOY_URL is required” or connection errors.Solution: Verify your DOKPLOY_URL environment variable:
  1. Check the URL format: Must include /api endpoint
    ✓ Correct: https://your-dokploy-server.com/api
    ✗ Wrong:   https://your-dokploy-server.com
    
  2. Verify URL is accessible:
    curl https://your-dokploy-server.com/api
    
  3. Check for typos in your MCP client configuration
  4. Use environment variables for easier management:
    export DOKPLOY_URL="https://your-dokploy-server.com/api"
    export DOKPLOY_API_KEY="your_token_here"
    npx -y @ahdev/dokploy-mcp
    
Problem: API requests fail with 401 Unauthorized or 403 Forbidden errors.Solution:
  1. Verify your API key is correct and active in your Dokploy server
  2. Generate a new API token from your Dokploy dashboard
  3. Check environment variable is set correctly:
    # In your shell
    echo $DOKPLOY_API_KEY
    
  4. Update MCP client config with the correct key:
    {
      "mcpServers": {
        "dokploy-mcp": {
          "env": {
            "DOKPLOY_API_KEY": "your-valid-api-token"
          }
        }
      }
    }
    
  5. Check for special characters that might need escaping in JSON
Problem: Unable to reach Dokploy server, timeout errors.Solution:
  1. Verify Dokploy server is running:
    curl -v https://your-dokploy-server.com/api
    
  2. Check firewall rules allow outbound HTTPS connections
  3. Test from same network to rule out VPN or network issues
  4. Verify DNS resolution:
    nslookup your-dokploy-server.com
    
  5. Check for proxy settings that might interfere with connections

Transport Mode Issues

Problem: MCP client shows connection errors or server not responding.Solution:
  1. Verify stdio is the default mode (no --http flag)
  2. Check MCP client logs for detailed error messages
  3. Test with MCP Inspector to isolate the issue:
    npx @modelcontextprotocol/inspector npx -y @ahdev/dokploy-mcp
    
  4. Ensure no output to stdout in custom builds (use stderr for logging)
  5. Try Docker stdio mode if local setup fails:
    {
      "mcpServers": {
        "dokploy-mcp": {
          "command": "docker",
          "args": [
            "run", "-i", "--rm",
            "-e", "DOKPLOY_URL=https://your-server.com/api",
            "-e", "DOKPLOY_API_KEY=your_token",
            "dokploy-mcp"
          ]
        }
      }
    }
    
Problem: HTTP server starts but can’t access endpoints.Solution:
  1. Verify HTTP mode is enabled:
    # Using environment variable
    MCP_TRANSPORT=http npx -y @ahdev/dokploy-mcp
    
    # Using flag
    npx -y @ahdev/dokploy-mcp --http
    
  2. Check port 3000 is not in use:
    # Linux/Mac
    lsof -i :3000
    
    # Windows
    netstat -ano | findstr :3000
    
  3. Test health endpoint:
    curl http://localhost:3000/health
    
  4. Check firewall allows port 3000
  5. For Docker, verify port mapping:
    docker run -p 8080:3000 -e MCP_TRANSPORT=http ...
    curl http://localhost:8080/health
    
Problem: Older MCP clients can’t connect to HTTP mode.Solution: The server supports both modern Streamable HTTP and legacy SSE protocols simultaneously.Legacy SSE endpoints are available at:
  • GET /sse - SSE stream initialization
  • POST /messages - Client message posting
Modern endpoints (default for new clients):
  • POST /mcp - Client requests
  • GET /mcp - Server notifications
  • DELETE /mcp - Session termination
Both protocols work simultaneously, so no configuration change is needed.

MCP Client Errors

Problem: Dokploy MCP tools don’t show up in Claude Desktop, VS Code, or other clients.Solution:
  1. Restart the MCP client after configuration changes
  2. Check configuration file path is correct:
    • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (Mac)
    • VS Code: Check VS Code MCP settings
    • Cursor: ~/.cursor/mcp.json
  3. Validate JSON syntax:
    # Use a JSON validator
    cat ~/.cursor/mcp.json | jq .
    
  4. Check client logs for connection errors
  5. Test with MCP Inspector to verify tools are available:
    npx @modelcontextprotocol/inspector npx -y @ahdev/dokploy-mcp
    
Problem: Tools show up but fail when executed.Solution:
  1. Check API credentials are valid (see Connection Issues above)
  2. Verify parameters match the tool schema
  3. Review Dokploy server logs for API errors
  4. Test with MCP Inspector to see detailed error messages
  5. Check Dokploy permissions for the API key being used
  6. Verify resource exists (e.g., project ID, application ID) in Dokploy
Problem: Tools are slow or timing out.Solution:
  1. Check Dokploy server performance and load
  2. Verify network latency to Dokploy server:
    ping your-dokploy-server.com
    
  3. For Docker HTTP mode, check container resources:
    docker stats dokploy-mcp-http
    
  4. Increase timeout in MCP client configuration if available
  5. Check for rate limiting on Dokploy API

Docker-Specific Issues

Problem: docker build fails during compilation.Solution:
  1. Ensure Docker is up to date:
    docker --version
    
  2. Clear Docker build cache:
    docker builder prune
    docker build --no-cache -t dokploy-mcp .
    
  3. Check disk space:
    docker system df
    
  4. Verify repository is cloned correctly:
    ls -la src/
    cat package.json
    
Problem: Container shows unhealthy status.Solution:
  1. Check health endpoint manually:
    docker exec dokploy-mcp-http wget -O- http://localhost:3000/health
    
  2. View health check logs:
    docker inspect --format='{{json .State.Health}}' dokploy-mcp-http | jq
    
  3. Ensure HTTP mode is enabled:
    docker exec dokploy-mcp-http env | grep MCP_TRANSPORT
    
  4. Check container logs for startup errors:
    docker logs dokploy-mcp-http
    
  5. Health check only runs in HTTP mode - stdio containers always return healthy
Problem: Environment variables from .env file not being used.Solution:
  1. Verify .env file location (same directory as docker-compose.yml)
  2. Check .env file format:
    DOKPLOY_URL=https://your-server.com/api
    DOKPLOY_AUTH_TOKEN=your_token_here
    MCP_TRANSPORT=http
    EXTERNAL_PORT=3000
    
  3. No quotes needed for simple values in .env
  4. Recreate containers after .env changes:
    docker-compose down
    docker-compose up -d
    
  5. Verify environment variables are loaded:
    docker-compose config
    

Development Issues

Problem: npm run build fails with type errors.Solution:
  1. Run type check for detailed errors:
    npm run type-check
    
  2. Ensure dependencies are installed:
    npm install
    
  3. Check TypeScript version matches project requirements:
    npm list typescript
    
  4. Clean and rebuild:
    npm run clean
    npm run build
    
Problem: Pre-commit checks fail with linting errors.Solution:
  1. Auto-fix linting issues:
    npm run lint:fix
    
  2. Auto-format code:
    npm run format
    
  3. Run all pre-commit checks:
    npm run precommit
    

Verification Commands

Use these commands to verify your setup:
# Check Node.js version
node --version

# Test Dokploy API connection
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://your-dokploy-server.com/api/projects

# Verify npm package
npm view @ahdev/dokploy-mcp version

# Test with MCP Inspector
npx @modelcontextprotocol/inspector npx -y @ahdev/dokploy-mcp@latest

# Check Docker image
docker images | grep dokploy-mcp

# Test HTTP health endpoint
curl http://localhost:3000/health

# Validate JSON configuration
cat ~/.cursor/mcp.json | jq .

Getting Help

Report an issue

If you encounter a bug or issue not covered here, please open an issue on GitHub with:
  • Detailed description of the problem
  • Steps to reproduce
  • Environment information (OS, Node.js version, MCP client)
  • Relevant error messages or logs

Read the documentation

Next Steps

Build docs developers (and LLMs) love