StackQL MCP Server
OFFICIAL SERVERQuery and change cloud and SaaS resources with SQL through the StackQL engine
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
Opens the app, which asks before it adds the server.
{
"mcpServers": {
"harness-prod1-mcp": {
"url": "https://mcp.harness.io/mcp",
"auth": {
"CLIENT_ID": "mcp-client"
}
}
}
}https://mcp.harness.io/mcpOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs HARNESS_API_KEY. Replace each <NAME> with your value.
claude mcp add harness -e HARNESS_API_KEY=<HARNESS_API_KEY> -- npx -y harness-mcp-v2{
"mcpServers": {
"harness": {
"command": "npx",
"args": [
"-y",
"harness-mcp-v2"
],
"env": {
"HARNESS_API_KEY": "<HARNESS_API_KEY>"
}
}
}
}{
"mcpServers": {
"harness": {
"command": "npx",
"args": [
"-y",
"harness-mcp-v2"
],
"env": {
"HARNESS_API_KEY": "<HARNESS_API_KEY>"
}
}
}
}{
"servers": {
"harness": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"harness-mcp-v2"
],
"env": {
"HARNESS_API_KEY": "<HARNESS_API_KEY>"
}
}
}
}[mcp_servers.harness]
command = "npx"
args = ["-y", "harness-mcp-v2"]
[mcp_servers.harness.env]
HARNESS_API_KEY = "<HARNESS_API_KEY>"gemini mcp add --scope user -e HARNESS_API_KEY=<HARNESS_API_KEY> harness npx -- -y harness-mcp-v2Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs HARNESS_API_KEY. Replace each <NAME> with your value.
git clone https://github.com/harness/mcp-server.git
cd mcp-server
pnpm install
pnpm buildclaude mcp add harness -e HARNESS_API_KEY=<HARNESS_API_KEY> -- node '<ABSOLUTE_PATH_TO_CLONE>/build/index.js'{
"mcpServers": {
"harness": {
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/build/index.js"
],
"env": {
"HARNESS_API_KEY": "<HARNESS_API_KEY>"
}
}
}
}{
"mcpServers": {
"harness": {
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/build/index.js"
],
"env": {
"HARNESS_API_KEY": "<HARNESS_API_KEY>"
}
}
}
}{
"servers": {
"harness": {
"type": "stdio",
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/build/index.js"
],
"env": {
"HARNESS_API_KEY": "<HARNESS_API_KEY>"
}
}
}
}[mcp_servers.harness]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/build/index.js"]
[mcp_servers.harness.env]
HARNESS_API_KEY = "<HARNESS_API_KEY>"gemini mcp add --scope user -e HARNESS_API_KEY=<HARNESS_API_KEY> harness node -- '<ABSOLUTE_PATH_TO_CLONE>/build/index.js'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. |
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. |
HARNESS_AUTO_APPROVE_RISK |
Optional: Highest risk level approved without prompting: none, low_write, medium_write, high_write or all. |
HARNESS_SCHEMA_MODE |
Optional: compact keeps resource_type a plain string in tool schemas. full lists every resource type inline. |
HARNESS_SEARCH_PROVIDER |
Optional: Search backend: local (in-process model), remote or none. |
HARNESS_RATE_LIMIT_RPS |
Optional: Requests per second allowed to the Harness API. |
HARNESS_MCP_MODE |
Optional: single-user, multi-user, oauth or oauth-proxy. The last three are for HTTP deployments. |
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).
| To run it yourself | Node.js 20+ |
|---|---|
| Runs on | macOS, Windows, Linux |
| Harness | Personal 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.
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.
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.
7 only read, 2 change things, 2 can delete or overwrite. A ? marks an optional parameter.
harness_describeresource_type?: stringoperation?: enumtoolset?: stringsearch_term?: stringharness_schemaharness_listresource_type?: stringurl?: stringresource_scope?: stringorg_id?: stringproject_id?: stringpage?: numbersize?: numbersearch_term?: stringcompact?: booleanparams?: objectfilters?: objectharness_getresource_type?: stringresource_id?: stringurl?: stringresource_scope?: stringorg_id?: stringproject_id?: stringparams?: objectreturn_download_url?: booleanharness_create changesharness_update changesharness_delete deletesresource_type: stringresource_id?: stringurl?: stringresource_scope?: stringorg_id?: stringproject_id?: stringconfirm?: booleanparams?: objectharness_execute deletesresource_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?: arrayharness_searchharness_diagnoseharness_statuspipeline:///{pipelineId}pipeline:///{orgId}/{projectId}/{pipelineId}executions:///recentschema:///pipelineschema:///templateschema:///triggerschema:///pipeline_v1schema:///agent-pipelineagent-docs:///legacy-formatbuild-deploy-appdebug-pipeline-failurepipeline_summarizercreate-pipelinecreate-agentonboard-servicedora-metrics-reviewsetup-gitops-applicationchaos-resilience-testfeature-flag-rolloutmigrate-pipeline-to-templatedelegate-health-checkdeveloper-portal-scorecardpending-approvalsoptimize-costscloud-cost-breakdowncommitment-utilization-reviewcost-anomaly-investigationrightsizing-recommendationssecurity-reviewvulnerability-triagesbom-compliance-checksupply-chain-auditsecurity-exemption-reviewbulk-exemption-createaccess-control-auditcode-reviewpr-summarybranch-cleanup