Navigation
AWS CodePipeline MCP Server: Streamlined DevOps, Unified Pipelines - MCP Implementation

AWS CodePipeline MCP Server: Streamlined DevOps, Unified Pipelines

AWS CodePipeline MCP Server streamlines DevOps workflows by standardizing interactions with Windsurf and Cascade, enabling seamless pipeline management through a unified interface.

Developer Tools
4.7(111 reviews)
166 saves
77 comments

Ranked in the top 6% of all AI tools in its category

About AWS CodePipeline MCP Server

What is AWS CodePipeline MCP Server: Streamlined DevOps, Unified Pipelines?

AWS CodePipeline MCP Server serves as a standardized integration layer between AWS CodePipeline and development tools like Windsurf and Cascade. It provides a unified interface to manage CI/CD pipelines programmatically, enabling streamlined DevOps workflows through centralized control of pipeline states, executions, and resources. By abstracting AWS service interactions, this server empowers teams to automate deployment pipelines while maintaining granular operational oversight.

How to Use AWS CodePipeline MCP Server: Streamlined DevOps, Unified Pipelines?

Implementation follows three core stages: configure AWS credentials and environment variables, deploy the server instance, and integrate with Windsurf/Cascade. Developers execute pipelines via natural language commands like "Trigger production-deploy" while administrators use API endpoints to manage approvals or analyze performance metrics. The server requires Node.js runtime and proper IAM permissions to interact with CodePipeline, CloudWatch, and IAM resources.

AWS CodePipeline MCP Server Features

Key Features of AWS CodePipeline MCP Server: Streamlined DevOps, Unified Pipelines?

  • Centralized Pipeline Control: Full lifecycle management including creation, execution monitoring, and termination
  • State-aware Operations: Retrieve real-time pipeline statuses, stage failure details, and execution logs
  • Approval Automation: Programmatic handling of manual approvals/rejections with optional comments
  • Performance Analytics: Access execution metrics like duration, success rates, and resource utilization
  • Integration Capabilities: Webhook creation for CI triggers and tag-based resource categorization

Use Cases of AWS CodePipeline MCP Server: Streamlined DevOps, Unified Pipelines?

Primary applications include:

  • Automating cross-environment deployments through standardized pipeline triggers
  • Centralized troubleshooting via execution logs and stage-level retries
  • Compliance management using tagged resources and audit-trail approvals
  • CI/CD integration with external systems via custom webhooks (e.g., GitHub, Bitbucket)
  • Optimizing deployment workflows using historical performance metrics

AWS CodePipeline MCP Server FAQ

FAQ from AWS CodePipeline MCP Server: Streamlined DevOps, Unified Pipelines?

  • Why do I get "command not found" when starting the server? Verify Node.js v14+ installation and npm dependencies
  • How to resolve AWS authentication failures? Check IAM policies for required CodePipeline actions and ensure credentials are correctly configured in .env
  • Can I customize webhook authentication? Yes, configure GITHUB_HMAC or OIDC authentication via the create_pipeline_webhook tool
  • What logging mechanisms are available? Debug mode outputs verbose logs via DEBUG=* npm start
  • How often should metrics be refreshed? Metrics can be queried on-demand with optional time-range parameters

Content

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

Prerequisites

  • Node.js (v14 or later)
  • AWS account with CodePipeline access
  • AWS credentials with permissions for CodePipeline, CloudWatch, and IAM (for tagging)
  • Windsurf IDE with Cascade AI assistant

Installation

  1. Clone this repository:
git clone https://github.com/cuongdev/mcp-codepipeline-server.git
cd mcp-codepipeline-server
  1. Install dependencies:
npm install
  1. Create a .env file based on the .env.example template:
cp .env.example .env
  1. Update the .env file with your AWS credentials and configuration:
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_access_key_id
AWS_SECRET_ACCESS_KEY=your_secret_access_key
PORT=3000

Note : For security, never commit your .env file to version control.

Usage

Build the project

npm run build

Start the server

npm start

For development with auto-restart:

npm run dev

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_ACCESS_KEY_ID": "your_access_key_id",
        "AWS_SECRET_ACCESS_KEY": "your_secret_access_key"
      }
    }
  }
}
  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 Name Description Parameters
list_pipelines List all CodePipeline pipelines None
get_pipeline_state Get the state of a specific pipeline pipelineName: Name of the pipeline
list_pipeline_executions List executions for a specific pipeline pipelineName: Name of the pipeline
trigger_pipeline Trigger a pipeline execution pipelineName: Name of the pipeline
stop_pipeline_execution Stop a pipeline execution pipelineName: Name of the pipeline
executionId: Execution ID
reason: Optional reason for stopping

Pipeline Details and Metrics

Tool Name Description Parameters
get_pipeline_details Get the full definition of a pipeline pipelineName: Name of the pipeline
get_pipeline_execution_logs Get logs for a pipeline execution pipelineName: Name of the pipeline
executionId: Execution ID
get_pipeline_metrics Get performance metrics for a pipeline pipelineName: 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 Name Description Parameters
approve_action Approve or reject a manual approval action pipelineName: 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_stage Retry a failed stage pipelineName: Name of the pipeline
stageName: Name of the stage
pipelineExecutionId: Execution ID
tag_pipeline_resource Add or update tags for a pipeline resource pipelineName: Name of the pipeline
tags: Array of key-value pairs for tagging
create_pipeline_webhook Create a webhook for a pipeline pipelineName: 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

Troubleshooting

Common Issues

  1. Connection refused error :
* Ensure the server is running on the specified port
* Check if the port is blocked by a firewall
  1. AWS credential errors :
* Verify your AWS credentials in the `.env` file
* Ensure your IAM user has the necessary permissions
  1. Windsurf not detecting the MCP server :
* Check the `mcp_config.json` file format
* Ensure the server URL is correct
* Restart Windsurf after making changes

Logs

The server logs information to the console. Check these logs for troubleshooting:

# Run with more verbose logging
DEBUG=* npm start

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"
}

License

ISC

Related MCP Servers & Clients