Skip to main content
Glama

AWS CodePipeline MCP Server

by cuongdev

AWS CodePipeline MCP 服务器

这是一个与 AWS CodePipeline 集成的模型上下文协议 (MCP) 服务器,允许您通过 Windsurf 和 Cascade 管理管道。该服务器提供了与 AWS CodePipeline 服务交互的标准化接口。

作者: Cuong T Nguyen

特征

  • 列出所有管道

  • 获取管道状态和详细的管道定义

  • 列出管道执行

  • 批准或拒绝手动批准操作

  • 重试失败的阶段

  • 触发管道执行

  • 查看管道执行日志

  • 停止管道执行

  • 标记管道资源

  • 创建用于自动管道触发的 Webhook

  • 获取管道性能指标

先决条件

  • Node.js(v14 或更高版本)

  • 具有 CodePipeline 访问权限的 AWS 账户

  • 具有 CodePipeline、CloudWatch 和 IAM(用于标记)权限的 AWS 凭证

  • 带有 Cascade AI 助手的 Windsurf IDE

安装

  1. 克隆此存储库:

git clone https://github.com/cuongdev/mcp-codepipeline-server.git cd mcp-codepipeline-server
  1. 安装依赖项:

npm install
  1. 根据.env.example模板创建.env文件:

cp .env.example .env
  1. 使用您的 AWS 凭证和配置更新.env文件:

AWS_REGION=us-east-1 AWS_ACCESS_KEY_ID=your_access_key_id AWS_SECRET_ACCESS_KEY=your_secret_access_key PORT=3000

注意:为了安全起见,切勿将您的.env文件提交到版本控制。

用法

构建项目

npm run build

启动服务器

npm start

对于自动重启的开发:

npm run dev

与 Windsurf 集成

该 MCP 服务器旨在与 Windsurf 配合使用,允许 Cascade 通过自然语言请求与 AWS CodePipeline 进行交互。

设置步骤

  1. 确保服务器正在运行:

npm start
  1. 将服务器配置添加到 Windsurf MCP 配置文件~/.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. 如果目录不存在则创建该目录:

mkdir -p ~/.codeium/windsurf touch ~/.codeium/windsurf/mcp_config.json
  1. 重新启动 Windsurf 以加载新的 MCP 服务器配置

与 Cascade 一起使用

配置完成后,您可以在 Windsurf 中使用自然语言与 AWS CodePipeline 进行交互。例如:

  • “列出我的所有 CodePipeline 管道”

  • “显示我的‘生产部署’管道的当前状态”

  • “触发‘测试构建’管道”

  • “获取我的‘数据处理’管道的指标”

  • “为我的‘前端部署’管道创建一个 webhook”

Cascade 会将这些请求转换为适当的 MCP 工具调用。

MCP 工具

核心管道管理

工具名称

描述

参数

list_pipelines

列出所有 CodePipeline 管道

没有任何

get_pipeline_state

获取特定管道的状态

pipelineName

:管道的名称

list_pipeline_executions

列出特定管道的执行

pipelineName

:管道的名称

trigger_pipeline

触发管道执行

pipelineName

:管道的名称

stop_pipeline_execution

停止管道执行

pipelineName

:管道的名称

executionId

:执行 ID

reason

:可选的停止原因

管道详细信息和指标

工具名称

描述

参数

get_pipeline_details

获取管道的完整定义

pipelineName

:管道的名称

get_pipeline_execution_logs

获取管道执行的日志

pipelineName

:管道的名称

executionId

:执行 ID

get_pipeline_metrics

获取管道的性能指标

pipelineName

:管道名称

period

:可选指标周期(以秒为单位)

startTime

:可选指标开始时间

endTime

:可选指标结束时间

管道操作和集成

工具名称

描述

参数

approve_action

批准或拒绝手动批准操作

pipelineName

:管道的名称

stageName

:阶段的名称

actionName

:操作的名称

token

:批准令牌

approved

:表示批准或拒绝的布尔值

comments

:可选注释

retry_stage

重试失败的阶段

pipelineName

:管道的名称

stageName

:阶段的名称

pipelineExecutionId

:执行 ID

tag_pipeline_resource

添加或更新管道资源的标签

pipelineName

:管道的名称

tags

:用于标记的键值对数组

create_pipeline_webhook

为管道创建 webhook

pipelineName

:管道的名称

webhookName

:webhook 的名称

targetAction

:webhook 的目标操作

authentication

:身份验证类型

authenticationConfiguration

:可选的身份验证配置

filters

:可选的事件过滤器

故障排除

常见问题

  1. 连接被拒绝错误

    • 确保服务器在指定端口上运行

    • 检查端口是否被防火墙阻止

  2. AWS 凭证错误

    • .env文件中验证您的 AWS 凭证

    • 确保您的 IAM 用户具有必要的权限

  3. Windsurf 未检测到 MCP 服务器

    • 检查mcp_config.json文件格式

    • 确保服务器 URL 正确

    • 更改后重新启动 Windsurf

日志

服务器将信息记录到控制台。检查以下日志以进行故障排除:

# Run with more verbose logging DEBUG=* npm start

示例

为 GitHub 集成创建 Webhook

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

获取管道指标

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

执照

国际学习中心

Deploy Server
A
security – no known vulnerabilities
-
license - not tested
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

与 AWS CodePipeline 集成的模型上下文协议服务器,允许用户使用自然语言命令通过 Windsurf 和 Cascade 管理管道。

  1. 特征
    1. 先决条件
      1. 安装
        1. 用法
          1. 构建项目
          2. 启动服务器
        2. 与 Windsurf 集成
          1. 设置步骤
          2. 与 Cascade 一起使用
        3. MCP 工具
          1. 核心管道管理
          2. 管道详细信息和指标
          3. 管道操作和集成
        4. 故障排除
          1. 常见问题
          2. 日志
        5. 示例
          1. 为 GitHub 集成创建 Webhook
          2. 获取管道指标
        6. 执照

          Related MCP Servers

          • A
            security
            -
            license
            A
            quality
            A Model Context Protocol server that provides tools for code modification and generation via Large Language Models, allowing users to create, modify, rewrite, and delete files using structured XML instructions.
            Last updated -
            12
            2
            MIT License
            • Linux
            • Apple
          • A
            security
            -
            license
            A
            quality
            A Model Context Protocol server that helps large language models process code repositories by providing file tree generation, code merging, and code analysis capabilities.
            Last updated -
            3
            22
            MIT License
          • A
            security
            -
            license
            A
            quality
            A Model Context Protocol server for managing cloud servers, particularly DigitalOcean droplets, allowing users to identify providers via IP addresses and perform operations like power management, status monitoring, and resource usage tracking.
            Last updated -
            30
            1
          • -
            security
            -
            license
            -
            quality
            A comprehensive Model Context Protocol server that provides over 50 file and system management tools for AI models, including navigation, file operations, search, compression, and system information capabilities.
            Last updated -

          View all related MCP servers

          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