Back to MCP Servers

Harness MCP Server

Official Harness MCP server: 11 generic tools that route to 169 resource types across CI/CD, GitOps, feature flags, cloud cost, security, and chaos.

Developer Tools by Harness API Key active
Overview

The Harness MCP Server is the official integration that gives AI agents access to the Harness.io software delivery platform. Instead of exposing hundreds of individual endpoints, it uses 11 generic, action-oriented tools (list, get, create, update, delete, execute, search, describe, schema, diagnose, status) that route to 169 resource types across 31 toolsets. This consolidated design keeps the tool catalog small enough for LLM context windows while still covering the full surface area of Harness.

Resource coverage spans pipelines, services, environments, connectors, infrastructure definitions, secrets, delegates, code repositories, feature flags, GitOps applications, chaos experiments, cloud cost data, security issues, RBAC policies, and database DevOps. The server supports both write operations with confirmation prompts and a strict read-only mode, plus risk-based auto-approval thresholds for trusted environments.

It can be run locally via npx, as a global npm install, in Docker, or built from source. Harness also offers a hosted MCP endpoint at https://mcp.harness.io/mcp that uses Platform OAuth instead of API keys.

Tools

Tool Description
harness_describe Discover available resource types and the operations supported on each.
harness_schema Fetch the JSON Schema definition for a given resource type to understand its fields.
harness_list List resources of a given type with filtering and pagination.
harness_get Retrieve a single resource by identifier.
harness_create Create a new resource (requires user confirmation unless auto-approved).
harness_update Update an existing resource (requires confirmation).
harness_delete Delete a resource (requires confirmation).
harness_execute Trigger actions such as pipeline runs, feature flag toggles, or chaos experiment runs.
harness_search Search across multiple resource types using a query string.
harness_diagnose Troubleshoot pipelines, connectors, delegates, and GitOps applications by surfacing recent errors and health signals.
harness_status Get a real-time project health dashboard summarizing key metrics across toolsets.
Setup Guide

Prerequisites

  • A Harness account with API access
  • A Personal Access Token in the format pat.<accountId>.<tokenId>.<secret> created from My Profile, API Keys, + New API Key
  • Node.js (for npx/npm) or Docker
  • An MCP-compatible client (Claude Desktop, Cursor, Windsurf, VS Code with Copilot, etc.)

Install and run

The fastest path is npx with no install:

HARNESS_API_KEY=pat.xxx.xxx.xxx npx harness-mcp-v2@latest

Global install:

npm install -g harness-mcp-v2
harness-mcp-v2

Docker:

docker run --rm -p 3000:3000 \
  -e HARNESS_API_KEY=pat.xxx.xxx.xxx \
  harness-mcp-server

Claude Desktop / Cursor / Windsurf config

{
  "mcpServers": {
    "harness": {
      "command": "npx",
      "args": ["harness-mcp-v2"],
      "env": {
        "HARNESS_API_KEY": "pat.xxx.xxx.xxx"
      }
    }
  }
}

Hosted MCP (Harness-managed, OAuth)

{
  "mcpServers": {
    "harness-hosted": {
      "url": "https://mcp.harness.io/mcp",
      "auth": {
        "CLIENT_ID": "mcp-client"
      }
    }
  }
}

Environment variables

  • HARNESS_API_KEY (required): PAT or service account token
  • HARNESS_ACCOUNT_ID (optional): auto-extracted from PAT
  • HARNESS_BASE_URL (optional): defaults to https://app.harness.io
  • HARNESS_ORG / HARNESS_PROJECT (optional): scope defaults
  • HARNESS_READ_ONLY (optional): set true to block writes
  • HARNESS_AUTO_APPROVE_RISK (optional): risk threshold for auto-approval
  • HARNESS_TOOLSETS (optional): comma list to filter loaded toolsets
  • HARNESS_API_TIMEOUT_MS, HARNESS_MAX_RETRIES, HARNESS_RATE_LIMIT_RPS: tuning knobs
Use Cases
  • Trigger and monitor CI/CD pipeline runs from chat, then diagnose failed stages without leaving the agent.
  • Toggle feature flags or roll out a percentage rollout across environments via harness_execute on the FF toolset.
  • Pull cloud cost anomalies, top spend by service or environment, and create cost perspectives or budgets.
  • Audit security issues, secrets, connectors, and RBAC policies across orgs and projects with harness_search and harness_list.
  • Kick off chaos experiments and check delegate, GitOps app, and pipeline health via harness_status and harness_diagnose.
Example Prompts
  • "List all failed pipeline executions in the payments project over the last 24 hours and diagnose the most recent one."
  • "Show feature flags in the checkout service that are still 100% off in production, and toggle new-cart-ui to 25% rollout."
  • "Search for any secrets or connectors that haven't been used in 90 days across all projects."
  • "Give me a status dashboard for the platform-team org and flag any unhealthy delegates or GitOps apps."
  • "Summarize this month's cloud cost anomalies above $500 and create a budget alert for the data-platform perspective."
Pros
  • Official server maintained by Harness, kept in sync with the platform API.
  • 11 consolidated tools keep the LLM tool catalog small while still reaching 169 resource types across 31 toolsets.
  • Built-in safety: confirmation prompts on writes, HARNESS_READ_ONLY mode, and risk-based auto-approval thresholds.
  • Multiple deployment options: npx, global npm, Docker, source build, or Harness-hosted endpoint with OAuth.
Limitations
  • The generic tool design means the agent must first call harness_describe or harness_schema to learn resource shapes, adding round trips.
  • Hosted MCP variant requires account configuration through Harness Support rather than self-serve setup.
  • Requires a Harness account and PAT; many advanced toolsets (chaos, security, FME) depend on paid modules being enabled.
Alternatives