
Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
jenkinsci/mcp-server-plugin — это кандидат на MCP-сервер, импортированный из https://github.com/jenkinsci/mcp-server-plugin.
Обзор
jenkinsci/mcp-server-plugin — это кандидат на MCP-сервер, импортированный из https://github.com/jenkinsci/mcp-server-plugin.
Обзор (машинный перевод)
Плагин сервера MCP (Model Context Protocol) для Jenkins реализует серверный компонент протокола Model Context Protocol. Этот плагин позволяет Jenkins выступать в роли сервера MCP, предоставляя контекст, инструменты и возможности клиентам MCP, таким как приложения на базе LLM или IDE.
Особенности
- Реализация сервера MCP: реализует серверную часть протокола контекста модели.
- Интеграция Дженкинса: Раскрывает функциональность Дженкинса как инструменты и ресурсы MCP.
- Расширяемая архитектура: Позволяет легко расширять возможности MCP через интерфейс
McpServerExtension.
Ключевые компоненты
- Endpoint: Основная точка входа для связи MCP, обрабатывающая транспортные соединения MCP и маршрутизацию сообщений.
- DefaultMcpServer: реализует
McpServerExtension, предоставляя стандартные инструменты для взаимодействия с работами и сборками Jenkins. - McpToolWrapper: Обёртывает методы Java как инструменты MCP, обрабатывая парсинг параметров и форматирование результатов.
- McpServerExtension: Интерфейс для расширения возможностей MCP-сервера.
Версия MCP SDK
Этот MCP сервер основан на версии MCP Java SDK 0.17.2, которая реализует спецификацию MCP версии 2025-06-18.
Начало
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
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>"
}
}
}
}