CI/CD Integration

Integrate webMCP optimization into your development workflow with automated validation, optimization, and deployment.

Supported Platforms

webMCP integrates seamlessly with all major CI/CD platforms

GitHub Actions

Most PopularEasy Setup

Integrate webMCP into GitHub workflows

  • Pre-built actions available
  • Matrix builds for multiple models
  • Artifact storage for optimized files
  • PR comments with optimization results

GitLab CI/CD

PopularEasy Setup

GitLab pipeline integration

  • Docker-based execution
  • Merge request integration
  • Pages deployment support
  • Pipeline artifacts and reports

Jenkins

EnterpriseMedium Setup

Jenkins plugin and pipeline support

  • Plugin available
  • Groovy pipeline scripts
  • Build triggers and notifications
  • Integration with other tools

Azure DevOps

EnterpriseMedium Setup

Azure Pipelines integration

  • YAML pipeline definitions
  • Variable groups for configuration
  • Build and release pipelines
  • Work item integration

Workflow Examples

Ready-to-use workflow configurations for your CI/CD platform

GitHub Actions - Basic Workflow

Simple workflow to validate and optimize webMCP files

.github/workflows/webmcp.yml
name: webMCP Optimization
on:
  push:
    branches: [ main, develop ]
  pull_request:
    branches: [ main ]

jobs:
  webmcp-optimization:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v4
    
    - name: Setup Node.js
      uses: actions/setup-node@v4
      with:
        node-version: '18'
        cache: 'npm'
    
    - name: Install webMCP CLI
      run: npm install -g @webmcp/cli
    
    - name: Validate webMCP files
      run: |
        find . -name "*.wmcp" -exec webmcp validate {} \;
    
    - name: Optimize for multiple models
      run: |
        webmcp optimize forms/*.wmcp \
          --target gpt-4o \
          --level advanced \
          --output-dir ./optimized
    
    - name: Upload optimization results
      uses: actions/upload-artifact@v4
      with:
        name: webmcp-optimized
        path: ./optimized/

GitHub Actions - Advanced with Matrix

Matrix build testing optimization across multiple AI models

.github/workflows/webmcp-matrix.yml
name: webMCP Multi-Model Optimization
on: [push, pull_request]

jobs:
  optimize:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        model: [gpt-4o, claude-3.5-sonnet, gpt-4, gemini-pro]
        level: [basic, advanced]
    
    steps:
    - uses: actions/checkout@v4
    
    - name: Setup webMCP
      run: |
        npm install -g @webmcp/cli
        echo "WEBMCP_API_KEY=${{ secrets.WEBMCP_API_KEY }}" >> $GITHUB_ENV
    
    - name: Optimize for ${{ matrix.model }}
      run: |
        webmcp optimize forms/*.wmcp \
          --target ${{ matrix.model }} \
          --level ${{ matrix.level }} \
          --output-dir ./optimized-${{ matrix.model }}-${{ matrix.level }} \
          --report optimization-report.json
    
    - name: Comment PR with results
      if: github.event_name == 'pull_request'
      uses: actions/github-script@v7
      with:
        script: |
          const fs = require('fs');
          const report = JSON.parse(fs.readFileSync('optimization-report.json'));
          const comment = `## webMCP Optimization Results (${{ matrix.model }})
          
          - **Token Reduction**: ${report.tokenReduction}%
          - **Cost Savings**: $${report.costSavings}
          - **Files Processed**: ${report.filesProcessed}
          `;
          
          github.rest.issues.createComment({
            issue_number: context.issue.number,
            owner: context.repo.owner,
            repo: context.repo.repo,
            body: comment
          });

GitLab CI/CD Pipeline

GitLab pipeline with optimization and deployment

.gitlab-ci.yml
stages:
  - validate
  - optimize
  - deploy

variables:
  WEBMCP_CACHE_DIR: ".webmcp-cache"

cache:
  paths:
    - node_modules/
    - ${WEBMCP_CACHE_DIR}

before_script:
  - npm install -g @webmcp/cli

validate_webmcp:
  stage: validate
  script:
    - webmcp validate forms/*.wmcp --strict --json > validation-report.json
  artifacts:
    reports:
      junit: validation-report.json
    expire_in: 1 week
  only:
    - merge_requests
    - main

optimize_webmcp:
  stage: optimize
  script:
    - |
      for model in gpt-4o claude-3.5-sonnet gpt-4; do
        webmcp optimize forms/*.wmcp \
          --target $model \
          --level advanced \
          --output-dir ./optimized/$model
      done
    - webmcp benchmark forms/*.wmcp --detailed > benchmark-report.json
  artifacts:
    paths:
      - optimized/
      - benchmark-report.json
    expire_in: 1 month
  only:
    - main

deploy_optimized:
  stage: deploy
  script:
    - echo "Deploying optimized webMCP files..."
    - cp -r optimized/ /var/www/webmcp/
  environment:
    name: production
    url: https://example.com
  only:
    - main
  when: manual

Jenkins Pipeline

Groovy-based Jenkins pipeline

Jenkinsfile
pipeline {
    agent any
    
    environment {
        WEBMCP_API_KEY = credentials('webmcp-api-key')
        NODE_VERSION = '18'
    }
    
    tools {
        nodejs "${NODE_VERSION}"
    }
    
    stages {
        stage('Setup') {
            steps {
                sh 'npm install -g @webmcp/cli'
                sh 'webmcp --version'
            }
        }
        
        stage('Validate') {
            steps {
                sh '''
                    find . -name "*.wmcp" | while read file; do
                        echo "Validating $file"
                        webmcp validate "$file" --strict
                    done
                '''
            }
        }
        
        stage('Optimize') {
            parallel {
                stage('GPT-4o') {
                    steps {
                        sh '''
                            webmcp optimize forms/*.wmcp \
                                --target gpt-4o \
                                --level advanced \
                                --output-dir ./optimized/gpt-4o
                        '''
                    }
                }
                stage('Claude') {
                    steps {
                        sh '''
                            webmcp optimize forms/*.wmcp \
                                --target claude-3.5-sonnet \
                                --level advanced \
                                --output-dir ./optimized/claude
                        '''
                    }
                }
            }
        }
        
        stage('Report') {
            steps {
                sh '''
                    webmcp benchmark forms/*.wmcp \
                        --models gpt-4o,claude-3.5-sonnet \
                        --detailed > benchmark-report.json
                '''
                
                publishHTML([
                    allowMissing: false,
                    alwaysLinkToLastBuild: true,
                    keepAll: true,
                    reportDir: '.',
                    reportFiles: 'benchmark-report.json',
                    reportName: 'webMCP Optimization Report'
                ])
            }
        }
    }
    
    post {
        always {
            archiveArtifacts artifacts: 'optimized/**/*', fingerprint: true
            cleanWs()
        }
        failure {
            emailext (
                subject: "webMCP Optimization Failed: ${env.JOB_NAME} - ${env.BUILD_NUMBER}",
                body: "Build failed. Check console output at ${env.BUILD_URL}console",
                to: "${env.CHANGE_AUTHOR_EMAIL}"
            )
        }
    }
}

Integration Benefits

Streamline your development process with automated webMCP workflows

Automated Validation

Catch webMCP schema issues early in development

  • Schema validation on every commit
  • Best practices enforcement
  • Consistent quality across team
  • Early error detection

Performance Monitoring

Track optimization performance over time

  • Token reduction tracking
  • Cost savings monitoring
  • Performance regression detection
  • Optimization trend analysis

Security Integration

Secure handling of API keys and sensitive data

  • Secure secret management
  • Encrypted optimization data
  • Access control and permissions
  • Audit trail and compliance

Deployment Automation

Seamlessly deploy optimized webMCP files

  • Automated deployment pipelines
  • Environment-specific optimization
  • Rollback capabilities
  • Zero-downtime deployments

Best Practices

Follow these guidelines for optimal CI/CD integration

Performance

  • Cache node_modules and webMCP artifacts
  • Use parallel optimization for multiple models
  • Optimize only changed files in incremental builds
  • Set appropriate timeouts for API calls

Security

  • Store API keys in encrypted environment variables
  • Use least-privilege access for CI/CD systems
  • Audit optimization results for sensitive data
  • Implement proper secret rotation policies

Quality

  • Always validate before optimization
  • Use strict validation in production pipelines
  • Generate comprehensive reports for review
  • Set up notifications for optimization failures

Monitoring

  • Track token reduction metrics over time
  • Monitor cost savings and ROI
  • Set up alerts for performance regressions
  • Generate regular optimization reports

Ready to Automate?

Start integrating webMCP into your development workflow today