
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
jenkinsci/mcp-server-plugin は、https://github.com/jenkinsci/mcp-server-plugin. からインポートされたMCPサーバー候補です。
概要
jenkinsci/mcp-server-plugin は、https://github.com/jenkinsci/mcp-server-plugin. からインポートされたMCPサーバー候補です。
概要(AI 翻訳)
Jenkins用のMCP(Model Context Protocol)サーバープラグインは、モデルコンテキストプロトコルのサーバー側コンポーネントを実装しています。このプラグインにより、JenkinsはMCPサーバーとして機能し、LLM搭載アプリケーションやIDEなどのMCPクライアントにコンテキスト、ツール、機能を提供します。
特徴
- MCPサーバー実装:モデルコンテキストプロトコルのサーバー側を実装します。
- Jenkins Integration:Jenkins 機能を MCP ツールおよびリソースとして公開します。
- 拡張可能なアーキテクチャ:
McpServerExtensionインターフェースを通じてMCPの機能を容易に拡張できるようにします。
主要構成要素
- エンドポイント:MCP通信の主なエントリーポイントで、MCPのトランスポート接続およびメッセージルーティングを処理します。
- DefaultMcpServer:
McpServerExtensionを実装し、Jenkinsのジョブやビルドとやり取りするためのデフォルトツールを提供します。 - McpToolWrapper:JavaメソッドをMCPツールとしてラップし、パラメータ解析や結果書式管理を担当します。
- McpServerExtension:MCPサーバー機能拡張のためのインターフェース。
MCP SDKバージョン
このMCPサーバーは、MCP仕様バージョン2025-06-18を実装したMCP Java SDKバージョン0.17.2に基づいています。
始めて
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Server Plugin for Jenkins
The MCP (Model Context Protocol) Server Plugin for Jenkins implements the server-side component of the Model Context Protocol. This plugin enables Jenkins to act as an MCP server, providing context, tools, and capabilities to MCP clients, such as LLM-powered applications or IDEs.
Features
- MCP Server Implementation: Implements the server-side of the Model Context Protocol.
- Jenkins Integration: Exposes Jenkins functionalities as MCP tools and resources.
- Extensible Architecture: Allows easy extension of MCP capabilities through the
McpServerExtensioninterface.
Key Components
- Endpoint: The main entry point for MCP communication, handling MCP transport connections and message routing.
- DefaultMcpServer: Implements
McpServerExtension, providing default tools for interacting with Jenkins jobs and builds. - McpToolWrapper: Wraps Java methods as MCP tools, handling parameter parsing and result formatting.
- McpServerExtension: Interface for extending MCP server capabilities.
MCP SDK Version
This MCP Server is based on the MCP Java SDK version 0.17.2, which implements the MCP specification version 2025-06-18.
Getting Started
Configuration
The MCP Server plugin automatically sets up necessary endpoints and tools upon installation, requiring no additional configuration.
System properties
The following system properties can be used to configure the MCP Server plugin:
- hard limit on max number of log lines to return with
io.jenkins.plugins.mcp.server.extensions.BuildLogsExtension.limit.max=10000(default 10000) - disable stateless endpoint with
io.jenkins.plugins.mcp.server.Endpoint.disableMcpStateless=true(default false) - disable SSE endpoint with
io.jenkins.plugins.mcp.server.Endpoint.disableMcpSse=true(default false) - disable streamable HTTP endpoint with
io.jenkins.plugins.mcp.server.Endpoint.disableMcpStreamable=true(default false) - allow anonymous MCP clients to skip the CSRF crumb with
io.jenkins.plugins.mcp.server.Endpoint.allowUnauthenticatedMcp=true(default false) - reclaim idle Streamable HTTP sessions with
io.jenkins.plugins.mcp.server.Endpoint.sessionSweepInterval=1800(seconds, default 1800, 0 disables)
[!WARNING]
io.jenkins.plugins.mcp.server.Endpoint.allowUnauthenticatedMcp=trueweakens CSRF protection. MCP POSTs that send anAuthorizationheader are exempt from the crumb, because a page on another site cannot add that header. Anonymous and session-cookie clients are not exempt unless this property is set. With it on, those POSTs rely on the Origin check, which allows a missingOriginand does nothing when the Jenkins root URL is unset. Leave the propertyfalseon any controller that browsers or anonymous users can reach.mvn hpi:runsets it so a local development controller accepts an MCP client without a crumb.
Origin header validation
インストール
npx mcp-remote http://jenkins-host/mcp-server/mcp --header Authorization: Bearer ${AUTH_TOKEN}設定
{
"mcpServers": {
"jenkins": {
"autoApprove": [
],
"disabled": false,
"timeout": 60,
"type": "streamableHttp",
"url": "https://jenkins-host/mcp-server/mcp",
"headers": {
"Authorization": "Basic <user:token base64>"
}
}
}
}