← Back to directory
H

Harness MCP Server

Official
Official MCP server giving AI agents full access to the Harness.io platform via 11 consolidated tools
GitHub source repository ↗
★ 91 Stars Category · Dev Tools Popular Source revision 61f256b3b5b9
63FMRS · C
Reliability
8/20
Security and permissions
15/20
Maintenance
10/20
Documentation
17/20
Setup experience
13/20

Based on the README, this is an officially maintained, broad-coverage MCP server for the Harness platform with detailed configuration and security documentation, though its write-capable tools carry real operational risk and should be deployed with careful auth and read-only settings.

Read the FMRS scoring method →

Harness MCP Server 2.0 is the official Model Context Protocol server maintained by Harness, giving AI agents full access to the Harness.io platform. Instead of mapping one tool per API endpoint, it uses a registry-based dispatch system with 11 consolidated tools (harness_list, harness_get, harness_create, etc.) that route to 224 resource types across 38 default toolsets spanning CI/CD, GitOps, Feature Flags, Cloud Cost Management, Security Testing, Chaos Engineering, Database DevOps, Internal Developer Portal, Software Supply Chain, Infrastructure as Code, Governance, and more. It supports zero-install startup via npx, global npm install, or building from source, offers both stdio (local clients) and HTTP (remote/shared) transports, and is ready for Docker and Kubernetes deployment. Only a Harness API key (PAT or SAT) is required, with account ID auto-extracted from the token. Mutating operations (create, update, delete, execute) prompt for user confirmation via elicitation by default, with a configurable risk-based auto-approval threshold.

Tools

harness_describe
Discovers available resource types, operations, and fields — local registry metadata only, no API call.
harness_schema
Fetches exact YAML/JSON Schema definitions and examples for creating or updating resources, with deep drilling via a dot-separated path.
harness_list
Lists resources of a given type with filtering, search, and pagination.
harness_get
Gets a single resource by its identifier.
harness_create
Creates a new resource, supporting inline and remote (Git-backed) pipelines; prompts for user confirmation.
harness_update
Updates an existing resource, supporting inline and remote (Git-backed) pipelines; prompts for user confirmation.
harness_delete
Deletes a resource; destructive, prompts for user confirmation.
harness_execute
Executes an action on a resource (run/retry pipeline, import from Git, toggle flag, sync app); prompts for user confirmation.
harness_search
Searches across resource types using local ONNX semantic embeddings to route the query, falling back to keyword scatter-gather when confidence is low.
harness_diagnose
Diagnoses pipeline, connector, delegate, and GitOps application resources, returning stage/step timing, failure details, and health signals.
harness_status
Gets a real-time project health dashboard with recent executions, failure rates, and deep links.

Setup

  1. Log in to your Harness account and create a new API key Token under My Profile → API Keys → + New API Key (generates a PAT or SAT in the form <prefix>.<accountId>.<tokenId>.<secret>).
  2. Recommended: run with no install via HARNESS_API_KEY=pat.xxx.xxx.xxx npx harness-mcp-v2@latest; alternatively npm install -g harness-mcp-v2 for a global install, or clone the repo and build from source with pnpm (pnpm install && pnpm build).
  3. Add an mcpServers entry in your client config with command pointing to the absolute path of npx or the installed harness-mcp-v2 binary, and set HARNESS_API_KEY in env (GUI clients also need an explicit PATH including the node directory to avoid npx ENOENT errors).
  4. For remote/shared deployments, start the HTTP transport with npx harness-mcp-v2 http --port 8080 and configure security-related env vars like HARNESS_MCP_AUTH_TOKEN.
claude_desktop_config.json
{"mcpServers":{"harness":{"command":"/absolute/path/to/npx","args":["-y","harness-mcp-v2@latest"],"env":{"HARNESS_API_KEY":"pat.xxx.xxx.xxx","PATH":"/directory/containing/node:/usr/local/bin:/usr/bin:/bin"}}}}

Fit and risk

Best for

  • Teams already using the Harness platform for CI/CD, GitOps, or Feature Flags management
  • Automated workflows that need to dynamically discover organizations/projects rather than hardcode configuration
  • Enterprises wanting centralized governance and audit logging via MCP gateways (Docker MCP Gateway, Portkey, LiteLLM, etc.)

Not for

  • Teams not using the Harness platform
  • Use cases that require one tool per API endpoint with fine-grained per-tool permission control
  • Accounts without a Harness API key or without Harness Support enabling the hosted MCP service

Required permissions

  • Requires a Harness personal access token (PAT) or service account token (SAT); the account ID is typically auto-extracted from the token
  • Has read-write access (create/update/delete/execute) by default; can be restricted to read-only with HARNESS_READ_ONLY=true
  • In multi-user HTTP mode, each session supplies its own x-harness-api-key — the server itself holds no credentials

Risks and side effects

  • Mutating operations (create, update, delete, execute) can directly modify production pipelines, feature flags, or infrastructure configuration, so misuse can cause outages
  • Running HTTP transport on a non-loopback bind without HARNESS_MCP_AUTH_TOKEN can expose the server to unauthorized access; HARNESS_MCP_ALLOW_UNAUTHENTICATED_HTTP=true explicitly disables that protection
  • Audit logging omits raw request/response bodies by default, but HARNESS_LOG_UNSAFE_BODIES can enable them, which may then contain secrets

Troubleshooting

  1. `spawn npx ENOENT` or `node: No such file or directory` indicates a client process-launch failure, not an auth issue — find absolute paths with `which npx`/`which node` and set them explicitly in the config's env.PATH
  2. In HTTP mode, a non-HTTPS HARNESS_BASE_URL causes the server to refuse to start unless HARNESS_ALLOW_HTTP=true is set for local development
  3. The hosted MCP endpoint (mcp.harness.io) uses Harness Platform OAuth, not HARNESS_API_KEY, and must first be enabled for the account by Harness Support

Use cases

Let an AI agent build, deploy, and debug CI/CD pipelines, or troubleshoot failed executions across multiple projects
Trigger feature flag toggles, GitOps app syncs, or cloud cost queries via natural language
Audit access control, review DORA metrics, and plan vulnerability remediation or feature rollouts

Supported clients

Claude DesktopFull support
Claude CodeFull support
CursorFull support
Devin DesktopFull support