# Harness MCP

> Harness connects your CI/CD and DevOps workflows directly to your AI agent. It lets you manage software delivery pipelines, monitor deployments in real time, and audit platform secrets without opening a complex dashboard.

## Overview
- **Category:** ship-it
- **Price:** Free
- **Tags:** ci-cd, pipeline-automation, software-delivery, feature-flags, cloud-cost-management, deployment-monitoring

## Description

Your agent gives you full control over your entire software development lifecycle. Instead of navigating multiple dashboards just to check if the latest build passed or to trigger a release, you talk to your AI client. This MCP lets you list all projects across your organization and inspect their pipelines in natural conversation. You can ask for real-time deployment status using `get_execution_status` or even retrieve platform audit logs via `get_audit_logs` to check compliance. It's like having a dedicated DevOps Coordinator available 24/7 right inside your IDE, making it simple to manage everything from infrastructure connectors to secrets.

When you connect this through Vinkius, you get access to all these controls—from listing microservices via `list_services` to triggering an entire release with `execute_pipeline`. It’s about getting the results instantly without ever leaving your coding environment.

## Tools

### execute_pipeline
Starts the process for a specified software pipeline run.

### get_audit_logs
Pulls historical records of all changes made to the platform.

### get_execution_status
Retrieves current status and step details for a specific pipeline run.

### get_pipeline
Gets detailed information, including the YAML definition, for one specific pipeline.

### list_connectors
Displays available infrastructure connections like Git or Kubernetes.

### list_environments
Shows all defined deployment environments within a project, such as staging or production.

### list_executions
Lists multiple completed and active runs for a single pipeline.

### list_pipelines
Retrieves all defined pipelines within a specific project scope.

### list_projects
Lists every organizational project configured in your Harness account.

### list_secrets
Displays the names and types of secrets stored for a given project.

### list_services
Lists all microservices defined within your current DevOps ecosystem.

## Prompt Examples

**Prompt:** 
```
List all pipelines in project 'E-commerce App'.
```

**Response:** 
```
I've retrieved the pipelines for 'E-commerce App' (ID: app_502). You have 3 active workflows: 'Production Deploy', 'Staging Sync', and 'Security Scan'. Which one would you like to inspect?
```

**Prompt:** 
```
Execute the 'Production Deploy' pipeline for project ID app_502.
```

**Response:** 
```
Execution triggered! I've successfully requested the start of 'Production Deploy' (ID: deploy_v1) in project app_502. You can check the status using the `get_execution_status` tool in a few moments.
```

**Prompt:** 
```
Show the status of the latest execution for pipeline deploy_v1.
```

**Response:** 
```
Retrieving execution status... The latest execution for 'Production Deploy' (ID: exec_992) is currently IN_PROGRESS. 2 out of 5 steps have completed successfully (Build and Unit Tests). Step 3 (Artifact Push) is running. Should I monitor this for you?
```

## Capabilities

### Manage pipelines
List, view details for, and trigger runs of software delivery pipelines.

### Monitor deployments
Check the live status and step-by-step progress of any running deployment execution.

### Inspect infrastructure assets
View project details, list connected environments, or check available secrets for configuration accuracy.

### Audit platform changes
Retrieve historical logs to track who changed what and when within the entire system.

## Use Cases

### The build failed, but I don't know why.
A developer asks their agent to check the status of the latest run. The agent uses `get_execution_status` and reports that the 'Artifact Push' step is running slowly, pinpointing the exact stage causing the delay.

### I need to prove we followed policy on this change.
An auditor asks for a record of who accessed the database credentials last week. The agent executes `get_audit_logs`, providing a clean, chronological list of all access attempts.

### I need to roll out a hotfix immediately.
The Release Manager asks their agent to execute the 'Hotfix' pipeline using `execute_pipeline`. The agent confirms the trigger and provides an initial execution ID for tracking.

### What services are connected to this project?
A new engineer needs to understand the scope of a microservice. They ask their agent, which uses `list_services` to provide a full inventory of all running components in that project.

## Benefits

- Real-time visibility: Instead of checking a dashboard, you ask your agent for the status of an execution using `get_execution_status`. You know exactly where the deployment is stuck.
- Full project oversight: List all organizational projects with `list_projects` and then dive deep into any single pipeline by calling `get_pipeline`. Everything stays in one conversation.
- Security compliance checks: Need to prove who changed a secret? Use `get_audit_logs` to pull comprehensive change history instantly, simplifying audits.
- Controlled deployments: When you’re ready for production, use `execute_pipeline` to trigger the full run with a simple command. No manual clicks required.
- Infrastructure mapping: Quickly list all connected environments (`list_environments`) and services (`list_services`), ensuring your next deployment targets the right place.

## How It Works

The bottom line is you manage complex DevOps tasks by talking to a single chat interface, letting your AI client do the heavy lifting across multiple systems.

1. First, subscribe to this MCP in Vinkius and provide your Harness API Key, Account ID, and Organization ID.
2. Next, instruct your AI client to perform a specific action, like listing all available projects or checking the status of an active pipeline run.
3. Finally, your agent uses the provided credentials to talk directly to Harness, returning structured data about the requested pipelines, secrets, or executions.

## Frequently Asked Questions

**How do I find my Harness API Key?**
Log in to Harness, go to **My Profile** (bottom left), and select **API Keys**. You can generate either a Personal API Key or use a Service Account Token from there.

**Where can I find my Account ID and Org ID?**
The Account ID is visible in your browser's URL when logged in (e.g., `account/XYZ123`). The Organization ID is typically found in the project settings or sidebar (default is often 'default').

**Can I trigger a pipeline execution via this integration?**
Yes! Use the `execute_pipeline` tool by providing the project ID and pipeline ID. Harness will initiate the workflow immediately.

**Is the integration secure for managing secrets?**
Absolutely. The integration only lists the metadata of your secrets (like names and identifiers) through your API key. Your credentials are encrypted and stored securely in the Vinkius Cloud.