Harness MCP Server

Manage Harness.io pipelines, deployments, feature flags, cloud costs and more from an MCP client

Official · Harness TypeScript Remote (hosted) · Streamable HTTPLocal · stdio DevOps and monitoringCloud platforms

69 popularity score ★ 112 ↓ 8.8k/wk

Connect your client

Remote (hosted)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Cursor.cursor/mcp.json
{
  "mcpServers": {
    "harness-prod1-mcp": {
      "url": "https://mcp.harness.io/mcp",
      "auth": {
        "CLIENT_ID": "mcp-client"
      }
    }
  }
}
Claude (desktop and web)Settings → Connectors → Add custom connector
https://mcp.harness.io/mcp
Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs HARNESS_API_KEY. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add harness -e HARNESS_API_KEY=<HARNESS_API_KEY> -- npx -y harness-mcp-v2
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "harness": {
      "command": "npx",
      "args": [
        "-y",
        "harness-mcp-v2"
      ],
      "env": {
        "HARNESS_API_KEY": "<HARNESS_API_KEY>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "harness": {
      "command": "npx",
      "args": [
        "-y",
        "harness-mcp-v2"
      ],
      "env": {
        "HARNESS_API_KEY": "<HARNESS_API_KEY>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "harness": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "harness-mcp-v2"
      ],
      "env": {
        "HARNESS_API_KEY": "<HARNESS_API_KEY>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.harness]
command = "npx"
args = ["-y", "harness-mcp-v2"]

[mcp_servers.harness.env]
HARNESS_API_KEY = "<HARNESS_API_KEY>"
Gemini CLITerminal
gemini mcp add --scope user -e HARNESS_API_KEY=<HARNESS_API_KEY> harness npx -- -y harness-mcp-v2
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs HARNESS_API_KEY. Replace each <NAME> with your value.

FirstTerminal
git clone https://github.com/harness/mcp-server.git
cd mcp-server
pnpm install
pnpm build
Claude CodeTerminal
claude mcp add harness -e HARNESS_API_KEY=<HARNESS_API_KEY> -- node '<ABSOLUTE_PATH_TO_CLONE>/build/index.js'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "harness": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/build/index.js"
      ],
      "env": {
        "HARNESS_API_KEY": "<HARNESS_API_KEY>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "harness": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/build/index.js"
      ],
      "env": {
        "HARNESS_API_KEY": "<HARNESS_API_KEY>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "harness": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/build/index.js"
      ],
      "env": {
        "HARNESS_API_KEY": "<HARNESS_API_KEY>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.harness]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/build/index.js"]

[mcp_servers.harness.env]
HARNESS_API_KEY = "<HARNESS_API_KEY>"
Gemini CLITerminal
gemini mcp add --scope user -e HARNESS_API_KEY=<HARNESS_API_KEY> harness node -- '<ABSOLUTE_PATH_TO_CLONE>/build/index.js'

Settings 12

HARNESS_API_KEY secret Required: Harness personal access token or service account token. The server exits without it in the default single-user mode.
HARNESS_ACCOUNT_ID Optional: Account ID. Only needed for keys that do not embed it (PAT/SAT tokens do).
HARNESS_BASE_URL Optional: Harness host. Set it for self-managed or other SaaS environments. Default https://app.harness.io.
HARNESS_ORG Optional: Default org ID used when a call gives none.
HARNESS_PROJECT Optional: Default project ID used when a call gives none.
HARNESS_TOOLSETS Optional: Comma-separated toolsets to load. +name adds to the defaults, -name removes one.
HARNESS_READ_ONLY Optional: true blocks create, update, delete and execute. Default false.
HARNESS_AUTO_APPROVE_RISK Optional: Highest risk level approved without prompting: none, low_write, medium_write, high_write or all. Default none.
HARNESS_SCHEMA_MODE Optional: compact keeps resource_type a plain string in tool schemas. full lists every resource type inline. Default compact.
HARNESS_SEARCH_PROVIDER Optional: Search backend: local (in-process model), remote or none. Default local. For harness_search.
HARNESS_RATE_LIMIT_RPS Optional: Requests per second allowed to the Harness API. Default 10.
HARNESS_MCP_MODE Optional: single-user, multi-user, oauth or oauth-proxy. The last three are for HTTP deployments. Default single-user.

What it does

Harness MCP Server is Harness's own server for its software delivery platform. Instead of one tool per API endpoint, it offers 11 general tools (list, get, create, update, delete, execute, search, diagnose, describe, schema, status) that take a resource type as an argument, and a built-in registry maps each type to the right Harness API. The README counts 262 resource types across CI/CD pipelines, services and environments, GitOps, feature flags, Cloud Cost Management, chaos experiments, security testing, Software Engineering Insights, the Internal Developer Portal, IaC management, access control and governance. You can also paste a Harness UI link and the server picks out the org, project and resource from it.

It runs on your machine over stdio with a personal access or service account token, or as an HTTP service for a team. The HTTP service can run single-user, multi-user (each session sends its own key), or with HarnessID OAuth. Harness also runs a hosted endpoint at https://mcp.harness.io/mcp for accounts where Harness Support has switched it on. Toolsets can be narrowed with HARNESS_TOOLSETS, and HARNESS_READ_ONLY=true blocks every create, update, delete and execute call. It also ships prompt templates for DevOps, FinOps and DevSecOps tasks.

All 11 tools are registered in src/tools/index.ts whichever toolsets are on, so toolset filtering changes which resource types they reach, not how many tools there are. At v3.2.35 src/config.ts sets HARNESS_SCHEMA_MODE to compact unless you say otherwise. In that mode resource_type is a plain string in each tool's schema and the model looks types up with harness_describe. Set it to full if you want every type listed in the schema itself. The same file caps calls to Harness at 10 per second (HARNESS_RATE_LIMIT_RPS).

What it needs

To run it yourselfNode.js 20+
Runs onmacOS, Windows, Linux
HarnessPersonal access or service account token from My Profile > API Keys. The hosted endpoint uses Harness OAuth and must be enabled by Harness Support.

Create a token under My Profile > API Keys > New API Key in Harness. PAT and SAT tokens carry the account ID, so HARNESS_ACCOUNT_ID is only needed for other key formats. Semantic search uses the optional dependency @huggingface/transformers, which npm installs by default. Building from source needs git and pnpm. The hosted endpoint needs no key, but Harness Support has to switch it on for your account first.

Limits

  • Limit Medium, high and destructive actions ask through MCP elicitation. Claude Desktop and Devin Desktop lack it, so there they are blocked unless confirm: true is passed.
  • Limit HARNESS_AUTO_APPROVE_RISK=all removes every confirmation prompt, deletes included. Low-risk creates and updates never prompt.
  • Size cap Lists return 20 items per page by default, up to 100, and stop at 10,000 in total. Some types cap pages lower.
  • Rate limit Calls to Harness are limited to 10 per second by default (HARNESS_RATE_LIMIT_RPS).
  • Limit Local search downloads a model of about 23 MB on first use.
  • Early release Pipeline YAML v1 (HARNESS_PIPELINE_VERSION=1, pipeline_v1) is alpha.
  • Platform The Docker image serves HTTP on port 3000 only, with no stdio mode.
  • Not covered Hosted endpoint works only for accounts where Harness Support has enabled it.

Low-risk writes such as creating or updating a pipeline go through without asking. Medium, high and destructive actions ask for confirmation through MCP elicitation. The README lists Claude Desktop and Devin Desktop as not supporting elicitation yet, so there those calls are blocked unless confirm: true is passed. HARNESS_AUTO_APPROVE_RISK=all turns off every prompt, deletes included. Lists stop at 100 items per page and 10,000 in total. Calls to Harness are limited to 10 per second by default. Local search downloads a ~23 MB model on first use. Pipeline YAML v1 is alpha. The Docker image serves HTTP only, with no stdio mode.

Who it suits

A good fit for teams already on Harness who want an assistant to look at failed executions, run or retry pipelines, toggle flags or check cloud costs, without loading hundreds of tool schemas. It is published by Harness, it can change and delete real resources, and it needs a token with matching permissions. If you only want to browse, set HARNESS_READ_ONLY=true or use a read-only service account. Teams that would rather not hold tokens locally can ask Harness Support to enable the hosted OAuth endpoint. It is of no use without a Harness account.

Tools 11

7 only read, 2 change things, 2 can delete or overwrite. A ? marks an optional parameter.

harness_describe
Shows the resource types, operations and fields the registry knows about, without calling Harness.resource_type?: stringoperation?: enumtoolset?: stringsearch_term?: string
harness_schema
Returns YAML/JSON schemas and examples to use before creating or updating a resource.
harness_list
Lists resources of one type, with filters, search and paging.resource_type?: stringurl?: stringresource_scope?: stringorg_id?: stringproject_id?: stringpage?: numbersize?: numbersearch_term?: stringcompact?: booleanparams?: objectfilters?: object
harness_get
Fetches one resource by its identifier.resource_type?: stringresource_id?: stringurl?: stringresource_scope?: stringorg_id?: stringproject_id?: stringparams?: objectreturn_download_url?: boolean
harness_create changes
Creates a resource, including inline or Git-backed pipelines.
harness_update changes
Changes an existing resource.
harness_delete deletes
Deletes a resource, after confirmation.resource_type: stringresource_id?: stringurl?: stringresource_scope?: stringorg_id?: stringproject_id?: stringconfirm?: booleanparams?: object
harness_execute deletes
Runs an action such as running or retrying a pipeline, toggling a flag or syncing a GitOps app.resource_type?: stringurl?: stringaction: stringresource_id?: stringresource_scope?: stringorg_id?: stringproject_id?: stringinputs?: anyinput_set_ids?: arraybody?: objectparams?: objectconfirm?: booleanwait?: booleanwait_timeout_seconds?: numberwait_poll_interval_seconds?: numberqueries?: array
harness_search
Searches many resource types with one query, using semantic routing or keyword fallback.
harness_diagnose
Explains failures and health for pipelines, connectors, delegates and GitOps apps.
harness_status
Gives a project health summary with recent executions, failure rates and links.

Resources 9

pipeline:///{pipelineId}
Pipeline YAML
pipeline:///{orgId}/{projectId}/{pipelineId}
Pipeline YAML at a given org and project
executions:///recent
Summaries of the last 10 pipeline executions
schema:///pipeline
Pipeline JSON Schema
schema:///template
Template JSON Schema
schema:///trigger
Trigger JSON Schema
schema:///pipeline_v1
V1 pipeline JSON Schema (alpha)
schema:///agent-pipeline
AI agent pipeline JSON Schema
agent-docs:///legacy-format
Reference for the legacy agent spec format, used by create-agent

Prompts 29

build-deploy-app
Builds CI and CD pipelines for a git repo and deploys it, retrying failed runs
debug-pipeline-failure
Finds the root cause of a failed execution from its stages, steps and logs
pipeline_summarizer
Pulls every step log of an execution and sums them up in a table
create-pipeline
Drafts pipeline YAML from a plain description, checking existing resources
create-agent
Builds a Harness AI agent step by step
onboard-service
Sets up a new service with environments and a deployment pipeline
dora-metrics-review
Reviews DORA metrics and rates them
setup-gitops-application
Checks agent, cluster and repo, then creates a GitOps application
chaos-resilience-test
Designs a chaos experiment with faults, probes and expected results
feature-flag-rollout
Plans a staged feature flag rollout across environments
migrate-pipeline-to-template
Pulls reusable stage and step templates out of a pipeline
delegate-health-check
Checks delegate connectivity, health and tokens
developer-portal-scorecard
Reviews IDP scorecards and points out gaps
pending-approvals
Finds executions waiting for approval and offers to approve or reject them
optimize-costs
Ranks cloud cost recommendations and anomalies by savings
cloud-cost-breakdown
Breaks costs down by service, environment or cluster over time
commitment-utilization-review
Checks reserved instance and savings plan use
cost-anomaly-investigation
Traces a cost anomaly to its cause and affected resources
rightsizing-recommendations
Ranks rightsizing advice, optionally opening Jira or ServiceNow tickets
security-review
Reviews security issues by severity and suggests fixes
vulnerability-triage
Ranks vulnerabilities across pipelines and artifacts
sbom-compliance-check
Audits SBOMs for licence risk, policy breaches and vulnerable components
supply-chain-audit
Audits provenance, chain of custody and policy compliance
security-exemption-review
Reviews pending security exemptions for approval or rejection in bulk
bulk-exemption-create
Creates STO exemptions for several issues with scope and duration
access-control-audit
Looks for over-privileged users and role assignments
code-review
Reviews a pull request's diff, commits, checks and comments
pr-summary
Writes a PR title and description from a branch's commits and diff
branch-cleanup
Suggests stale or merged branches to delete

Similar servers