mcp-jenkins-intelligence

mcp-jenkins-intelligence

Enables natural language interfaces for complex Jenkins pipeline operations, including monitoring, analysis, and optimization through AI-powered conversations in VSCode and Cursor.

Category
访问服务器

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

Variable Description Required Default
JENKINS_URL Jenkins server URL Yes -
JENKINS_USERNAME Jenkins username Yes -
JENKINS_TOKEN Jenkins API token Yes -
MCP_SERVER_PORT MCP server port No 8000

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

Tool Description Parameters
list_pipelines List all available pipelines search (optional)
get_pipeline_details Get detailed pipeline information pipeline_name
get_pipeline_builds Get recent builds for a pipeline pipeline_name, limit, status
analyze_pipeline_health Analyze pipeline health and performance pipeline_name, period
analyze_pipeline_failure Analyze specific pipeline failure pipeline_name, build_number
ask_pipeline_question Ask natural language questions question, pipeline_names

Monitoring Tools

Tool Description Parameters
get_pipeline_metrics Get detailed pipeline metrics pipeline_name, period
get_pipeline_dependencies Get pipeline dependencies pipeline_name
monitor_pipeline_queue Monitor Jenkins build queue -
analyze_build_trends Analyze build trends across pipelines pipeline_names, period

AI Tools

Tool Description Parameters
predict_pipeline_failure Predict likely pipeline failures pipeline_name
suggest_pipeline_optimization Get optimization suggestions pipeline_name
detect_pipeline_anomalies Detect unusual pipeline behavior pipeline_name, sensitivity
generate_ai_insights Generate comprehensive AI insights pipeline_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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选