Jenkins MCP
MCP server that connects AI agents to Jenkins, supporting stdio and HTTP transports with tools for jobs, builds, logs, and queue management.
README
Jenkins MCP Server
TypeScript MCP server that connects AI agents to Jenkins. Supports stdio and Streamable HTTP transports, plus a local web UI to test credential authentication/authorization and copy agent configuration snippets.
Developed by oshaani.com · © oshaani.com. All rights reserved.
Features
- MCP tools for jobs, builds, logs, queue, nodes, identity, and auth checks
- stdio mode for Cursor, Claude Desktop, VS Code
- HTTP mode with Streamable MCP endpoint at
/mcp - Web UI to test Jenkins username/API token auth and permission probes
- Ready-made config snippets for AI agents
- Unit tests with Vitest
Quick start
npm install
npm run build
cp .env.example .env # then edit credentials
Local Jenkins in Docker (recommended for testing)
docker compose up -d
# Wait until healthy, then copy the generated API token into .env:
docker exec jenkins-mcp-test cat /var/jenkins_home/mcp-api-token.txt
Default test login:
| Field | Value |
|---|---|
| URL | http://127.0.0.1:8080 |
| Username | admin |
| Password | admin123 |
| Sample job | hello-mcp |
Put the token from mcp-api-token.txt into .env as JENKINS_API_TOKEN, then:
npm run start:http
Open http://127.0.0.1:3100 and run Test authentication.
Stop Jenkins later with docker compose down (add -v to wipe data).
HTTP + UI
npm run start:http
Open http://127.0.0.1:3100 to:
- Test authentication and authorization against your Jenkins
- Copy MCP config for Cursor / Claude Desktop / VS Code
Stdio (AI agents)
npm run start:stdio
Environment
| Variable | Description |
|---|---|
JENKINS_URL |
Jenkins base URL |
JENKINS_USERNAME |
Jenkins username |
JENKINS_API_TOKEN |
Jenkins API token |
PORT / MCP_HTTP_PORT |
HTTP port (default 3100) |
MCP_HTTP_HOST |
Bind host (default 127.0.0.1) |
JENKINS_READ_ONLY |
true disables jenkins_trigger_build |
Cursor MCP config (stdio)
{
"mcpServers": {
"jenkins": {
"command": "node",
"args": ["/absolute/path/to/Jenkins MCP/dist/index.js", "stdio"],
"env": {
"JENKINS_URL": "https://jenkins.example.com",
"JENKINS_USERNAME": "your-user",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}
Cursor MCP config (HTTP + headers)
Pass Jenkins credentials from the agent on every request:
{
"mcpServers": {
"jenkins": {
"url": "http://127.0.0.1:3100/mcp",
"headers": {
"X-Jenkins-Url": "http://127.0.0.1:8080",
"X-Jenkins-Username": "admin",
"X-Jenkins-Api-Token": "your-api-token"
}
}
}
}
Header values override server .env for that MCP session. You can also use Authorization: Basic base64(username:apiToken) plus X-Jenkins-Url.
Cursor MCP config (HTTP + server env)
{
"mcpServers": {
"jenkins": {
"url": "http://127.0.0.1:3100/mcp"
}
}
}
MCP tools
| Tool | Description |
|---|---|
jenkins_whoami |
Authenticated user identity |
jenkins_test_auth |
Auth + authorization permission probes |
jenkins_list_jobs |
List visible jobs |
jenkins_get_job |
Job details |
jenkins_get_build |
Build details |
jenkins_get_build_log |
Progressive console log |
jenkins_get_queue |
Build queue |
jenkins_get_nodes |
Agents/nodes |
jenkins_trigger_build |
Trigger build (disabled in read-only mode) |
Development
npm test
npm run typecheck
npm run dev
License
MIT
Copyright © oshaani.com. Developed by oshaani.com. All rights reserved.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.