Skip to main content
Glama
cuongdev

AWS CodePipeline MCP Server

by cuongdev

trigger_pipeline

Start a pipeline execution in AWS CodePipeline to automate software release processes and deployments.

Instructions

Trigger a pipeline execution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pipelineNameYesName of the pipeline

Implementation Reference

  • The main handler function that implements the trigger_pipeline MCP tool logic, triggering AWS CodePipeline execution and returning the execution ID.
    export async function triggerPipeline(
      codePipelineManager: CodePipelineManager, 
      input: {
        pipelineName: string;
      }
    ) {
      const { pipelineName } = input;
      const codepipeline = codePipelineManager.getCodePipeline();
      
      const response = await codepipeline.startPipelineExecution({
        name: pipelineName
      }).promise();
      
      const executionId = response.pipelineExecutionId || '';
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({ 
              message: "Pipeline triggered successfully", 
              executionId 
            }, null, 2),
          },
        ],
      };
    }
  • Defines the input schema and metadata for the trigger_pipeline MCP tool.
    export const triggerPipelineSchema = {
      name: "trigger_pipeline",
      description: "Trigger a pipeline execution",
      inputSchema: {
        type: "object",
        properties: {
          pipelineName: { 
            type: "string",
            description: "Name of the pipeline"
          }
        },
        required: ["pipelineName"],
      },
    } as const;
  • src/index.ts:167-171 (registration)
    Registers the trigger_pipeline tool in the MCP server's CallToolRequestHandler by dispatching to the triggerPipeline handler function.
    case "trigger_pipeline": {
      return await triggerPipeline(codePipelineManager, input as {
        pipelineName: string;
      });
    }
  • src/index.ts:118-118 (registration)
    Includes the triggerPipelineSchema in the list of available tools returned by ListToolsRequestHandler.
    triggerPipelineSchema,
  • src/index.ts:35-37 (registration)
    Imports the triggerPipeline handler and triggerPipelineSchema from the tool module.
      triggerPipeline, 
      triggerPipelineSchema 
    } from "./tools/trigger_pipeline.js";

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/cuongdev/mcp-codepipeline-server'

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