Harness MCP Server
Published
At a glance
- Category
- Cloud & DevOps
- GitHub repository
- harness/mcp-server
- Watch out for
- Write tools (create, update, delete, execute) can change production pipelines and flags; HARNESS_READ_ONLY=true blocks them, and HARNESS_AUTO_APPROVE_RISK can let some writes skip confirmation, so set it with care.
Harness publishes this server in its own GitHub organization as Harness MCP Server 2.0. It connects an agent to the Harness platform: pipelines, services, environments, connectors, feature flags, cloud cost data, security testing, chaos experiments, GitOps and a long list of other modules.
The design is unusual. Instead of one tool per API endpoint, it exposes 11 generic tools and routes them through a registry of resource types, so the model calls harness_list or harness_get with a resource_type rather than picking from hundreds of tools. The README counts 276 resource types and 45 toolsets enabled by default, plus a few opt-in ones.
You can run it locally over stdio with npx, run its HTTP transport for a shared deployment, ship it in Docker or Kubernetes, or connect to the hosted endpoint at https://mcp.harness.io/mcp if Harness Support has enabled it for your account. The hosted service signs in with Harness Platform OAuth instead of an API key.
How it connects
Your AI app
An assistant or agent that supports MCP
Harness MCP Server
Runs as
- npx (Node.js)
- Remote (HTTP)
Gives the agent
- Discovery and schema lookup
- Reading platform resources
- Changing resources
- Running actions
- Search, diagnosis and status
- Prompt templates
Harness
Signs in with
- API key
What it can do
- Discovery and schema lookup
- harness_describe lists resource types and their supported operations locally, and harness_schema returns the schema an agent needs before building a create or update body.
- Reading platform resources
- harness_list and harness_get work across pipelines, executions, services, environments, connectors, secrets, templates and more, with org_id and project_id as optional overrides. Most tools also accept a Harness UI url and pull the IDs out of it.
- Changing resources
- harness_create, harness_update and harness_delete modify resources and ask the user to confirm through MCP elicitation. Inline and Git-backed remote pipelines are both supported.
- Running actions
- harness_execute runs or retries pipelines, imports pipelines from Git, toggles feature flags and syncs GitOps apps, with shorthand for branch, tag, pr_number or commit_sha runtime inputs.
- Search, diagnosis and status
- harness_search covers search across sources, harness_diagnose helps work out why something failed, and harness_status reports on the account state.
- Prompt templates
- The server ships prompts for DevOps, FinOps, DevSecOps and Harness Code work, such as debugging failed pipelines, reviewing DORA metrics and triaging vulnerabilities.
Setting it up
Create a Harness API key in My Profile, API Keys, then add a Token; it comes out as a PAT or SAT, and the account ID is read from the token, so HARNESS_ACCOUNT_ID is only needed for keys without an embedded account segment. To try it from a shell, run HARNESS_API_KEY=pat.xxx npx harness-mcp-v2, or add http --port 8080 for the HTTP transport. In Claude Code, run claude mcp add harness -- npx harness-mcp-v2 and set HARNESS_API_KEY in your environment or a .env file. In Cursor, Claude Desktop or another JSON-configured client, point command at npx with args ["-y", "harness-mcp-v2@latest"] and put HARNESS_API_KEY in env; if the client cannot find npx, use absolute paths and set PATH in the env block, as the README suggests. For the hosted service, add a server entry with url https://mcp.harness.io/mcp and auth CLIENT_ID mcp-client, after Harness Support has turned it on for your account. HARNESS_TOOLSETS trims or extends the toolsets, for example +appsec or a plain allowlist.
claude mcp add --transport http harness https://mcp.harness.io/mcpIf the server needs a sign-in or an API key, the setup notes above say which. Combine several servers in the MCP config generator
Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)
Where it helps
- Find failed pipeline executions across several projects and pull the logs to explain what broke
- Run a pipeline on a specific branch or pull request and wait for the result
- Turn a feature flag on or off after the user confirms the change
- Review cloud cost perspectives or DORA metrics with the bundled prompt templates
- Audit access control and governance policies in an org
Limitations and things to watch
- Write tools (create, update, delete, execute) can change production pipelines and flags; HARNESS_READ_ONLY=true blocks them, and HARNESS_AUTO_APPROVE_RISK can let some writes skip confirmation, so set it with care.
- The hosted endpoint must be enabled per account by Harness Support, uses Platform OAuth, and client config cannot change which Harness environment it routes to.
- HTTP mode on a non-loopback address requires HARNESS_MCP_AUTH_TOKEN unless you explicitly opt out with HARNESS_MCP_ALLOW_UNAUTHENTICATED_HTTP=true.
- Some modules sit in opt-in toolsets and need extra keys, such as the appsec toolset with its own API key.
- Local metadata tools like harness_describe and harness_schema are not part of the audit event stream.
Sources
Written from the project's own documentation, checked November 2026.
- github.com /harness/mcp-server
- github.com /harness/mcp-server/blob/main/README.md
- github.com /harness/mcp-server/blob/main/mcp-directory/manifest.json
How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.