Skip to main content
Glama

MCP Jenkins

PyPI-VersionPyPI - Downloads PyPI-Downloads Schmiedeabzeichen prüfenLizenz

Das Model Context Protocol (MCP) ist eine Open-Source-Implementierung, die Jenkins mit KI-Sprachmodellen gemäß der MCP-Spezifikation von Anthropic verbindet. Dieses Projekt ermöglicht sichere, kontextbezogene KI-Interaktionen mit Jenkins-Tools unter Wahrung von Datenschutz und -sicherheit.

Cursor-Demo

Cursor-Demo

Related MCP server: Upstash MCP Server

Installationshandbuch

Installation

Wählen Sie eine dieser Installationsmethoden:

# Using uv (recommended) pip install uv uvx mcp-jenkins # Using pip pip install mcp-jenkins # Using Smithery npx -y @smithery/cli@latest install @lanbaoshen/mcp-jenkins --client claude

Konfiguration und Nutzung

Cursor

  1. Cursoreinstellungen öffnen

  2. Navigieren Sie zu MCP

  3. Klicken Sie auf + Neuen globalen MCP-Server hinzufügen

Dadurch wird die Datei ~/.cursor/mcp.json mit Ihrer MCP-Serverkonfiguration erstellt oder bearbeitet.

{ "mcpServers": { "mcp-jenkins": { "command": "uvx", "args": [ "mcp-jenkins", "--jenkins-url=xxx", "--jenkins-username=xxx", "--jenkins-password=xxx" ] } } }

Zeilenargumente

# Stdio Mode uvx mcp-jenkins --jenkins-url xxx --jenkins-username xxx --jenkins-password xxx # SSE Mode uvx mcp-jenkins --jenkins-url xxx --jenkins-username xxx --jenkins-password xxx --transport sse --port 9887

AutoGen

Autogen installieren:

pip install "autogen-ext[azure,ollama,openai,mcp]" autogen-chat

Führen Sie Python-Skripte aus:

import asyncio from autogen_ext.tools.mcp import StdioMcpToolAdapter, StdioServerParams from autogen_agentchat.agents import AssistantAgent from autogen_agentchat.ui import Console from autogen_core import CancellationToken async def main() -> None: # Create server params for the remote MCP service server_params = StdioServerParams( command='uvx', args=[ 'mcp-jenkins', '--jenkins-username', 'xxx', '--jenkins-password', 'xxx', '--jenkins-url', 'xxx' ], ) # Get the translation tool from the server adapter = await StdioMcpToolAdapter.from_server_params(server_params, 'get_all_jobs') # Create an agent that can use the translation tool agent = AssistantAgent( name='jenkins_assistant', model_client=[Replace_with_your_model_client], tools=[adapter], ) # Let the agent translate some text await Console( agent.run_stream(task='Get all jobs', cancellation_token=CancellationToken()) ) if __name__ == "__main__": asyncio.run(main())

Verfügbare Tools

Werkzeug

Beschreibung

alle Jobs abrufen

Alle Jobs abrufen

get_job_config

Jobkonfiguration abrufen

Jobsuche

Jobsuche nach einem bestimmten Feld

Ausführen von Builds

Ausführen von Builds

get_build_info

Build-Informationen abrufen

Informationen zum Job abrufen

Jobinformationen erhalten

Build_Job

Erstellen Sie einen Job mit Param

get_build_logs

Build-Protokolle abrufen

alle Knoten abrufen

Knoten abrufen

get_node_config

Holen Sie sich die Konfiguration des Knotens

alle Warteschlangenelemente abrufen

Alle Warteschlangenelemente abrufen

get_queue_item

Informationen zu Warteschlangenelementen abrufen

Warteschlangenelement abbrechen

Warteschlangenelement abbrechen

Entwicklung und Debugging

# Using MCP Inspector # For installed package npx @modelcontextprotocol/inspector uvx mcp-jenkins --jenkins-url xxx --jenkins-username xxx --jenkins-password xxx # For local development version npx @modelcontextprotocol/inspector uv --directory /path/to/your/mcp-jenkins run mcp-jenkins --jenkins-url xxx --jenkins-username xxx --jenkins-password xxx

Pre-Commit-Hook

# Install Dependency uv sync --all-extras --dev pre-commit install # Manually execute pre-commit run --all-files

UT

# Install Dependency uv sync --all-extras --dev # Execute UT uv run pytest --cov=mcp_jenkins

Lizenz

Lizenziert unter MIT – siehe LICENSE- Datei. Dies ist kein offizielles Jenkins-Produkt.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lanbaoshen/mcp-jenkins'

If you have feedback or need assistance with the MCP directory API, please join our Discord server