Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JENKINS_TOKENNoJenkins authentication token
SHLAB_JENKINS_TOKENNoSHLAB Jenkins token
JENKINS_MCP_LOG_LEVELNoLog level for debugging (e.g., DEBUG)
PROD_BLSM_JENKINS_TOKENNoProduction Jenkins token
JENKINS_MCP_SCENARIOS_FILENoPath to custom scenarios file

Tools

Functions exposed to the LLM to take actions

NameDescription
get_server_names

Get the list of all available Jenkins server names.

Returns: List of server names
get_scenario_list

Get all available application scenarios - the preferred entry point for deployment tasks.

Important: For any deployment-related task, this function should be called first instead of directly using search_jobs. This function returns a pre-configured scenario list, each containing the correct server and job path configuration. Returns: List of scenarios, each containing: - index: Scenario index (string) - name: Scenario name - description: Scenario description - server: Jenkins server name - job_path: Job path Workflow: 1. Call this function to get the scenario list 2. Let the user select a scenario 3. Use search_jobs_by_scenario(scenario) to get the specific job 4. Use trigger_build() to execute deployment
search_jobs_by_scenario

Get the specified Jenkins job directly by scenario.

Args: scenario: Scenario name or index Returns: List of job info matching the scenario
search_jobs

Search Jenkins jobs on the specified server.

Note: For deployment tasks, it is recommended to use get_scenario_list() and search_jobs_by_scenario(). Args: server_name: Jenkins server name keyword: Search keyword Returns: List of matching jobs
get_job_parameters

Get the parameter definitions of a Jenkins job.

Args: server_name: Jenkins server name job_full_name: Full job name Returns: List of parameter definitions, including parameter name, type, default value, and options (if choice parameter)
trigger_build

Trigger Jenkins job build.

Automatically determines parameter requirements and waits to obtain build_number. Args: server_name: Jenkins server name job_full_name: Full job name params: Optional parameter dict ctx: MCP context (for logging) Returns: Dict containing build_number or queue_id Raises: JenkinsParameterError: Missing required parameters JenkinsError: Trigger failed
get_build_status

Get the Jenkins build status for the specified build_number.

Args: server_name: Jenkins server name job_full_name: Full job name build_number: Build number Returns: Build status info
stop_build

Stop Jenkins build.

Intelligently handles permission errors and will automatically check build status to confirm if it has already been terminated. Args: server_name: Jenkins server name job_full_name: Full job name build_number: Build number ctx: MCP context (for logging) Returns: Stop result
get_build_log

Get Jenkins build log.

Args: server_name: Jenkins server name job_full_name: Full job name build_number: Build number Returns: Build log text
validate_jenkins_config

Validate the integrity of Jenkins configuration.

Returns: Validation result, including error list and status
create_or_update_job_from_jenkinsfile

Create or update a Jenkins job based on a Jenkinsfile.

Args: server_name: Jenkins server name job_name: Name for the job (create if not exists, update if exists) jenkinsfile_content: Content of the Jenkinsfile (pipeline script) description: Optional job description ctx: MCP context (for logging) Returns: Dict containing job creation/update result with status and job_url Raises: JenkinsError: Job creation/update failed

Prompts

Interactive templates invoked by user choice

NameDescription
scenario_selection_promptGenerate a prompt for scenario selection to help the user choose the appropriate application scenario.
scenario_guidance_promptGenerate a guidance prompt based on the user's selected scenario.
get_scenario_configGet the complete configuration information for the specified scenario.
job_description_promptGenerate a brief description prompt for a Jenkins job.
build_result_summary_promptGenerate a Jenkins build result interpretation prompt.
build_log_analysis_promptGenerate a Jenkins build log analysis prompt.
trigger_job_promptGenerate a prompt for triggering a job.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/xhuaustc/jenkins-mcp'

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