← 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
Category
Dev Tools #74 of 438
Stars
★ 105 Popular
Transport
stdio (local process) · Streamable HTTP
Runtime
Node.js · Docker
Credentials
API key / credential required
License
MIT
Last commit
Tools
11
63FMRS · C

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.

Strongest · Documentation 17/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
15/20
Maintenance
10/20
Documentation
17/20
Setup experience
13/20
Why each score
Reliability 8/20
The README claims 11 tools and 224 resource types, and references test scripts (pnpm inspect, test-remote-provider.mjs), but this is a static review with no visibility into actual committed CI workflow files or test coverage evidence, and no way to verify that the claimed tool/resource-type counts match real implementation. Per the static calibration rule, reliability cannot exceed 12 without verifiable CI+test evidence. Documented design choices (HTTP session handling, wait/poll behavior, error hints) sound plausible but remain unverified written claims, so the score is conservative.
Security and permissions 15/20
The documented security posture is relatively strong: HTTPS enforced by default (HTTP requires explicit opt-in via HARNESS_ALLOW_HTTP), non-loopback binds require HARNESS_MCP_AUTH_TOKEN by default, multi-user mode keeps the server credential-less and passes per-session tokens, destructive operations (create/update/delete/execute) require elicitation-based confirmation, HARNESS_AUTO_APPROVE_RISK session overrides are capped by the deployment-level ceiling rather than able to expand it, HARNESS_READ_ONLY can disable all mutations, and audit logging (file/webhook/OTel) covers registry-dispatched operations. No red-line issues found (no hardcoded credentials, no unconfirmed destructive defaults). Deductions: all of these protections are README claims not verified against actual code, and the docs themselves note that DNS-rebinding protection and CORS are 'not authentication,' meaning correct external gating is still required and misconfiguration risk remains.
Maintenance 10/20
The repo is MIT-licensed and not archived, but 87 stars against 83 open issues is a high issue-to-star ratio, potentially indicating maintenance strain. No commit cadence, release history, or recent-activity data was provided, so current maintenance activity and governance rigor cannot be assessed, warranting a conservative score.
Documentation 17/20
Documentation is extensive: prerequisites, multiple install paths (npx/global/source/Docker/K8s), full HTTP transport endpoint details, multi-user mode, a large environment-variable reference table with defaults, audit/observability configuration, a three-way comparison of semantic search providers with local test steps, a detailed 11-tool reference table, numerous real tool-call examples, and troubleshooting (e.g. npx ENOENT). Layered structure, sufficient examples, and disclosed limitations (e.g. pipeline_dynamic_execution constraints, Alpha status of pipeline_v1) are all present. Minor deduction: the full resource-type catalog is truncated/not fully enumerated, requiring further exploration.
Setup experience 13/20
Configuration examples are provided for major clients (Claude Desktop, Cursor, Claude Code, Devin Desktop) plus npx zero-install, global install, Docker, and Kubernetes paths, with troubleshooting guidance for PATH-related failures. Per the static calibration rule, setup cannot exceed 15 without verifiable execution evidence (no confirmed real CI run). The steps are clearly described but depend on multiple external credential-acquisition steps (Harness API key creation) and environment quirks (GUI app PATH issues), so a score of 13 is assigned.

Static review · not runListed 2026-08-26

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkChanges third-party account data

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

Setup

Before you start

Runtime:Node.js · Docker

HARNESS_API_KEY requiredsecret Harness personal access token or service account token in the format pat.<accountId>.<tokenId>.<secret>; create it under My Profile → API Keys in the Harness web UI.
HARNESS_MCP_AUTH_TOKEN optionalsecret Bearer token required on /mcp HTTP routes when set; mandatory by default for remote HTTP deployments; generate it yourself.
HARNESS_FME_API_KEY optionalsecret Optional FME/Split Admin credential for fme_ resources; from the Split/FME console or an FME-entitled Harness token.
HARNESS_SEARCH_SERVICE_HEADERS optionalsecret JSON object of headers sent to the remote search service, supporting any auth scheme; treat as secret when it carries credentials.
HARNESS_AUDIT_WEBHOOK_TOKEN optionalsecret Optional bearer token sent to the audit webhook.
Other optional settings (31)
HARNESS_ACCOUNT_ID optional Harness account ID; usually auto-extracted from PAT/SAT tokens that embed it.
HARNESS_BASE_URL optional Harness API/UI base URL, defaults to https://app.harness.io; set for private environments such as harness0.
HARNESS_ORG optional Default org ID used when org_id is not passed per tool call; optional.
HARNESS_PROJECT optional Default project ID used when project_id is not passed per tool call; optional.
HARNESS_MCP_MODE optional Deployment mode: single-user (default) or multi-user (per-session credentials over HTTP).
HARNESS_READ_ONLY optional Set to true to block all mutating operations; only list and get are allowed, useful for shared/demo environments.
HARNESS_TOOLSETS optional Comma-separated toolset filter list controlling which resource categories are exposed; default toolsets load when empty.
HARNESS_FME_BASE_URL optional Split/FME Admin API base URL, defaults to https://api.split.io.
HARNESS_SEARCH_PROVIDER optional Semantic search backend for harness_search: local (default), remote, or none.
HARNESS_SEARCH_SERVICE_URL optional Base URL of the remote search service; required when HARNESS_SEARCH_PROVIDER=remote.
HARNESS_AUTO_APPROVE_RISK optional Risk-based auto-approval threshold (none/low_write/medium_write/high_write/all) for autonomous workflows.
HARNESS_ALLOW_HTTP optional Allows a non-HTTPS HARNESS_BASE_URL; only for local development.
HARNESS_PIPELINE_VERSION optional Pipeline YAML version (0 or 1, Alpha) choosing between pipeline and pipeline_v1 resources.
HARNESS_MCP_ALLOWED_HOSTS optional Hostnames allowed by HTTP Host-header validation for DNS-rebinding protection.
HARNESS_MCP_ALLOW_UNAUTHENTICATED_HTTP optional Explicitly allows unauthenticated HTTP on non-loopback binds; use with caution.
HARNESS_API_TIMEOUT_MS optional HTTP request timeout in milliseconds for Harness APIs, default 30000.
HARNESS_MAX_RETRIES optional Retry count for transient failures (429/5xx), default 3.
HARNESS_MAX_BODY_SIZE_MB optional Max HTTP request body size in MB for http transport, default 10.
HARNESS_RATE_LIMIT_RPS optional Client-side request throttle (requests per second) to Harness APIs, default 10.
LOG_LEVEL optional Log verbosity: debug/info/warn/error, default info.
HARNESS_MCP_LOG_FILE optional File for stdio disconnect/crash diagnostics, default ~/.claude/harness-mcp.log.
HARNESS_LOG_UNSAFE_BODIES optional Include raw request/response bodies in logs; off by default since bodies may contain secrets.
HARNESS_AUDIT_FILE optional File for appending newline-delimited JSON audit events for local collection.
HARNESS_AUDIT_WEBHOOK_URL optional HTTPS endpoint receiving batched audit events.
HARNESS_AUDIT_WEBHOOK_BATCH_SIZE optional Number of audit events batched before webhook flush, default 10.
HARNESS_AUDIT_WEBHOOK_FLUSH_MS optional Max time to hold audit events before webhook flush, default 5000.
OTEL_EXPORTER_OTLP_ENDPOINT optional When set, enables OpenTelemetry audit spans (optional OTel packages must be installed).
HARNESS_HF_CACHE_DIR optional Cache directory for the HuggingFace model used by the local search provider, default /tmp/hf-cache.
HARNESS_DIAGNOSE_LOG_FETCH_CONCURRENCY optional Max concurrent log-blob downloads issued by harness_diagnose, default 3.
HARNESS_MCP_TRUST_PROXY optional Number of reverse proxy hops to trust for client IP resolution, default 0.
HARNESS_SKIP_ELICITATION optional Deprecated — use HARNESS_AUTO_APPROVE_RISK=all instead; kept for backward compatibility.
  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"}}}}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "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"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add harness -e HARNESS_API_KEY=pat.xxx.xxx.xxx -e PATH=/directory/containing/node:/usr/local/bin:/usr/bin:/bin -- /absolute/path/to/npx -y harness-mcp-v2@latest

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After adding HARNESS_API_KEY to the client config and restarting, the client's tool list should show the 11 harness_ tools (e.g. harness_list, harness_execute). Ask "List the organizations in my account" — a returned org list confirms the connection works.

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

Things to try

Once connected, you can ask your AI assistant things like:

  • List all organizations and projects in my Harness account
  • Search for pipelines with 'deploy' in the name and show the latest execution report
  • Create a pipeline that builds a Go app with Docker and deploys to Kubernetes
  • Diagnose the failed pipeline execution abc123XYZ and tell me which stage failed and why

Tools 11

harness_describe read-only
Discovers available resource types, operations, and fields — local registry metadata only, no API call.
harness_schema read-only
Fetches exact YAML/JSON Schema definitions and examples for creating or updating resources, with deep drilling via a dot-separated path.
harness_list read-only
Lists resources of a given type with filtering, search, and pagination.
harness_get read-only
Gets a single resource by its identifier.
harness_create writes
Creates a new resource, supporting inline and remote (Git-backed) pipelines; prompts for user confirmation.
harness_update writes
Updates an existing resource, supporting inline and remote (Git-backed) pipelines; prompts for user confirmation.
harness_delete destructive
Deletes a resource; destructive, prompts for user confirmation.
harness_execute writes
Executes an action on a resource (run/retry pipeline, import from Git, toggle flag, sync app); prompts for user confirmation.
Show 3 more tools
harness_search read-only
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 read-only
Diagnoses pipeline, connector, delegate, and GitOps application resources, returning stage/step timing, failure details, and health signals.
harness_status read-only
Gets a real-time project health dashboard with recent executions, failure rates, and deep links.

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 Desktop
Claude Code
Cursor
Devin Desktop

Listed from the project's documentation, not tested by this site.

Overview

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.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision b563de3e95ec Data synced 2026-10-12 Read the FMRS scoring method