harness-mcp-v2 0.9.4 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +9 -5
  2. package/build/data/schemas/v0/pipeline.d.ts.map +1 -1
  3. package/build/data/schemas/v0/pipeline.js +219 -1
  4. package/build/data/schemas/v0/pipeline.js.map +1 -1
  5. package/build/data/schemas/v0/template.d.ts.map +1 -1
  6. package/build/data/schemas/v0/template.js +219 -1
  7. package/build/data/schemas/v0/template.js.map +1 -1
  8. package/build/data/schemas/v0/trigger.d.ts.map +1 -1
  9. package/build/data/schemas/v0/trigger.js +67 -92
  10. package/build/data/schemas/v0/trigger.js.map +1 -1
  11. package/build/data/schemas/v1/pipeline.d.ts.map +1 -1
  12. package/build/data/schemas/v1/pipeline.js +2 -1
  13. package/build/data/schemas/v1/pipeline.js.map +1 -1
  14. package/build/data/schemas/v1/template.d.ts.map +1 -1
  15. package/build/data/schemas/v1/template.js +2 -1
  16. package/build/data/schemas/v1/template.js.map +1 -1
  17. package/build/data/schemas/v1/trigger.d.ts.map +1 -1
  18. package/build/data/schemas/v1/trigger.js +67 -96
  19. package/build/data/schemas/v1/trigger.js.map +1 -1
  20. package/build/index.js +13 -2
  21. package/build/index.js.map +1 -1
  22. package/build/registry/index.d.ts.map +1 -1
  23. package/build/registry/index.js +12 -5
  24. package/build/registry/index.js.map +1 -1
  25. package/build/registry/toolsets/ccm.d.ts.map +1 -1
  26. package/build/registry/toolsets/ccm.js +36 -1
  27. package/build/registry/toolsets/ccm.js.map +1 -1
  28. package/build/registry/types.d.ts +1 -1
  29. package/build/registry/types.d.ts.map +1 -1
  30. package/build/tools/harness-create.d.ts.map +1 -1
  31. package/build/tools/harness-create.js +3 -2
  32. package/build/tools/harness-create.js.map +1 -1
  33. package/build/tools/harness-update.d.ts.map +1 -1
  34. package/build/tools/harness-update.js +3 -2
  35. package/build/tools/harness-update.js.map +1 -1
  36. package/build/utils/cli.d.ts +1 -0
  37. package/build/utils/cli.d.ts.map +1 -1
  38. package/build/utils/cli.js +23 -6
  39. package/build/utils/cli.js.map +1 -1
  40. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Harness MCP Server 2.0
2
2
 
3
- An MCP (Model Context Protocol) server that gives AI agents full access to the Harness.io platform through 10 consolidated tools and 163 resource types.
3
+ An MCP (Model Context Protocol) server that gives AI agents full access to the Harness.io platform through 11 consolidated tools and 163 resource types.
4
4
 
5
5
  ## Why Use This MCP Server
6
6
 
@@ -8,7 +8,7 @@ Most MCP servers map one tool per API endpoint. For a platform as broad as Harne
8
8
 
9
9
  This server is built differently:
10
10
 
11
- - **10 tools, 163 resource types.** A registry-based dispatch system routes `harness_list`, `harness_get`, `harness_create`, etc. to any Harness resource — pipelines, services, environments, orgs, projects, feature flags, cost data, and more. The LLM picks from 10 tools instead of hundreds.
11
+ - **11 tools, 163 resource types.** A registry-based dispatch system routes `harness_list`, `harness_get`, `harness_create`, etc. to any Harness resource — pipelines, services, environments, orgs, projects, feature flags, cost data, and more. The LLM picks from 11 tools instead of hundreds.
12
12
  - **Full platform coverage.** 31 toolsets spanning CI/CD, GitOps, Feature Flags, Cloud Cost Management, Security Testing, Chaos Engineering, Internal Developer Portal, Software Supply Chain, Governance, Service Overrides, Visualizations, and more. Not just pipelines — the entire Harness platform.
13
13
  - **Multi-project workflows out of the box.** Agents discover organizations and projects dynamically — no hardcoded env vars needed. Ask "show failed executions across all projects" and the agent can navigate the full account hierarchy.
14
14
  - **27 prompt templates.** Pre-built prompts for common workflows: build & deploy apps end-to-end, debug failed pipelines, review DORA metrics, triage vulnerabilities, optimize cloud costs, audit access control, plan feature flag rollouts, review pull requests, approve pending pipelines, and more.
@@ -131,6 +131,7 @@ Operational constraints in HTTP mode:
131
131
  - Idle sessions are reaped after 30 minutes.
132
132
  - `GET /health` is the only non-MCP endpoint.
133
133
  - Request body size is capped by `HARNESS_MAX_BODY_SIZE_MB` (default `10` MB).
134
+ - Set `x-harness-pipeline-version: 0` or `1` on the `initialize` request to select V0 or V1 pipeline resources for that HTTP session.
134
135
 
135
136
  ```bash
136
137
  # Health check
@@ -518,11 +519,12 @@ The server automatically loads environment variables from a `.env` file in the p
518
519
  | `HARNESS_MAX_BODY_SIZE_MB` | No | `10` | Max HTTP request body size in MB for `http` transport |
519
520
  | `HARNESS_RATE_LIMIT_RPS` | No | `10` | Client-side request throttle (requests per second) to Harness APIs |
520
521
  | `LOG_LEVEL` | No | `info` | Log verbosity: `debug`, `info`, `warn`, `error` |
521
- | `HARNESS_TOOLSETS` | No | *(all)* | Comma-separated toolset list. Supports `+name` to add opt-in toolsets and `-name` to remove defaults (see [Toolset Filtering](#toolset-filtering)) |
522
+ | `HARNESS_TOOLSETS` | No | *(defaults)* | Comma-separated toolset list. Empty loads default toolsets and excludes opt-in toolsets such as `ai-evals`. Supports `+name` to add opt-in toolsets and `-name` to remove defaults (see [Toolset Filtering](#toolset-filtering)) |
522
523
  | `HARNESS_READ_ONLY` | No | `false` | Block all mutating operations (create, update, delete, execute). Only list and get are allowed. Useful for shared/demo environments |
523
524
  | `HARNESS_SKIP_ELICITATION` | No | `false` | Skip all elicitation confirmation prompts. When `true`, write and delete operations proceed without user approval — enabling fully autonomous agent workflows. See [Elicitation](#elicitation) |
524
525
  | `HARNESS_ALLOW_HTTP` | No | `false` | Allow non-HTTPS `HARNESS_BASE_URL`. By default, the server enforces HTTPS for security. Set to `true` only for local development against a non-TLS Harness instance |
525
- | `HARNESS_PIPELINE_VERSION` | No | `0` | **(Alpha)** Pipeline YAML version. Set to `"1"` to guide agents toward `pipeline_v1` (V1 YAML format) for pipeline operations. Both `pipeline` (V0) and `pipeline_v1` (V1) resource types are always available regardless of this setting |
526
+ | `HARNESS_PIPELINE_VERSION` | No | `0` | **(Alpha)** Pipeline YAML version. `0` loads the `pipeline` resource type and excludes `pipeline_v1`; `1` loads `pipeline_v1` and excludes `pipeline`. HTTP sessions can override this at initialize time with `x-harness-pipeline-version: 0` or `1` |
527
+ | `HARNESS_MCP_LOG_FILE` | No | `~/.claude/harness-mcp.log` | File used for stdio disconnect/crash diagnostics when stderr may no longer be available |
526
528
 
527
529
  ### HTTPS Enforcement
528
530
 
@@ -947,6 +949,8 @@ Harness pipelines can be stored in three ways:
947
949
  | `approval_instance` | x | | | | | `approve`, `reject` |
948
950
 
949
951
 
952
+ Only one pipeline YAML resource type is loaded at startup. By default `HARNESS_PIPELINE_VERSION=0` exposes `pipeline` and hides `pipeline_v1`; set `HARNESS_PIPELINE_VERSION=1` to expose `pipeline_v1` and hide `pipeline`. In HTTP mode, include `x-harness-pipeline-version: 0` or `1` on the `initialize` request to choose the version for that session.
953
+
950
954
  ### AI Agents
951
955
 
952
956
 
@@ -1436,7 +1440,7 @@ Available toolset names:
1436
1440
  | MCP (stdio or HTTP)
1437
1441
  +--------v---------+
1438
1442
  | MCP Server |
1439
- | 10 Generic Tools |
1443
+ | 11 Generic Tools |
1440
1444
  +--------+---------+
1441
1445
  |
1442
1446
  +--------v---------+
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../src/data/schemas/v0/pipeline.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAmq/G/B,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../src/data/schemas/v0/pipeline.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CA63/G/B,CAAC;AACF,eAAe,MAAM,CAAC"}
@@ -28916,7 +28916,24 @@ const schema = {
28916
28916
  "type": "object",
28917
28917
  "properties": {
28918
28918
  "size": {
28919
- "type": "string"
28919
+ "oneOf": [
28920
+ {
28921
+ "type": "string",
28922
+ "enum": [
28923
+ "xsmall",
28924
+ "flex",
28925
+ "small",
28926
+ "medium",
28927
+ "large",
28928
+ "xlarge",
28929
+ "xxlarge",
28930
+ "xxxlarge"
28931
+ ]
28932
+ },
28933
+ {
28934
+ "$ref": "#/definitions/pipeline/steps/common/common-jexl"
28935
+ }
28936
+ ]
28920
28937
  },
28921
28938
  "imageName": {
28922
28939
  "type": "string"
@@ -77388,6 +77405,204 @@ const schema = {
77388
77405
  }
77389
77406
  }
77390
77407
  },
77408
+ "AsgScaleStepNode": {
77409
+ "title": "AsgScaleStepNode",
77410
+ "type": "object",
77411
+ "required": [
77412
+ "identifier",
77413
+ "name",
77414
+ "type"
77415
+ ],
77416
+ "properties": {
77417
+ "description": {
77418
+ "type": "string",
77419
+ "desc": "This is the description for AsgScaleStepNode"
77420
+ },
77421
+ "enforce": {
77422
+ "$ref": "#/definitions/pipeline/common/PolicyConfig"
77423
+ },
77424
+ "failureStrategies": {
77425
+ "oneOf": [
77426
+ {
77427
+ "type": "array",
77428
+ "items": {
77429
+ "$ref": "#/definitions/pipeline/common/FailureStrategyConfig"
77430
+ }
77431
+ },
77432
+ {
77433
+ "type": "string",
77434
+ "pattern": "^<\\+input>$",
77435
+ "minLength": 1
77436
+ }
77437
+ ]
77438
+ },
77439
+ "identifier": {
77440
+ "type": "string",
77441
+ "pattern": "^[a-zA-Z_][0-9a-zA-Z_]{0,127}$"
77442
+ },
77443
+ "name": {
77444
+ "type": "string",
77445
+ "pattern": "^[a-zA-Z_0-9-.][-0-9a-zA-Z_\\s.]{0,127}$"
77446
+ },
77447
+ "strategy": {
77448
+ "oneOf": [
77449
+ {
77450
+ "$ref": "#/definitions/pipeline/common/StrategyConfig"
77451
+ },
77452
+ {
77453
+ "type": "string",
77454
+ "pattern": "^<\\+input>$",
77455
+ "minLength": 1
77456
+ }
77457
+ ]
77458
+ },
77459
+ "timeout": {
77460
+ "type": "string",
77461
+ "pattern": "^(([1-9])+\\d+[s])|(((([1-9])+\\d*[mhwd])+([\\s]?\\d+[smhwd])*)|(.*<\\+.*>(?!.*\\.executionInput\\(\\)).*)|(^$))$"
77462
+ },
77463
+ "type": {
77464
+ "type": "string",
77465
+ "enum": [
77466
+ "AsgScale"
77467
+ ]
77468
+ },
77469
+ "when": {
77470
+ "oneOf": [
77471
+ {
77472
+ "$ref": "#/definitions/pipeline/common/StepWhenCondition"
77473
+ },
77474
+ {
77475
+ "type": "string",
77476
+ "pattern": "^<\\+input>$",
77477
+ "minLength": 1
77478
+ }
77479
+ ]
77480
+ }
77481
+ },
77482
+ "$schema": "http://json-schema.org/draft-07/schema#",
77483
+ "allOf": [
77484
+ {
77485
+ "if": {
77486
+ "properties": {
77487
+ "type": {
77488
+ "const": "AsgScale"
77489
+ }
77490
+ }
77491
+ },
77492
+ "then": {
77493
+ "properties": {
77494
+ "spec": {
77495
+ "$ref": "#/definitions/pipeline/steps/cd/AsgScaleStepInfo"
77496
+ }
77497
+ }
77498
+ }
77499
+ }
77500
+ ]
77501
+ },
77502
+ "AsgScaleStepInfo": {
77503
+ "title": "AsgScaleStepInfo",
77504
+ "allOf": [
77505
+ {
77506
+ "$ref": "#/definitions/pipeline/common/StepSpecType"
77507
+ },
77508
+ {
77509
+ "type": "object",
77510
+ "required": [
77511
+ "instanceSelection"
77512
+ ],
77513
+ "properties": {
77514
+ "connectorRef": {
77515
+ "type": "string"
77516
+ },
77517
+ "region": {
77518
+ "type": "string"
77519
+ },
77520
+ "asgName": {
77521
+ "type": "string"
77522
+ },
77523
+ "instanceSelection": {
77524
+ "$ref": "#/definitions/pipeline/steps/cd/Capacity"
77525
+ },
77526
+ "skipSteadyStateCheck": {
77527
+ "oneOf": [
77528
+ {
77529
+ "type": "boolean"
77530
+ },
77531
+ {
77532
+ "type": "string",
77533
+ "pattern": "(<\\+.+>.*)",
77534
+ "minLength": 1
77535
+ }
77536
+ ]
77537
+ },
77538
+ "delegateSelectors": {
77539
+ "oneOf": [
77540
+ {
77541
+ "type": "array",
77542
+ "items": {
77543
+ "type": "string"
77544
+ }
77545
+ },
77546
+ {
77547
+ "type": "string",
77548
+ "pattern": "(<\\+.+>.*)",
77549
+ "minLength": 1
77550
+ }
77551
+ ]
77552
+ }
77553
+ }
77554
+ }
77555
+ ],
77556
+ "$schema": "http://json-schema.org/draft-07/schema#",
77557
+ "type": "object",
77558
+ "required": [
77559
+ "instanceSelection"
77560
+ ],
77561
+ "properties": {
77562
+ "connectorRef": {
77563
+ "type": "string"
77564
+ },
77565
+ "region": {
77566
+ "type": "string"
77567
+ },
77568
+ "asgName": {
77569
+ "type": "string"
77570
+ },
77571
+ "instanceSelection": {
77572
+ "$ref": "#/definitions/pipeline/steps/cd/Capacity"
77573
+ },
77574
+ "skipSteadyStateCheck": {
77575
+ "oneOf": [
77576
+ {
77577
+ "type": "boolean"
77578
+ },
77579
+ {
77580
+ "type": "string",
77581
+ "pattern": "(<\\+.+>.*)",
77582
+ "minLength": 1
77583
+ }
77584
+ ]
77585
+ },
77586
+ "delegateSelectors": {
77587
+ "oneOf": [
77588
+ {
77589
+ "type": "array",
77590
+ "items": {
77591
+ "type": "string"
77592
+ }
77593
+ },
77594
+ {
77595
+ "type": "string",
77596
+ "pattern": "(<\\+.+>.*)",
77597
+ "minLength": 1
77598
+ }
77599
+ ]
77600
+ },
77601
+ "description": {
77602
+ "desc": "This is the description for AsgScaleStepInfo"
77603
+ }
77604
+ }
77605
+ },
77391
77606
  "AsgBlueGreenDeployStepNode": {
77392
77607
  "title": "AsgBlueGreenDeployStepNode",
77393
77608
  "type": "object",
@@ -100922,6 +101137,9 @@ const schema = {
100922
101137
  {
100923
101138
  "$ref": "#/definitions/pipeline/steps/cd/EcsScaleStepNode"
100924
101139
  },
101140
+ {
101141
+ "$ref": "#/definitions/pipeline/steps/cd/AsgScaleStepNode"
101142
+ },
100925
101143
  {
100926
101144
  "$ref": "#/definitions/pipeline/steps/cd/AsgBlueGreenDeployStepNode"
100927
101145
  },