CodePipeline MCP server

Enables AI assistants to manage and monitor AWS CodePipeline services through natural language commands, providing tools for pipeline execution, action approval, and metrics retrieval.
Back to servers
Provider
Cuong T Nguyen
Release date
Mar 17, 2025
Language
TypeScript
Stats
4 stars

The AWS CodePipeline MCP server provides a standardized interface that integrates with AWS CodePipeline, allowing you to manage your pipelines through Windsurf and Cascade. It enables you to perform various pipeline operations using natural language requests in the Windsurf IDE.

Prerequisites

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

Installation

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

Running the Server

Build the project:

npm run build

Start the server:

npm start

For development with auto-restart:

npm run dev

Integration with Windsurf

Setup

  1. Ensure the server is running.

  2. Create or edit your Windsurf MCP config file:

mkdir -p ~/.codeium/windsurf
touch ~/.codeium/windsurf/mcp_config.json
  1. Add the server configuration to the config file:
{
   "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. Restart Windsurf to load the new configuration.

Usage with Cascade

Once configured, you can use natural language in Windsurf to interact with AWS CodePipeline. Examples:

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

Available Tools

Core Pipeline Management

Tool Name Description Parameters
list_pipelines List all pipelines None
get_pipeline_state Get pipeline state pipelineName: Pipeline name
list_pipeline_executions List pipeline executions pipelineName: Pipeline name
trigger_pipeline Trigger pipeline execution pipelineName: Pipeline name
stop_pipeline_execution Stop pipeline execution pipelineName, executionId, reason (optional)

Pipeline Details and Metrics

Tool Name Description Parameters
get_pipeline_details Get full pipeline definition pipelineName: Pipeline name
get_pipeline_execution_logs Get execution logs pipelineName, executionId
get_pipeline_metrics Get performance metrics pipelineName, period (optional), startTime (optional), endTime (optional)

Actions and Integrations

Tool Name Description Parameters
approve_action Approve/reject manual actions pipelineName, stageName, actionName, token, approved, comments (optional)
retry_stage Retry failed stage pipelineName, stageName, pipelineExecutionId
tag_pipeline_resource Add/update resource tags pipelineName, tags (key-value pairs)
create_pipeline_webhook Create pipeline webhook pipelineName, webhookName, targetAction, authentication, etc.

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
  2. AWS credential errors:

    • Verify your AWS credentials in the .env file
    • Ensure your IAM user has the necessary permissions
  3. Windsurf not detecting the MCP server:

    • Check the mcp_config.json file format
    • Ensure the server URL is correct
    • Restart Windsurf after making changes

For more verbose logging:

DEBUG=* npm start

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later