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.
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. |
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 tokenHARNESS_ACCOUNT_ID(optional): auto-extracted from PATHARNESS_BASE_URL(optional): defaults tohttps://app.harness.ioHARNESS_ORG/HARNESS_PROJECT(optional): scope defaultsHARNESS_READ_ONLY(optional): settrueto block writesHARNESS_AUTO_APPROVE_RISK(optional): risk threshold for auto-approvalHARNESS_TOOLSETS(optional): comma list to filter loaded toolsetsHARNESS_API_TIMEOUT_MS,HARNESS_MAX_RETRIES,HARNESS_RATE_LIMIT_RPS: tuning knobs
- 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_executeon 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_searchandharness_list. - Kick off chaos experiments and check delegate, GitOps app, and pipeline health via
harness_statusandharness_diagnose.
- "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-uito 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."
- 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_ONLYmode, and risk-based auto-approval thresholds. - Multiple deployment options: npx, global npm, Docker, source build, or Harness-hosted endpoint with OAuth.
- The generic tool design means the agent must first call
harness_describeorharness_schemato 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.
- GitHub MCP Server for repo and Actions-centric workflows
- GitLab MCP Server integrations for GitLab CI/CD
- CircleCI MCP Server for CircleCI pipeline operations