This guide shows you exactly what to ask Claude Desktop to interact with your Jenkins server.
Before asking questions, tell Claude your Jenkins URL:
My Jenkins server is at http://172.26.128.1:8080
Or include it in each question:
[Your question] at Jenkins http://172.26.128.1:8080
Command:
Diagnose the failure in [job-name] build #[number] at http://172.26.128.1:8080
Examples:
Diagnose the failure in Java_System_Info build #1 at http://172.26.128.1:8080
Why did Windows_Health_Check build #2 fail at http://172.26.128.1:8080?
Analyze the failed build Windows_Health_Check #2 at http://172.26.128.1:8080
What it does:
- ✅ Downloads and analyzes console logs
- ✅ Identifies error patterns (compilation errors, timeouts, permissions, etc.)
- ✅ Provides AI-powered recommendations
- ✅ Categorizes failure types
- ✅ Indexes logs for semantic search
Response includes:
- Build status and result
- Error category (e.g., "Artifact Collection", "Compilation Error")
- Key error messages
- Recommended fixes
- Log cache location
Command:
Trigger a build of [job-name] at http://172.26.128.1:8080
Examples:
Run a new build of Java_System_Info at http://172.26.128.1:8080
Start Windows_Health_Check job at http://172.26.128.1:8080
Trigger Java_System_Info with parameters at http://172.26.128.1:8080
With parameters:
Trigger Java_System_Info at http://172.26.128.1:8080 with parameters:
- BRANCH: develop
- ENVIRONMENT: staging
What it does:
- ✅ Starts a Jenkins build
- ✅ Waits for completion (default: 10 minutes timeout)
- ✅ Returns build number and status
- ✅ Shows build URL
Response includes:
- Build number
- Queue ID
- Build URL
- Final status (SUCCESS, FAILURE, ABORTED)
Command:
Start [job-name] asynchronously at http://172.26.128.1:8080
Examples:
Trigger Java_System_Info async at http://172.26.128.1:8080
Start Windows_Health_Check without waiting at http://172.26.128.1:8080
What it does:
- ✅ Starts build and returns immediately
- ✅ Doesn't wait for completion
- ✅ Useful for long-running jobs
Command:
Search for [error-pattern] in [job-name] build #[number] at http://172.26.128.1:8080
Examples:
Find all errors in Java_System_Info build #1 at http://172.26.128.1:8080
Search for "timeout" in Windows_Health_Check build #2 at http://172.26.128.1:8080
Find compilation errors in Java_System_Info build #1 at http://172.26.128.1:8080
Search for "OutOfMemory" in Windows_Health_Check #2 at http://172.26.128.1:8080
What it does:
- ✅ Uses smart grep with relevance scoring
- ✅ Shows context around matches
- ✅ Deduplicates similar errors
- ✅ Scores results by importance
Presets available:
preset:critical- High-priority errors onlypreset:all- Broad search
Command:
Semantically search for "[description]" in [job-name] build #[number] at http://172.26.128.1:8080
Examples:
Find stack traces in Java_System_Info build #1 at http://172.26.128.1:8080
Search for database connection issues in Windows_Health_Check #2 at http://172.26.128.1:8080
Find deployment failures in Java_System_Info build #1 at http://172.26.128.1:8080
What it does:
- ✅ Uses AI embeddings to understand context
- ✅ Finds semantically similar content
- ✅ Better than keyword search for complex queries
- ✅ Powered by Qdrant vector database
Command:
Navigate to [section] in [job-name] build #[number] at http://172.26.128.1:8080
Examples:
Show me the deployment section in Java_System_Info #1 at http://172.26.128.1:8080
Jump to "Building module" in Windows_Health_Check #2 at http://172.26.128.1:8080
Navigate to "Stage: Deploy" in Java_System_Info #1 at http://172.26.128.1:8080
What it does:
- ✅ Jumps to specific log sections
- ✅ Shows context around the match
- ✅ Can find Nth occurrence
Command:
Show lines [start]-[end] from [job-name] build #[number] at http://172.26.128.1:8080
Examples:
Show lines 100-200 from Java_System_Info build #1 at http://172.26.128.1:8080
Get the first 50 lines of Windows_Health_Check #2 at http://172.26.128.1:8080
Show the last 100 lines of Java_System_Info #1 at http://172.26.128.1:8080
What it does:
- ✅ Reads specific line ranges
- ✅ Fetches logs if not cached
- ✅ Useful for detailed inspection
Command:
Analyze [pipeline-job] build #[number] with sub-builds at http://172.26.128.1:8080
Examples:
Show sub-builds for Java_System_Info #1 at http://172.26.128.1:8080
Analyze the pipeline Windows_Health_Check #2 with all sub-builds at http://172.26.128.1:8080
What it does:
- ✅ Discovers all triggered sub-builds
- ✅ Shows nested build tree
- ✅ Fetches logs for all sub-builds
- ✅ Provides complete pipeline view
Command:
What are the parameters for [job-name] at http://172.26.128.1:8080?
Examples:
Show me the parameters for Java_System_Info at http://172.26.128.1:8080
List build parameters for Windows_Health_Check at http://172.26.128.1:8080
What it does:
- ✅ Lists all job parameters
- ✅ Shows parameter types
- ✅ Shows default values
- ✅ Shows descriptions
Command:
Use ripgrep to search for [pattern] in [job-name] build #[number] at http://172.26.128.1:8080
Examples:
Ripgrep search for "ERROR" in Java_System_Info #1 at http://172.26.128.1:8080
Search case-sensitive for "FATAL" in Windows_Health_Check #2 at http://172.26.128.1:8080
What it does:
- ✅ Fast regex pattern matching
- ✅ Shows before/after context
- ✅ Supports case-sensitive search
- ✅ Can invert matches
You can ask Claude to do multiple things:
Diagnose Java_System_Info build #1, then search for compilation errors,
and show me the deployment section at http://172.26.128.1:8080
What should I do about the failures in Windows_Health_Check #2
at http://172.26.128.1:8080?
Compare Java_System_Info build #1 and #2 at http://172.26.128.1:8080
After diagnosing a build:
Show me more details about that compilation error
Can you search for similar errors?
What are the next steps to fix this?
{
"build_info": {
"job_name": "Java_System_Info",
"build_number": 1,
"result": "FAILURE",
"duration": "45 seconds"
},
"error_category": "Compilation Error",
"key_errors": ["error: cannot find symbol: variable xyz"],
"recommendations": [
"Check if variable 'xyz' is declared",
"Verify imports are correct"
],
"log_location": "/tmp/mcp-jenkins/instance-xxx/Java_System_Info/1/console.log"
}Found 3 matches:
[Line 145] ERROR: Connection timeout
Context: Attempting to connect to database...
[Line 289] ERROR: Failed to deploy artifact
Context: Uploading to repository...
[Line 534] ERROR: Build failed with exit code 1
Context: Compilation finished with errors
Based on your current setup:
| Job Name | Description |
|---|---|
| Java_System_Info | Java system information collection |
| Windows_Health_Check | Windows health monitoring |
-
Check MCP server status:
- Look for green indicator next to "jenkins" in Claude Desktop
- Click the MCP icon to see connected servers
-
Always include Jenkins URL:
at http://172.26.128.1:8080 -
Be specific about job name and build number:
❌ "check my build" ✅ "diagnose Java_System_Info build #1 at http://172.26.128.1:8080" -
Restart Claude Desktop if needed:
- Close completely (system tray → Quit)
- Reopen Claude Desktop
-
Check Docker containers are running:
docker ps
Should show:
jenkins_mcp_enterprise-serverjenkins_mcp_enterprise-qdrant
You: My Jenkins is at http://172.26.128.1:8080
Claude: Got it! Your Jenkins server is noted. How can I help you today?
You: Diagnose the failure in Java_System_Info build #1
Claude: [Uses diagnose_build_failure tool]
I've analyzed Java_System_Info build #1. The build failed due to:
Error Category: Compilation Error
Key Issues:
- Line 145: error: cannot find symbol: variable DATABASE_URL
- Missing environment variable configuration
Recommendations:
- Add DATABASE_URL to job parameters
- Check Jenkins credentials configuration
- Verify environment setup script
Would you like me to search for similar errors in other builds?
You: Yes, search for "DATABASE_URL" errors
Claude: [Uses ripgrep_search tool]
Found 2 occurrences of "DATABASE_URL":
[Build #1, Line 145] error: cannot find symbol: variable DATABASE_URL [Build #1, Line 287] Caused by: java.lang.NullPointerException: DATABASE_URL is null
If you're new to this, start with these simple commands:
- First: Tell Claude your Jenkins URL
- Second: Ask it to diagnose a failed build
- Third: Ask follow-up questions about the errors
- Fourth: Try triggering a new build
- Fifth: Explore semantic search and navigation
- Setup Guide:
GETTING-STARTED.md - Diagnostic Config:
config/README-diagnostic-config.md - URLs & Access:
MONITORING-AND-ACCESS.md - Docker Setup:
README-Docker.md
Happy Debugging! 🎉
Your AI-powered Jenkins assistant is ready to help!