# Codefresh MCP for AI Agents MCP

> Connect Codefresh to your AI client to manage CI/CD and GitOps workflows. This MCP lets you list pipelines, trigger builds, monitor Kubernetes clusters, and audit environment secrets—all through natural conversation. You get full visibility into software deployment status without opening a dashboard.

## Overview
- **Category:** ship-it
- **Price:** Free
- **Tags:** kubernetes, continuous-delivery, pipeline-automation, gitops, container-orchestration, deployment-management

## Description

Codefresh gives your AI agent direct access to your entire continuous delivery infrastructure. Instead of jumping between dashboards or writing complex API calls, you just talk to your client. Your agent can list every pipeline in the account, check the status of recent builds, and even kick off new deployments for specific branches. It monitors all connected Kubernetes clusters so you know exactly where your code is running. The whole thing works naturally; whether you're checking a secret variable or verifying cluster connectivity, it handles it. Connecting this MCP to Vinkius means you get access right alongside hundreds of other tools, keeping your workflow consolidated and hands-free.

## Tools

### get_build_execution_details
Fetches the detailed status and full execution history for a single, specific build run.

### get_my_codefresh_profile
Retrieves core information about the authenticated user and the connected Codefresh account details.

### get_pipeline_configuration
Gets detailed settings and metadata for a single, specified CI/CD pipeline.

### list_codefresh_builds
Lists all recent build workflows that have run in the account history.

### list_delivery_clusters
Provides a list of every connected Kubernetes and delivery cluster monitored by Codefresh.

### list_shared_contexts
Lists all shared environment contexts, including sensitive secrets and variables used across pipelines.

### list_codefresh_pipelines
Retrieves a list of every defined CI/CD pipeline available in the account.

### trigger_codefresh_build
Starts and initiates a brand new build for a specified pipeline, allowing you to set branches or variables.

## Prompt Examples

**Prompt:** 
```
What's the status of the latest builds for my main application?
```

**Response:** 
```
**Recent Build Status**

*   `main-app-deploy`: **SUCCESS**. Deployed to `staging-us-east`. (ID: 605c...123)
*   `api-service-ci`: **FAILED**. Error on step 'Test Coverage'. Check logs for details.
*   `frontend-build`: **RUNNING**. Currently deploying to `staging-us-west`. 

You can ask me to get the detailed logs for the failed API build.
```

**Prompt:** 
```
List all available pipelines and tell me which one manages user auth.
```

**Response:** 
```
**Codefresh Pipelines Found**

1.  `main-app-deploy`: Core service deployment (Primary)
2.  `api-service-ci`: API logic build/test (Secondary)
3.  `user-auth-pipeline`: **Handles user authentication flow.**
4.  `frontend-build`: UI component builds.

The `user-auth-pipeline` seems like the right one for what you need.
```

**Prompt:** 
```
I need to run a new build on the payment service, using variables X and Y.
```

**Response:** 
```
Initiating build for 'payment-service'...

✅ **Build Started Successfully.**
*   **Pipeline:** `payment-service-ci`
*   **Branch:** `develop`
*   **Variables Set:** `X`, `Y`
*   **New Build ID:** 605d...456

I've started tracking it. I'll let you know if the status changes.
```

## Capabilities

### Check pipeline status
List all CI/CD pipelines in the account or retrieve detailed information for a specific one.

### Monitor recent builds
View execution details and overall status for multiple recent build workflows.

### Trigger new deployments
Start a fresh build run on any specified pipeline, including defining target branches or variables.

### Audit environments
List all shared contexts, secrets, and environment variables used across your workflows to verify security settings.

### Verify cluster connectivity
Get a list of all connected Kubernetes and delivery clusters so you know where deployments are targeting.

## Use Cases

### Need to check if the new API service deployment went out correctly?
Instead of opening the dashboard, ask your agent to use `list_delivery_clusters` to confirm the target cluster name. Then, use `get_build_execution_details` on the latest build ID to verify the successful rollout.

### The QA team needs a fresh test environment built.
Ask your agent to run `list_codefresh_pipelines` to find the 'qa-deployment' pipeline. Then, instruct it to use `trigger_codefresh_build`, specifying the 'develop' branch and setting necessary variables.

### A developer needs to check what secrets are available for a specific service.
The agent uses `list_shared_contexts` to display all relevant environment variables, allowing the developer to confirm credentials before starting local testing. This saves minutes of manual auditing.

### I need to see if any pipelines are configured for a specific microservice.
The agent runs `list_codefresh_pipelines` and filters by service name. You immediately get the pipeline configuration details without browsing through hundreds of entries in the web UI.

## Benefits

- Stop switching tabs. You can list all pipelines or check build status, using the `list_codefresh_pipelines` tool directly in your chat interface.
- Verify environment variables instantly. Use `list_shared_contexts` to audit secrets and shared variables without navigating complex settings pages.
- Control deployments from anywhere. With `trigger_codefresh_build`, you can kick off a new build for any pipeline, specifying the exact branch or variable needed.
- Get full visibility into delivery targets using `list_delivery_clusters`. Know exactly which Kubernetes clusters are connected and ready for deployment.
- Deep dive into history. Use `get_build_execution_details` to pull up the full status and logs for any build workflow, quickly diagnosing failures.

## How It Works

The bottom line is that you connect once, and your AI client can manage all your complex CI/CD tasks using simple chat prompts.

1. Subscribe to this Codefresh MCP on Vinkius.
2. Enter your unique Codefresh API Key into the connection settings (find it in User Settings > API Keys).
3. Ask your AI client to perform a task, like 'Check the status of the main app build,' and the agent executes the command.

## Frequently Asked Questions

**How does Codefresh MCP help me monitor my CI/CD pipelines?**
This MCP lets your agent list all existing pipelines and gives you real-time visibility into their configuration. You can check the health of any pipeline or get detailed status updates on recent builds without leaving your chat interface.

**Can I use Codefresh MCP to trigger a manual build?**
Yes, you can start new builds using this MCP. Simply tell your agent which pipeline name and branch you want, and it initiates the deployment process for you immediately.

**What if I need to check environment variables or secrets?**
You can audit all shared contexts like secrets and variables using this MCP. It lists everything used across your workflows in one place, so you always know what data is accessible during deployment.

**Does Codefresh MCP help with Kubernetes cluster status?**
Absolutely. This MCP allows you to list all connected delivery clusters and check the current build execution details for deployments targeting those specific environments.

**Is this better than using the Codefresh web dashboard?**
It’s faster because it eliminates clicks. Instead of navigating deep into dashboards, you ask your agent a question and get an immediate, concise answer or action taken directly in the chat.