Jenkins to GitHub Actions MCP Server

Jenkins to GitHub Actions MCP Server

Converts Jenkins declarative pipelines into GitHub Actions workflow YAML files, facilitating migration from Jenkins to GitHub Actions CI/CD.

Category
Visit Server

README

Jenkins to GitHub Actions MCP Server

An MCP (Model Context Protocol) Server that converts Jenkinsfiles to GitHub Actions workflows. This tool helps you migrate your CI/CD pipelines from Jenkins to GitHub Actions by automatically converting declarative Jenkins pipelines into equivalent GitHub Actions workflow YAML files.

Quick Start

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Start the MCP server
npm start

# Try the examples
node examples/test-converter.js
node examples/test-mcp-tools.js

Features

  • 🔄 Convert Jenkins declarative pipelines to GitHub Actions workflows
  • 📊 Analyze Jenkinsfile structure and extract pipeline information
  • 🔍 Support for common Jenkins pipeline constructs:
    • Stages and steps
    • Environment variables
    • Shell commands (sh)
    • Echo commands
    • SCM checkout
  • ⚡ MCP protocol integration for seamless AI assistant interaction
  • 🛠️ Both JSON and YAML output formats

Installation

npm install
npm run build

Usage

As an MCP Server

The server can be integrated with MCP-compatible clients (like Claude Desktop):

npm start

Configuration for Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "jenkins-to-github-actions": {
      "command": "node",
      "args": ["/path/to/jenkins-to-github-actions-mcp-server/dist/index.js"]
    }
  }
}

Available Tools

1. convert_jenkinsfile

Convert a Jenkinsfile to GitHub Actions workflow.

Parameters:

  • jenkinsfile (string, required): The content of the Jenkinsfile to convert
  • format (string, optional): Output format - "yaml" or "json" (default: "yaml")

Example:

{
  "jenkinsfile": "pipeline { agent any stages { stage('Build') { steps { sh 'npm install' } } } }",
  "format": "yaml"
}

2. analyze_jenkinsfile

Analyze a Jenkinsfile and provide information about its structure.

Parameters:

  • jenkinsfile (string, required): The content of the Jenkinsfile to analyze

Example:

{
  "jenkinsfile": "pipeline { agent any stages { stage('Build') { steps { sh 'npm install' } } } }"
}

Example Conversion

Input (Jenkinsfile):

pipeline {
  agent any
  
  environment {
    NODE_ENV = 'production'
    VERSION = '1.0.0'
  }
  
  stages {
    stage('Build') {
      steps {
        sh 'npm install'
        sh 'npm run build'
      }
    }
    
    stage('Test') {
      steps {
        sh 'npm test'
      }
    }
    
    stage('Deploy') {
      steps {
        echo 'Deploying application'
        sh 'npm run deploy'
      }
    }
  }
}

Output (GitHub Actions):

name: CI
on:
  push:
    branches:
      - main
      - master
  pull_request:
    branches:
      - main
      - master
jobs:
  build:
    runs-on: ubuntu-latest
    env:
      NODE_ENV: production
      VERSION: 1.0.0
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Build
        run: npm install
      - name: Build
        run: npm run build
      - name: Test
        run: npm test
      - name: Deploy
        run: echo "Deploying application"
      - name: Deploy
        run: npm run deploy

Development

Build

npm run build

Watch Mode

npm run watch

Run Tests

npm test

Test Examples

Try the interactive examples to see the converter in action:

# Test the converter with the sample Jenkinsfile
node examples/test-converter.js

# Run the interactive MCP tools test suite
node examples/test-mcp-tools.js

Lint

npm run lint

Supported Jenkins Pipeline Features

  • ✅ Declarative pipeline syntax
  • ✅ Agent configuration
  • ✅ Environment variables
  • ✅ Multiple stages
  • ✅ Shell commands (sh)
  • ✅ Echo commands
  • ✅ SCM checkout
  • ⚠️ Scripted pipelines (limited support)
  • ❌ Complex Groovy scripting
  • ❌ Jenkins-specific plugins

Limitations

  • This tool focuses on declarative Jenkins pipelines
  • Complex Groovy scripting and Jenkins-specific plugins may not be fully supported
  • Some Jenkins-specific features may require manual adjustment in the output
  • The converter makes best-effort conversions and may include warnings for constructs that don't have direct GitHub Actions equivalents

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured