Labsco
cuongdev logo

AWS CodePipeline MCP Server

โ˜… 5

from cuongdev

Integrates with AWS CodePipeline to manage continuous integration and delivery pipelines.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

AWS CodePipeline MCP Server

This is a Model Context Protocol (MCP) server that integrates with AWS CodePipeline, allowing you to manage your pipelines through Windsurf and Cascade. The server provides a standardized interface for interacting with AWS CodePipeline services.

Author: Cuong T Nguyen

Features

  • List all pipelines
  • Get pipeline state and detailed pipeline definitions
  • List pipeline executions
  • Approve or reject manual approval actions
  • Retry failed stages
  • Trigger pipeline executions
  • View pipeline execution logs
  • Stop pipeline executions
  • Tag pipeline resources
  • Create webhooks for automatic pipeline triggering
  • Get pipeline performance metrics

Integration with Windsurf

This MCP server is designed to work with Windsurf, allowing Cascade to interact with AWS CodePipeline through natural language requests.

Setup Steps

  1. Make sure the server is running:
npm start
  1. Add the server configuration to your Windsurf MCP config file at ~/.codeium/windsurf/mcp_config.json:
{
   "mcpServers": {
    "codepipeline": {
      "command": "npx",
      "args": [
        "-y",
        "path/to/mcp-codepipeline-server/dist/index.js"
      ],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_PROFILE": "your-aws-profile"
      }
    }
  }
}
  1. Create the directory if it doesn't exist:
mkdir -p ~/.codeium/windsurf
touch ~/.codeium/windsurf/mcp_config.json
  1. Restart Windsurf to load the new MCP server configuration

Using with Cascade

Once configured, you can interact with AWS CodePipeline using natural language in Windsurf. For example:

  • "List all my CodePipeline pipelines"
  • "Show me the current state of my 'production-deploy' pipeline"
  • "Trigger the 'test-build' pipeline"
  • "Get metrics for my 'data-processing' pipeline"
  • "Create a webhook for my 'frontend-deploy' pipeline"

Cascade will translate these requests into the appropriate MCP tool calls.

MCP Tools

Core Pipeline Management

Tool NameDescriptionParameters
list_pipelinesList all CodePipeline pipelinesNone
get_pipeline_stateGet the state of a specific pipelinepipelineName: Name of the pipeline
list_pipeline_executionsList executions for a specific pipelinepipelineName: Name of the pipeline
trigger_pipelineTrigger a pipeline executionpipelineName: Name of the pipeline
stop_pipeline_executionStop a pipeline executionpipelineName: Name of the pipeline
executionId: Execution ID
reason: Optional reason for stopping

Pipeline Details and Metrics

Tool NameDescriptionParameters
get_pipeline_detailsGet the full definition of a pipelinepipelineName: Name of the pipeline
get_pipeline_execution_logsGet logs for a pipeline executionpipelineName: Name of the pipeline
executionId: Execution ID
get_pipeline_metricsGet performance metrics for a pipelinepipelineName: Name of the pipeline
period: Optional metric period in seconds
startTime: Optional start time for metrics
endTime: Optional end time for metrics

Pipeline Actions and Integrations

Tool NameDescriptionParameters
approve_actionApprove or reject a manual approval actionpipelineName: Name of the pipeline
stageName: Name of the stage
actionName: Name of the action
token: Approval token
approved: Boolean indicating approval or rejection
comments: Optional comments
retry_stageRetry a failed stagepipelineName: Name of the pipeline
stageName: Name of the stage
pipelineExecutionId: Execution ID
tag_pipeline_resourceAdd or update tags for a pipeline resourcepipelineName: Name of the pipeline
tags: Array of key-value pairs for tagging
create_pipeline_webhookCreate a webhook for a pipelinepipelineName: Name of the pipeline
webhookName: Name for the webhook
targetAction: Target action for the webhook
authentication: Authentication type
authenticationConfiguration: Optional auth config
filters: Optional event filters

Examples

Creating a Webhook for GitHub Integration

{
  "pipelineName": "my-pipeline",
  "webhookName": "github-webhook",
  "targetAction": "Source",
  "authentication": "GITHUB_HMAC",
  "authenticationConfiguration": {
    "SecretToken": "my-secret-token"
  },
  "filters": [
    {
      "jsonPath": "$.ref",
      "matchEquals": "refs/heads/main"
    }
  ]
}

Getting Pipeline Metrics

{
  "pipelineName": "my-pipeline",
  "period": 86400,
  "startTime": "2025-03-10T00:00:00Z",
  "endTime": "2025-03-17T23:59:59Z"
}