mcpField
M
Mcp Jenkins Intelligence

Mcp Jenkins Intelligence

Local
github.com/heniv96Cloud & Infra3Updated 54w ago

About Mcp Jenkins Intelligence

Mcp Jenkins Intelligence is a Jenkins MCP server for DevOps teams that analyzes pipelines, build failures, and performance through natural-language queries. It also provides anomaly detection, optimization suggestions, and security auditing, while processing and anonymizing data locally.

Key features

  1. 01Query pipelines in natural language
  2. 02Analyze pipeline health and failures
  3. 03Monitor build queues and trends
  4. 04Predict failures and detect anomalies
  5. 05Generate optimization advice and reports
  6. 06Process locally and anonymize sensitive data

Use cases

  1. 01Investigate the cause of a failed build
  2. 02Compare pipeline performance across teams
  3. 03Find opportunities to reduce build times
  4. 04Audit Jenkins permissions and protect sensitive data

MCP support

The MCP server exposes Jenkins pipeline lookup, monitoring, failure analysis, prediction, and optimization tools to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP Jenkins Intelligence

License Python FastMCP Jenkins MCP Stars Issues

PRs Welcome

The Jenkins Intelligence Platform
Transform your Jenkins operations with AI-powered natural language interfaces and comprehensive pipeline analysis.

Quick Start (Binary Distribution)

Prefer a ready-to-use binary? Download the latest release and start using MCP Jenkins Intelligence in seconds!

Download & Install
# Option 1: Use the installer script (recommended)
curl -fsSL https://raw.githubusercontent.com/heniv96/mcp-jenkins-intelligence/main/install.sh | bash

# Option 2: Manual download
# Download from: https://github.com/heniv96/mcp-jenkins-intelligence/releases/latest
# Choose the appropriate binary for your platform:
# - mcp-jenkins-server-macos-arm64 (macOS Apple Silicon)
# - mcp-jenkins-server-linux-amd64 (Linux AMD64)
# Make executable: chmod +x mcp-jenkins-server-<platform>
MCP Configuration

Add to your MCP client configuration (Cursor/VSCode):

{
  "mcpServers": {
    "mcp-jenkins-intelligence": {
      "command": "/path/to/mcp-jenkins-server",
      "args": [],
      "env": {
        "JENKINS_URL": "https://your-jenkins-url",
        "JENKINS_USERNAME": "your-username", 
        "JENKINS_TOKEN": "your-token"
      }
    }
  }
}

That's it! No Python installation, no dependencies - just download and run!


Overview

MCP Jenkins Intelligence is a comprehensive Model Context Protocol (MCP) solution designed for professional DevOps teams. It provides natural language interfaces for complex Jenkins pipeline operations, enabling teams to monitor, analyze, and optimize their CI/CD workflows through AI-powered conversations in VSCode and Cursor.

Key Features

Intelligent Pipeline Analysis
  • Real-time Monitoring: Live pipeline status, health metrics, and performance analytics
  • AI-Powered Insights: Natural language queries for complex pipeline analysis
  • Failure Analysis: Deep dive into pipeline failures with intelligent root cause analysis
  • Performance Optimization: Automated suggestions for improving build times and success rates
  • Advanced Analytics: Comprehensive reporting and performance comparisons
  • Anomaly Detection: AI-powered detection of unusual pipeline behavior patterns
Advanced AI Capabilities
  • Natural Language Processing: Conversational interface for complex DevOps operations
  • Smart Diagnostics: AI-driven pipeline health analysis and troubleshooting guidance
  • Context-Aware Prompts: Intelligent prompt suggestions for different analysis scenarios
  • Automated Reporting: Proactive identification of issues and optimization opportunities
Enterprise Security & Compliance
  • Multi-Authentication Support: Standard Jenkins and Azure AD integration
  • Secure Communication: TLS encryption for all Jenkins API communications
  • Audit Logging: Comprehensive audit trails for all pipeline operations
  • Minimal Privilege: Secure by design with least privilege access patterns
  • Enterprise-Grade Data Protection: 19+ protection patterns for complete data anonymization
  • Complete Anonymization: Pipeline names, cluster names, folder names, app names, branch names, organization names, repository names, and code file names are all protected
  • Hash-based Security: Sensitive data is replaced with secure hashes before AI communication
  • Local Execution: All data processing happens locally - no data leaves your environment
  • Recursive Protection: Works on nested data structures and complex objects
  • Access Control Auditing: Comprehensive permission and access control analysis
Advanced Analytics & Reporting
  • Comprehensive Reports: Generate detailed reports with metrics and insights
  • Performance Comparisons: Compare pipeline performance across teams and environments
  • Trend Analysis: Long-term performance and reliability trend analysis
Advanced AI Features
  • Anomaly Detection: AI-powered detection of unusual pipeline behavior patterns
  • Comprehensive Insights: AI-generated insights and recommendations
Performance Optimization
  • Build Time Analysis: Detailed analysis and optimization suggestions for build times
Deployment & Distribution
  • Multiple Deployment Options: Development setup or production deployment
  • Cross-Platform Support: Works on macOS, Linux, and Windows
  • Easy Configuration: Simple setup with environment variables or MCP config

Architecture

MCP Protocol Integration

The following diagram shows how MCP Jenkins Intelligence integrates with VSCode and Cursor AI through the Model Context Protocol:

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   VSCode/       │    │   MCP Protocol  │    │   Jenkins       │
│   Cursor AI     │◄──►│                 │◄──►│   Intelligence  │
│                 │    │                 │    │   Server        │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                                │
                                ▼
                    ┌─────────────────────────────────────────┐
                    │            Jenkins API                  │
                    └─────────────────────────────────────────┘
                                │
                                ▼
        ┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
        │   AI Analysis   │    │   Core Tools    │    │   MCP Resources │
        │   Engine        │    │   (30 tools)    │    │   & Prompts     │
        └─────────────────┘    └─────────────────┘    └─────────────────┘
                │                        │                        │
                ▼                        ▼                        ▼
        ┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
        │ • Health        │    │ • List          │    │ • Status        │
        │   Analysis      │    │ • Details       │    │   Resource      │
        │ • Failure       │    │ • Builds        │    │ • Summary       │
        │   Analysis      │    │ • Configure     │    │   Resource      │
        │ • AI Queries    │    │ • Test          │    │ • Dashboard     │
        │ • Metrics       │    │ • Questions     │    │   Resource      │
        │ • Dependencies  │    │ • Trigger       │    │ • Logs          │
        │ • Trends        │    │ • Stop          │    │   Resource      │
        │ • Security      │    │ • Enable/Dis    │    │ • Health        │
        │ • Export        │    │ • Config        │    │   Resource      │
        │ • Optimize      │    │ • Predict       │    │ • Analysis      │
        │                 │    │ • Suggest       │    │   Prompts       │
        └─────────────────┘    └─────────────────┘    └─────────────────┘
Modular Architecture

The internal architecture follows a clean, modular design with separation of concerns:

┌─────────────────────────────────────────────────────────────────────────┐
│                              MCP Layer                                  │
├─────────────────┬─────────────────┬─────────────────────────────────────┤
│  FastMCP Server │  Tool Registry  │  Request Router                     │
└─────────────────┴─────────────────┴─────────────────────────────────────┘
                                │
                                ▼
┌─────────────────────────────────────────────────────────────────────────┐
│                           Modular Services                              │
├─────────────┬─────────────┬─────────────┬─────────────┬─────────────────┤
│   Models    │  Services   │  Resources  │   Prompts   │                 │
├─────────────┼─────────────┼─────────────┼─────────────┼─────────────────┤
│ • Pipeline  │ • Jenkins   │ • Status    │ • Analysis  │                 │
│ • Build     │ • Core      │ • Summary   │ • Failure   │                 │
│ • Health    │ • Control   │ • Dashboard │ • Optimize  │                 │
│ • Failure   │ • Monitor   │ • Logs      │ • Security  │                 │
│ • Query     │ • AI        │ • Health    │             │                 │
│             │ • Security  │             │             │                 │
└─────────────┴─────────────┴─────────────┴─────────────┴─────────────────┘
                                │
                                ▼
┌─────────────────────────────────────────────────────────────────────────┐
│                         Tool Categories                                 │
├─────────────────┬─────────────────┬─────────────────┬─────────────────┤
│  Core Tools (9) │  Control Tools  │  Monitoring (4) │  AI Tools (5)   │
│                 │     (4)         │                 │                 │
├─────────────────┼─────────────────┼─────────────────┼─────────────────┤
│ • list_pipelines│ • trigger_build │ • get_metrics   │ • Predict       │
│ • get_details   │ • stop_build    │ • dependencies  │   Failure       │
│ • get_builds    │ • enable_disable│ • monitor_queue │ • Suggest       │
│ • ask_questions │ • get_config    │ • analyze_trends│   Optimize      │
│ • configure_    │                 │                 │ • Anomaly       │
│   jenkins       │                 │                 │   Detection     │
│ • test_         │                 │                 │ • AI            │
│   connection    │                 │                 │   Insights      │
│ • analyze_      │                 │                 │ • Retry         │
│   health        │                 │                 │   Logic         │
│ • analyze_      │                 │                 │                 │
│   failure       │                 │                 │                 │
│ • get_server_   │                 │                 │                 │
│   info          │                 │                 │                 │
└─────────────────┴─────────────────┴─────────────────┴─────────────────┘
                                │
                                ▼
┌─────────────────────────────────────────────────────────────────────────┐
│                    Additional Tool Categories                           │
├─────────────┬─────────────┬─────────────┬─────────────────────────────┤
│  Security   │ Jenkinsfile │  Analytics  │  Performance                │
│     (2)     │     (3)     │     (2)     │      (1)                    │
├─────────────┼─────────────┼─────────────┼─────────────────────────────┤
│ • scan_     │ • get_      │ • generate_ │ • analyze_                  │
│   security  │   jenkinsfile│   report   │   build_time                │
│             │ • reconstruct│ • compare_ │                             │
│             │ • suggest_  │   performance│                             │
│             │   improvements│             │                             │
└─────────────┴─────────────┴─────────────┴─────────────────────────────┘
                                │
                                ▼
┌─────────────────────────────────────────────────────────────────────────┐
│                    MCP Resources & Prompts                             │
├─────────────────────────┬─────────────────────────────────────────────┤
│  Resources (5)          │  Prompts (4)                                │
├─────────────────────────┼─────────────────────────────────────────────┤
│ • pipeline://status     │ • analyze_pipeline_prompt                   │
│ • pipeline://{name}/    │ • failure_analysis_prompt                   │
│   summary               │ • optimization_prompt                       │
│ • pipeline://dashboard  │ • security_audit_prompt                     │
│ • pipeline://{name}/    │                                             │
│   logs                  │                                             │
│ • pipeline://health     │                                             │
└─────────────────────────┴─────────────────────────────────────────────┘
Directory Structure
mcp-jenkins-intelligence/
├── server.py                 # Main MCP server (679 lines)
├── models/
│   ├── __init__.py
│   └── pipeline.py          # Pydantic models
├── services/
│   ├── __init__.py
│   ├── jenkins_service.py   # Jenkins API wrapper
│   ├── core_tools.py        # Core pipeline tools
│   ├── monitoring_tools.py  # Monitoring & analytics
│   ├── ai_tools.py          # AI intelligence tools
│   ├── security_tools.py    # Security & compliance
│   ├── advanced_ai_tools.py # Advanced AI features
│   ├── advanced_security_tools.py # Advanced security tools
│   ├── analytics_tools.py   # Analytics & reporting
│   ├── performance_tools.py # Performance optimization
│   ├── execution_analysis_service.py # Execution analysis
│   └── jenkinsfile_retrieval_service.py # Jenkinsfile management
├── resources/
│   ├── __init__.py
│   └── pipeline_resources.py # MCP resources
├── prompts/
│   ├── __init__.py
│   └── pipeline_prompts.py  # MCP prompts
├── config/
│   └── settings.py          # Configuration management
├── utils/
│   ├── __init__.py
│   └── helpers.py           # Helper functions
├── manuals/
│   ├── configuration/
│   │   └── README.md        # Configuration guide
│   ├── examples/
│   │   └── mcp-config-standalone.json # Example configuration
│   ├── quick-start/
│   │   └── README.md        # Quick start guide
│   └── troubleshooting/
│       └── README.md        # Troubleshooting guide
├── dist/                    # Built binaries (GitHub Releases)
│   ├── mcp-jenkins-server-macos-arm64    # macOS Apple Silicon binary
│   └── mcp-jenkins-server-linux-amd64    # Linux AMD64 binary
├── install.sh               # Automated installer script
├── Makefile                 # Build automation
├── build.sh                 # Build test script
├── requirements.txt         # Python dependencies
├── pyproject.toml          # Project configuration
├── LICENSE                 # MIT License
└── README.md              # This file

Installation & Setup

Prerequisites
  • Python 3.8+ (for development setup)
  • Jenkins Server with API access
  • MCP Client (VSCode with MCP extension or Cursor)
Binary Installation (Recommended)
  1. Download the binary for your platform:

    # macOS (Apple Silicon)
    curl -L -o mcp-jenkins-server https://github.com/heniv96/mcp-jenkins-intelligence/releases/latest/download/mcp-jenkins-server-macos-arm64
    
    # Linux (AMD64)
    curl -L -o mcp-jenkins-server https://github.com/heniv96/mcp-jenkins-intelligence/releases/latest/download/mcp-jenkins-server-linux-amd64
    
  2. Make it executable:

    chmod +x mcp-jenkins-server
    
  3. Configure your MCP client (see MCP Configuration section above)

Development Setup
  1. Clone the repository:

    git clone https://github.com/heniv96/mcp-jenkins-intelligence.git
    cd mcp-jenkins-intelligence
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Set environment variables:

    export JENKINS_URL="https://your-jenkins-url"
    export JENKINS_USERNAME="your-username"
    export JENKINS_TOKEN="your-token"
    
  4. Run the server:

    python server.py
    

Configuration

Environment Variables
VariableDescriptionRequiredDefault
JENKINS_URLJenkins server URLYes-
JENKINS_USERNAMEJenkins usernameYes-
JENKINS_TOKENJenkins API tokenYes-
MCP_SERVER_PORTMCP server portNo8000
MCP Client Configuration
VSCode Configuration

Add to your settings.json:

{
  "mcp.servers": {
    "mcp-jenkins-intelligence": {
      "command": "/path/to/mcp-jenkins-server",
      "args": [],
      "env": {
        "JENKINS_URL": "https://your-jenkins-url",
        "JENKINS_USERNAME": "your-username",
        "JENKINS_TOKEN": "your-token"
      }
    }
  }
}
Cursor Configuration

Add to your mcp.json:

{
  "mcpServers": {
    "mcp-jenkins-intelligence": {
      "command": "/path/to/mcp-jenkins-server",
      "args": [],
      "env": {
        "JENKINS_URL": "https://your-jenkins-url",
        "JENKINS_USERNAME": "your-username",
        "JENKINS_TOKEN": "your-token"
      }
    }
  }
}

Usage

Basic Commands

Once configured, you can interact with Jenkins through natural language:

  • "List all pipelines" - Get a list of all available pipelines
  • "Show me the health of pipeline X" - Get detailed health analysis
  • "What's wrong with the failed build?" - Analyze build failures
  • "Optimize the build time for pipeline Y" - Get optimization suggestions
  • "Generate a report for last week" - Create comprehensive reports
Advanced Features
  • AI-Powered Analysis: Ask complex questions about your pipeline performance
  • Anomaly Detection: Get alerts about unusual pipeline behavior
  • Security Auditing: Comprehensive security analysis of your Jenkins setup
  • Performance Optimization: Detailed build time analysis and suggestions

API Reference

Core Tools
ToolDescriptionParameters
list_pipelinesList all available pipelinessearch (optional)
get_pipeline_detailsGet detailed pipeline informationpipeline_name
get_pipeline_buildsGet recent builds for a pipelinepipeline_name, limit, status
analyze_pipeline_healthAnalyze pipeline health and performancepipeline_name, period
analyze_pipeline_failureAnalyze specific pipeline failurepipeline_name, build_number
ask_pipeline_questionAsk natural language questionsquestion, pipeline_names
Monitoring Tools
ToolDescriptionParameters
get_pipeline_metricsGet detailed pipeline metricspipeline_name, period
get_pipeline_dependenciesGet pipeline dependenciespipeline_name
monitor_pipeline_queueMonitor Jenkins build queue-
analyze_build_trendsAnalyze build trends across pipelinespipeline_names, period
AI Tools
ToolDescriptionParameters
predict_pipeline_failurePredict likely pipeline failurespipeline_name
suggest_pipeline_optimizationGet optimization suggestionspipeline_name
detect_pipeline_anomaliesDetect unusual pipeline behaviorpipeline_name, sensitivity
generate_ai_insightsGenerate comprehensive AI insightspipeline_name, insight_type

Security

Data Protection

MCP Jenkins Intelligence implements comprehensive data protection:

  • Complete Anonymization: All sensitive data is replaced with secure hashes
  • Local Processing: All data processing happens locally
  • No External Calls: No data is sent to external AI services
  • Recursive Protection: Works on nested data structures
  • Access Control Auditing: Comprehensive permission analysis
Supported Protection Patterns
  • Pipeline names
  • Cluster names
  • Folder names
  • Application names
  • Branch names
  • Organization names
  • Repository names
  • Code file names
  • Build numbers
  • Timestamps
  • URLs and paths
  • User information
  • Token values
  • Configuration data
  • Log entries
  • Error messages
  • Stack traces
  • Environment variables
  • And more...

Troubleshooting

Common Issues
  1. Connection Failed: Check your Jenkins URL and credentials
  2. Permission Denied: Verify your Jenkins user has appropriate permissions
  3. Binary Not Found: Ensure the binary is executable and in your PATH
  4. MCP Client Not Responding: Check your MCP configuration
Debug Mode

Enable debug logging by setting:

export DEBUG=1
Getting Help

Contributing

We welcome contributions! Please see our contributing guidelines for details.

Development
  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request
Building
# Install dependencies
pip install -r requirements.txt

# Run tests
python -m pytest

# Build binary
make build

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Changelog

v1.2.0
  • Added comprehensive data protection and anonymization
  • Improved binary distribution with cross-platform support
  • Enhanced security features and access control auditing
  • Added advanced AI capabilities and anomaly detection
  • Improved performance optimization tools
  • Added comprehensive reporting and analytics
v1.1.0
  • Initial release with core MCP functionality
  • Basic pipeline analysis and monitoring
  • AI-powered insights and recommendations

Made with ❤️ for the DevOps community

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.