Skip to content

Trigger Deployments

Run pipelines, trigger manual jobs, and manage deployments with GitLab MCP.

Run a New Pipeline

"Trigger a pipeline on main in my-org/api"

"Run a pipeline on release/v2.0 with deploy variables"

json
{
  "action": "create",
  "project_id": "my-org/api",
  "ref": "main"
}
json
{
  "action": "create",
  "project_id": "my-org/api",
  "ref": "main",
  "variables": [
    { "key": "DEPLOY_ENV", "value": "staging" },
    { "key": "SKIP_TESTS", "value": "false" }
  ]
}

Trigger Manual Deploy Jobs

"Play the deploy-to-staging job in pipeline #1234"

"Run the manual production deploy job"

json
{
  "action": "play",
  "project_id": "my-org/api",
  "job_id": "5678"
}
json
{
  "action": "play",
  "project_id": "my-org/api",
  "job_id": "5678",
  "job_variables_attributes": [
    { "key": "DEPLOY_TARGET", "value": "production" }
  ]
}

Monitor Deploy Progress

"Check the status of the deploy job #5678"

"Show me the deploy job logs"

json
{
  "action": "job",
  "project_id": "my-org/api",
  "job_id": "5678"
}
json
{
  "action": "logs",
  "project_id": "my-org/api",
  "job_id": "5678",
  "start": -50,
  "limit": 50
}

Cancel a Deploy

"Cancel the running deploy job — something went wrong"

"Stop pipeline #1234 immediately"

json
{
  "action": "cancel",
  "project_id": "my-org/api",
  "job_id": "5678"
}
json
{
  "action": "cancel",
  "project_id": "my-org/api",
  "pipeline_id": "1234"
}

Deployment Workflow

A typical deployment sequence:

  1. "Run a pipeline on main in my-org/api"

  2. "Check if all test and build jobs passed in the new pipeline"

  3. "Play the deploy-to-staging job"

  4. "Show me the staging deploy logs"

  5. "Play the deploy-to-production job"

Manage CI/CD Variables

"List CI/CD variables for my-org/api"

"What's the value of the DEPLOY_URL variable?"

json
{
  "action": "list",
  "namespace": "my-org/api",
  "per_page": 50
}
json
{
  "action": "get",
  "namespace": "my-org/api",
  "key": "DEPLOY_URL"
}

Next Steps

Released under the Apache 2.0 License.