harness-mcp-v2 3.0.6 → 3.0.8
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.
- package/README.md +107 -38
- package/build/client/types.d.ts +5 -0
- package/build/client/types.d.ts.map +1 -1
- package/build/data/schemas/v0/pipeline.d.ts.map +1 -1
- package/build/data/schemas/v0/pipeline.js +364 -231
- package/build/data/schemas/v0/pipeline.js.map +1 -1
- package/build/data/schemas/v0/template.d.ts.map +1 -1
- package/build/data/schemas/v0/template.js +553 -252
- package/build/data/schemas/v0/template.js.map +1 -1
- package/build/prompts/exempt-opa-failed-issues.d.ts +20 -0
- package/build/prompts/exempt-opa-failed-issues.d.ts.map +1 -0
- package/build/prompts/exempt-opa-failed-issues.js +298 -0
- package/build/prompts/exempt-opa-failed-issues.js.map +1 -0
- package/build/prompts/index.d.ts.map +1 -1
- package/build/prompts/index.js +2 -0
- package/build/prompts/index.js.map +1 -1
- package/build/registry/extractors.d.ts +45 -1
- package/build/registry/extractors.d.ts.map +1 -1
- package/build/registry/extractors.js +81 -3
- package/build/registry/extractors.js.map +1 -1
- package/build/registry/index.d.ts.map +1 -1
- package/build/registry/index.js +1 -0
- package/build/registry/index.js.map +1 -1
- package/build/registry/toolsets/chaos-descriptions.d.ts +70 -22
- package/build/registry/toolsets/chaos-descriptions.d.ts.map +1 -1
- package/build/registry/toolsets/chaos-descriptions.js +466 -21
- package/build/registry/toolsets/chaos-descriptions.js.map +1 -1
- package/build/registry/toolsets/chaos.d.ts.map +1 -1
- package/build/registry/toolsets/chaos.js +854 -81
- package/build/registry/toolsets/chaos.js.map +1 -1
- package/build/registry/toolsets/connectors.d.ts.map +1 -1
- package/build/registry/toolsets/connectors.js +2 -0
- package/build/registry/toolsets/connectors.js.map +1 -1
- package/build/registry/toolsets/dbops.d.ts.map +1 -1
- package/build/registry/toolsets/dbops.js +36 -0
- package/build/registry/toolsets/dbops.js.map +1 -1
- package/build/registry/toolsets/governance.d.ts.map +1 -1
- package/build/registry/toolsets/governance.js +26 -8
- package/build/registry/toolsets/governance.js.map +1 -1
- package/build/registry/toolsets/pull-requests.d.ts.map +1 -1
- package/build/registry/toolsets/pull-requests.js +23 -6
- package/build/registry/toolsets/pull-requests.js.map +1 -1
- package/build/registry/toolsets/secrets.d.ts.map +1 -1
- package/build/registry/toolsets/secrets.js +9 -0
- package/build/registry/toolsets/secrets.js.map +1 -1
- package/build/registry/toolsets/sto.d.ts.map +1 -1
- package/build/registry/toolsets/sto.js +182 -0
- package/build/registry/toolsets/sto.js.map +1 -1
- package/build/registry/toolsets/templates.d.ts.map +1 -1
- package/build/registry/toolsets/templates.js +1 -0
- package/build/registry/toolsets/templates.js.map +1 -1
- package/build/tools/harness-create.d.ts.map +1 -1
- package/build/tools/harness-create.js +4 -2
- package/build/tools/harness-create.js.map +1 -1
- package/build/tools/harness-delete.d.ts.map +1 -1
- package/build/tools/harness-delete.js +4 -2
- package/build/tools/harness-delete.js.map +1 -1
- package/build/tools/harness-execute.d.ts.map +1 -1
- package/build/tools/harness-execute.js +4 -2
- package/build/tools/harness-execute.js.map +1 -1
- package/build/tools/harness-update.d.ts.map +1 -1
- package/build/tools/harness-update.js +4 -2
- package/build/tools/harness-update.js.map +1 -1
- package/build/utils/elicitation.d.ts +4 -1
- package/build/utils/elicitation.d.ts.map +1 -1
- package/build/utils/elicitation.js +9 -1
- package/build/utils/elicitation.js.map +1 -1
- package/build/utils/log-resolver.d.ts.map +1 -1
- package/build/utils/log-resolver.js +42 -7
- package/build/utils/log-resolver.js.map +1 -1
- 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 11 consolidated tools and
|
|
3
|
+
An MCP (Model Context Protocol) server that gives AI agents full access to the Harness.io platform through 11 consolidated tools and 195 resource types.
|
|
4
4
|
|
|
5
5
|
## Why Use This MCP Server
|
|
6
6
|
|
|
@@ -8,10 +8,10 @@ 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
|
-
- **11 tools,
|
|
12
|
-
- **Full platform coverage.** 32 toolsets spanning CI/CD, GitOps, Feature Flags, Cloud Cost Management, Security Testing, Chaos Engineering, Database DevOps, Internal Developer Portal, Software Supply Chain, Governance, Service Overrides, Visualizations, and more.
|
|
11
|
+
- **11 tools, 195 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
|
+
- **Full platform coverage.** 32 default toolsets spanning CI/CD, GitOps, Feature Flags, Cloud Cost Management, Security Testing, Chaos Engineering, Database DevOps, Internal Developer Portal, Software Supply Chain, Governance, Service Overrides, Visualizations, and more. Opt-in IaCM coverage is available when you need Terraform workspace and module data.
|
|
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
|
+
- **32 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.
|
|
15
15
|
- **Works everywhere.** Stdio transport for local clients (Claude Desktop, Cursor, Windsurf), HTTP transport for remote/shared deployments, Docker and Kubernetes ready.
|
|
16
16
|
- **Zero-config start.** Just provide a Harness API key. Account ID is auto-extracted from PAT tokens, org/project defaults are optional, and toolset filtering lets you expose only what you need.
|
|
17
17
|
- **Extensible by design.** Adding a new Harness resource means adding a declarative data file — no new tool registration, no schema changes, no prompt updates.
|
|
@@ -528,7 +528,7 @@ The server automatically loads environment variables from a `.env` file in the p
|
|
|
528
528
|
| `HARNESS_MAX_BODY_SIZE_MB` | No | `10` | Max HTTP request body size in MB for `http` transport |
|
|
529
529
|
| `HARNESS_RATE_LIMIT_RPS` | No | `10` | Client-side request throttle (requests per second) to Harness APIs |
|
|
530
530
|
| `LOG_LEVEL` | No | `info` | Log verbosity: `debug`, `info`, `warn`, `error` |
|
|
531
|
-
| `HARNESS_TOOLSETS` | No | *(
|
|
531
|
+
| `HARNESS_TOOLSETS` | No | *(defaults)* | Comma-separated toolset list. Empty loads default toolsets. Supports `+name` to explicitly include opt-in toolsets and `-name` to remove defaults (see [Toolset Filtering](#toolset-filtering)) |
|
|
532
532
|
| `HARNESS_READ_ONLY` | No | `false` | Block all mutating operations (create, update, delete, execute). Only list and get are allowed. Useful for shared/demo environments |
|
|
533
533
|
| `HARNESS_AUTO_APPROVE_RISK` | No | `none` | Risk-based auto-approve threshold for autonomous workflows. Operations at or below this risk proceed without confirmation. Values: `none`, `low_write`, `medium_write`, `high_write`, `all`. See [Elicitation](#elicitation) |
|
|
534
534
|
| `HARNESS_SKIP_ELICITATION` | No | `false` | **Deprecated** — use `HARNESS_AUTO_APPROVE_RISK=all` instead. Kept for backward compatibility |
|
|
@@ -538,6 +538,12 @@ The server automatically loads environment variables from a `.env` file in the p
|
|
|
538
538
|
| `HARNESS_MCP_AUTH_TOKEN` | No | -- | Bearer token required on `/mcp` HTTP routes when set. Required by default when HTTP transport binds to a non-loopback host |
|
|
539
539
|
| `HARNESS_MCP_ALLOW_UNAUTHENTICATED_HTTP` | No | `false` | Explicitly allow unauthenticated HTTP transport on non-loopback binds. Use only behind another authenticated control |
|
|
540
540
|
| `HARNESS_MCP_LOG_FILE` | No | `~/.claude/harness-mcp.log` | File used for stdio disconnect/crash diagnostics when stderr may no longer be available |
|
|
541
|
+
| `HARNESS_AUDIT_FILE` | No | -- | Append audit events to a newline-delimited JSON file in addition to stderr |
|
|
542
|
+
| `HARNESS_AUDIT_WEBHOOK_URL` | No | -- | HTTPS endpoint that receives batched audit events. HTTP URLs require `HARNESS_ALLOW_HTTP=true` for local development |
|
|
543
|
+
| `HARNESS_AUDIT_WEBHOOK_TOKEN` | No | -- | Optional bearer token sent to the audit webhook |
|
|
544
|
+
| `HARNESS_AUDIT_WEBHOOK_BATCH_SIZE` | No | `10` | Number of audit events to batch before webhook flush |
|
|
545
|
+
| `HARNESS_AUDIT_WEBHOOK_FLUSH_MS` | No | `5000` | Max time to hold audit events before webhook flush |
|
|
546
|
+
| `OTEL_EXPORTER_OTLP_ENDPOINT` | No | -- | Enables OpenTelemetry audit spans when the optional OpenTelemetry packages are installed |
|
|
541
547
|
|
|
542
548
|
|
|
543
549
|
### HTTPS Enforcement
|
|
@@ -550,7 +556,13 @@ HARNESS_BASE_URL must use HTTPS (got "http://..."). If you need HTTP for local d
|
|
|
550
556
|
|
|
551
557
|
### Audit Logging
|
|
552
558
|
|
|
553
|
-
All write operations (`harness_create`, `harness_update`, `harness_delete`, `harness_execute`) emit structured audit
|
|
559
|
+
All write operations (`harness_create`, `harness_update`, `harness_delete`, `harness_execute`) emit structured audit events. The stderr sink is always active; additional sinks are enabled by configuration:
|
|
560
|
+
|
|
561
|
+
- `HARNESS_AUDIT_FILE` appends newline-delimited JSON events for local collection.
|
|
562
|
+
- `HARNESS_AUDIT_WEBHOOK_URL` posts batched events to an HTTPS webhook, optionally with `HARNESS_AUDIT_WEBHOOK_TOKEN`.
|
|
563
|
+
- `OTEL_EXPORTER_OTLP_ENDPOINT` enables audit spans when the optional OpenTelemetry packages are installed.
|
|
564
|
+
|
|
565
|
+
Each event includes the tool name, resource type, operation, identifiers, timestamp, and confirmation method. Audit sinks are best-effort telemetry; a webhook delivery issue is logged and does not retry or replay the mutating Harness operation.
|
|
554
566
|
|
|
555
567
|
## Tools Reference
|
|
556
568
|
|
|
@@ -558,6 +570,16 @@ The server exposes 11 MCP tools. Most API tools accept `org_id` and `project_id`
|
|
|
558
570
|
|
|
559
571
|
**URL support:** Most API-facing tools accept a `url` parameter — paste a Harness UI URL and the server auto-extracts org, project, resource type, resource ID, pipeline ID, and execution ID. `harness_describe` does not accept `url`.
|
|
560
572
|
|
|
573
|
+
**Scope support:** Resource types with account/org/project variants expose `supportedScopes` in `harness_describe`. Pass `resource_scope` when you need a specific level:
|
|
574
|
+
|
|
575
|
+
- `resource_scope: "account"` sends only `accountIdentifier`.
|
|
576
|
+
- `resource_scope: "org"` sends `accountIdentifier` and `orgIdentifier`.
|
|
577
|
+
- `resource_scope: "project"` sends account, org, and project identifiers.
|
|
578
|
+
|
|
579
|
+
Current multi-scope resources include `connector`, `service`, `environment`, `infrastructure`, `secret`, and `template`. If `resource_scope` is omitted, the registry uses the resource's default scope and configured defaults, except resources marked as optional scope may omit org/project unless explicitly passed. Harness URLs can also set the scope automatically when the path contains account-level or project-level context.
|
|
580
|
+
|
|
581
|
+
**Structured output:** Every tool declares an MCP `outputSchema`. `harness_list` normalizes list-like Harness responses into object-shaped structured content so strict clients can validate it: top-level arrays become `{ "items": [...], "total": <count>, "page": <page> }`, and common wrapper keys such as `content`, `data`, `body`, `objects`, or `features` are hoisted to `items` when needed. The text response still contains the compact JSON payload returned to all clients.
|
|
582
|
+
|
|
561
583
|
|
|
562
584
|
| Tool | Description |
|
|
563
585
|
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -613,7 +635,8 @@ The server exposes 11 MCP tools. Most API tools accept `org_id` and `project_id`
|
|
|
613
635
|
"resource_type": "pipeline",
|
|
614
636
|
"action": "run",
|
|
615
637
|
"resource_id": "my-pipeline",
|
|
616
|
-
"inputs": { "tag": "v1.2.3" }
|
|
638
|
+
"inputs": { "tag": "v1.2.3" },
|
|
639
|
+
"wait": true
|
|
617
640
|
}
|
|
618
641
|
```
|
|
619
642
|
|
|
@@ -766,7 +789,8 @@ Use this sequence to reduce execution-time input errors:
|
|
|
766
789
|
"action": "run",
|
|
767
790
|
"resource_id": "deploy_app",
|
|
768
791
|
"params": { "pipeline_branch": "feature/new-stage" },
|
|
769
|
-
"inputs": { "branch": "main" }
|
|
792
|
+
"inputs": { "branch": "main" },
|
|
793
|
+
"wait": true
|
|
770
794
|
}
|
|
771
795
|
```
|
|
772
796
|
4. **Optional: combine both**
|
|
@@ -774,6 +798,31 @@ Use this sequence to reduce execution-time input errors:
|
|
|
774
798
|
|
|
775
799
|
If required fields are unresolved, the tool returns a pre-flight error with expected keys and suggested input sets. You can inspect available shorthand mappings with `harness_describe(resource_type="pipeline")` (`executeActions.run.inputShorthands`).
|
|
776
800
|
|
|
801
|
+
### Pipeline Execute Wait Mode
|
|
802
|
+
|
|
803
|
+
For `pipeline.run`, `pipeline.retry`, and `pipeline_v1.run`, pass `wait: true` to let the server poll until the execution reaches a terminal status. This keeps a pipeline launch and status check in one tool call instead of asking the client or LLM to run a polling loop.
|
|
804
|
+
|
|
805
|
+
```json
|
|
806
|
+
{
|
|
807
|
+
"resource_type": "pipeline",
|
|
808
|
+
"action": "run",
|
|
809
|
+
"resource_id": "deploy_app",
|
|
810
|
+
"inputs": { "branch": "main" },
|
|
811
|
+
"wait": true,
|
|
812
|
+
"wait_timeout_seconds": 900,
|
|
813
|
+
"wait_poll_interval_seconds": 5
|
|
814
|
+
}
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
Wait mode behavior:
|
|
818
|
+
|
|
819
|
+
- Default timeout is 600 seconds; allowed range is 10 seconds to 7200 seconds.
|
|
820
|
+
- Initial poll interval defaults to 3 seconds, backs off by 1.5x, and caps at 30 seconds.
|
|
821
|
+
- On success or failure, the response includes fields such as `execution_id`, `execution_status`, `execution_terminal`, `execution_elapsed_ms`, and `execution_poll_count`.
|
|
822
|
+
- If the timeout fires, the original trigger still succeeded; the response includes `execution_timed_out: true` and `_wait.hint` with the last observed status.
|
|
823
|
+
- If polling fails after the trigger succeeds, the response includes `_wait.error` and a recheck hint. Do not blindly rerun the pipeline unless you have confirmed the first execution is not running.
|
|
824
|
+
- Failed terminal statuses include `_diagnose_hint` pointing to `harness_diagnose(resource_type="execution", options={execution_id: "..."})`.
|
|
825
|
+
|
|
777
826
|
**Ask the AI DevOps Agent to create a pipeline:**
|
|
778
827
|
|
|
779
828
|
```json
|
|
@@ -991,7 +1040,7 @@ Harness pipelines can be stored in three ways:
|
|
|
991
1040
|
|
|
992
1041
|
## Resource Types
|
|
993
1042
|
|
|
994
|
-
|
|
1043
|
+
195 resource types organized across 32 toolsets. Each resource type supports a subset of CRUD operations and optional execute actions.
|
|
995
1044
|
|
|
996
1045
|
### Platform
|
|
997
1046
|
|
|
@@ -1219,23 +1268,37 @@ Use `harness_execute(resource_type="pull_request", action="close", ...)` for an
|
|
|
1219
1268
|
### Chaos Engineering
|
|
1220
1269
|
|
|
1221
1270
|
|
|
1222
|
-
| Resource Type
|
|
1223
|
-
|
|
|
1224
|
-
| `chaos_experiment`
|
|
1225
|
-
| `
|
|
1226
|
-
| `
|
|
1227
|
-
| `
|
|
1228
|
-
| `
|
|
1229
|
-
| `
|
|
1230
|
-
| `
|
|
1231
|
-
| `
|
|
1232
|
-
| `
|
|
1233
|
-
| `
|
|
1234
|
-
| `
|
|
1235
|
-
| `
|
|
1236
|
-
| `
|
|
1237
|
-
| `
|
|
1238
|
-
| `
|
|
1271
|
+
| Resource Type | List | Get | Create | Update | Delete | Execute Actions |
|
|
1272
|
+
| ---------------------------- | ---- | --- | ------ | ------ | ------ | ---------------------- |
|
|
1273
|
+
| `chaos_experiment` | x | x | x | | x | `run`, `stop` |
|
|
1274
|
+
| `chaos_experiment_run` | | x | | | | |
|
|
1275
|
+
| `chaos_experiment_variable` | x | | | | | |
|
|
1276
|
+
| `chaos_component_variable` | | x | | | | |
|
|
1277
|
+
| `chaos_input_set` | x | x | x | x | x | |
|
|
1278
|
+
| `chaos_experiment_template` | x | x | | | x | `create_from_template` |
|
|
1279
|
+
| `chaos_probe` | x | x | x | | x | `enable`, `verify` |
|
|
1280
|
+
| `chaos_probe_in_run` | x | | | | | |
|
|
1281
|
+
| `chaos_probe_template` | x | x | | | x | |
|
|
1282
|
+
| `chaos_infrastructure` | x | | | | | |
|
|
1283
|
+
| `chaos_k8s_infrastructure` | x | x | | | | `check_health` |
|
|
1284
|
+
| `chaos_environment` | x | | | | | |
|
|
1285
|
+
| `chaos_hub` | x | x | x | x | x | |
|
|
1286
|
+
| `chaos_hub_fault` | x | | | | | |
|
|
1287
|
+
| `chaos_fault` | x | x | | | x | |
|
|
1288
|
+
| `chaos_fault_template` | x | x | | | x | |
|
|
1289
|
+
| `chaos_fault_experiment_run` | x | | | | | |
|
|
1290
|
+
| `chaos_action` | x | x | | | x | |
|
|
1291
|
+
| `chaos_action_template` | x | x | | | x | |
|
|
1292
|
+
| `chaos_loadtest` | x | x | x | | x | `run`, `stop` |
|
|
1293
|
+
| `chaos_application_map` | x | x | | | | |
|
|
1294
|
+
| `discovered_namespace` | x | | | | | |
|
|
1295
|
+
| `discovered_service` | x | | | | | |
|
|
1296
|
+
| `discovered_network_map` | x | | | | | |
|
|
1297
|
+
| `chaos_guard_condition` | x | x | | | x | |
|
|
1298
|
+
| `chaos_guard_rule` | x | x | | | x | `enable` |
|
|
1299
|
+
| `chaos_recommendation` | x | x | | | | |
|
|
1300
|
+
| `chaos_risk` | x | x | | | | |
|
|
1301
|
+
| `chaos_dr_test` | x | | x | | | |
|
|
1239
1302
|
|
|
1240
1303
|
|
|
1241
1304
|
### Cloud Cost Management (CCM)
|
|
@@ -1446,15 +1509,15 @@ Inline PNG chart visualizations rendered from Harness data. These are metadata-o
|
|
|
1446
1509
|
|
|
1447
1510
|
## Toolset Filtering
|
|
1448
1511
|
|
|
1449
|
-
By default, 32 of 33 toolsets are enabled.
|
|
1512
|
+
By default, 32 of 33 toolsets are enabled. The `iacm` toolset is opt-in because Harness IaCM APIs are project-scoped and add Terraform workspace/module concepts that many users do not need. The `ai-evals` toolset is default-enabled.
|
|
1450
1513
|
|
|
1451
1514
|
### Adding toolsets with `+` prefix
|
|
1452
1515
|
|
|
1453
|
-
Use the `+` prefix to explicitly include toolsets alongside all defaults
|
|
1516
|
+
Use the `+` prefix to explicitly include opt-in toolsets alongside all defaults:
|
|
1454
1517
|
|
|
1455
1518
|
```bash
|
|
1456
|
-
# Explicitly include
|
|
1457
|
-
HARNESS_TOOLSETS=+
|
|
1519
|
+
# Explicitly include IaCM alongside all defaults
|
|
1520
|
+
HARNESS_TOOLSETS=+iacm
|
|
1458
1521
|
```
|
|
1459
1522
|
|
|
1460
1523
|
### Removing default toolsets
|
|
@@ -1469,8 +1532,8 @@ HARNESS_TOOLSETS=-chaos,-ccm
|
|
|
1469
1532
|
### Combining + and -
|
|
1470
1533
|
|
|
1471
1534
|
```bash
|
|
1472
|
-
# Add
|
|
1473
|
-
HARNESS_TOOLSETS=+
|
|
1535
|
+
# Add IaCM, remove chaos
|
|
1536
|
+
HARNESS_TOOLSETS=+iacm,-chaos
|
|
1474
1537
|
```
|
|
1475
1538
|
|
|
1476
1539
|
### Explicit allowlist
|
|
@@ -1506,7 +1569,7 @@ Available toolset names:
|
|
|
1506
1569
|
| `pull-requests` | pull_request, pr_reviewer, pr_comment, pr_check, pr_activity |
|
|
1507
1570
|
| `feature-flags` | fme_workspace, fme_environment, fme_feature_flag, fme_feature_flag_definition, fme_rollout_status, fme_rule_based_segment, fme_rule_based_segment_definition, feature_flag |
|
|
1508
1571
|
| `gitops` | gitops_agent, gitops_application, gitops_cluster, gitops_repository, gitops_applicationset, gitops_repo_credential, gitops_app_event, gitops_pod_log, gitops_managed_resource, gitops_resource_action, gitops_dashboard, gitops_app_resource_tree |
|
|
1509
|
-
| `chaos` | chaos_experiment,
|
|
1572
|
+
| `chaos` | chaos_experiment, chaos_experiment_run, chaos_experiment_variable, chaos_component_variable, chaos_input_set, chaos_experiment_template, chaos_probe, chaos_probe_in_run, chaos_probe_template, chaos_infrastructure, chaos_k8s_infrastructure, chaos_environment, chaos_hub, chaos_hub_fault, chaos_fault, chaos_fault_template, chaos_fault_experiment_run, chaos_action, chaos_action_template, chaos_loadtest, chaos_application_map, discovered_namespace, discovered_service, discovered_network_map, chaos_guard_condition, chaos_guard_rule, chaos_recommendation, chaos_risk, chaos_dr_test |
|
|
1510
1573
|
| `ccm` | cost_perspective, cost_breakdown, cost_timeseries, cost_summary, cost_recommendation, cost_anomaly, cost_anomaly_summary, cost_category, cost_account_overview, cost_filter_value, cost_recommendation_stats, cost_recommendation_detail, cost_commitment |
|
|
1511
1574
|
| `sei` | sei_metric, sei_productivity_metric, sei_dora_metric, sei_team, sei_team_detail, sei_org_tree, sei_org_tree_detail, sei_business_alignment, sei_ai_usage, sei_ai_adoption, sei_ai_impact, sei_ai_raw_metric |
|
|
1512
1575
|
| `scs` | scs_artifact_source, artifact_security, scs_artifact_component, scs_artifact_remediation, scs_chain_of_custody, scs_compliance_result, code_repo_security, scs_sbom |
|
|
@@ -1519,6 +1582,7 @@ Available toolset names:
|
|
|
1519
1582
|
| `settings` | setting |
|
|
1520
1583
|
| `visualizations` | visual_timeline, visual_stage_flow, visual_health_dashboard, visual_pie_chart, visual_bar_chart, visual_timeseries, visual_architecture |
|
|
1521
1584
|
| `ai-evals` | eval_dataset, eval_dataset_item, evaluation, eval_run, eval_run_item, eval_run_by_eval, eval_metric, eval_metric_set, eval_metric_set_entry, eval_suite, eval_suite_evaluation, eval_suite_run, eval_target, eval_model, eval_annotation, eval_analytics, eval_git_settings, eval_registry_item |
|
|
1585
|
+
| `iacm` *(opt-in)* | iacm_workspace, iacm_resource, iacm_module, iacm_workspace_costs, iacm_activity_resource_change |
|
|
1522
1586
|
|
|
1523
1587
|
|
|
1524
1588
|
## Architecture
|
|
@@ -1537,7 +1601,7 @@ Available toolset names:
|
|
|
1537
1601
|
+--------v---------+
|
|
1538
1602
|
| Registry | <-- Declarative resource definitions
|
|
1539
1603
|
| 32 Toolsets | (data files, not code)
|
|
1540
|
-
|
|
|
1604
|
+
| 195 Resource Types|
|
|
1541
1605
|
+--------+---------+
|
|
1542
1606
|
|
|
|
1543
1607
|
+--------v---------+
|
|
@@ -1553,10 +1617,11 @@ Available toolset names:
|
|
|
1553
1617
|
|
|
1554
1618
|
1. **Tools** are generic verbs: `harness_list`, `harness_get`, etc. They accept a `resource_type` parameter that routes to the correct API endpoint.
|
|
1555
1619
|
2. **The Registry** maps each `resource_type` to a `ResourceDefinition` — a declarative data structure specifying the HTTP method, URL path, path/query parameter mappings, and response extraction logic.
|
|
1556
|
-
3. **Dispatch** resolves the resource definition, builds the HTTP request (path substitution, query params,
|
|
1620
|
+
3. **Dispatch** resolves the resource definition, builds the HTTP request (path substitution, query params, `resource_scope`-aware account/org/project injection), calls the Harness API through `HarnessClient`, and extracts the relevant response data.
|
|
1557
1621
|
4. **Toolset filtering** (`HARNESS_TOOLSETS`) controls which resource definitions are loaded into the registry at startup.
|
|
1558
|
-
5. **
|
|
1559
|
-
6. **
|
|
1622
|
+
5. **Structured output** is declared with MCP `outputSchema`; `harness_list` coerces arrays and common list wrappers into object-shaped `structuredContent` for strict clients.
|
|
1623
|
+
6. **Deep links** are automatically appended to responses, providing direct Harness UI URLs for every resource.
|
|
1624
|
+
7. **Compact mode** strips verbose metadata from list results, keeping only actionable fields (identity, status, type, timestamps, deep links) to minimize token usage.
|
|
1560
1625
|
|
|
1561
1626
|
### Adding a New Resource Type
|
|
1562
1627
|
|
|
@@ -1643,7 +1708,7 @@ src/
|
|
|
1643
1708
|
ccm.ts
|
|
1644
1709
|
access-control.ts
|
|
1645
1710
|
...
|
|
1646
|
-
tools/ #
|
|
1711
|
+
tools/ # 11 generic MCP tools
|
|
1647
1712
|
harness-list.ts
|
|
1648
1713
|
harness-get.ts
|
|
1649
1714
|
harness-create.ts
|
|
@@ -1654,6 +1719,7 @@ src/
|
|
|
1654
1719
|
harness-diagnose.ts
|
|
1655
1720
|
harness-describe.ts
|
|
1656
1721
|
harness-status.ts
|
|
1722
|
+
harness-schema.ts
|
|
1657
1723
|
|
|
1658
1724
|
resources/ # MCP resource providers
|
|
1659
1725
|
pipeline-yaml.ts
|
|
@@ -1820,10 +1886,13 @@ The Harness MCP server pairs well with **[Harness Skills](https://github.com/har
|
|
|
1820
1886
|
| HTTP `Invalid request` | Invalid JSON body or request body exceeded `HARNESS_MAX_BODY_SIZE_MB` | Validate JSON payload size/shape; increase `HARNESS_MAX_BODY_SIZE_MB` if needed |
|
|
1821
1887
|
| `Unknown resource_type "..."` from tools | Resource type is misspelled or filtered out via `HARNESS_TOOLSETS` | Call `harness_describe` (with optional `search_term`) to discover valid types |
|
|
1822
1888
|
| `Missing required field "... for path parameter ..."` | A project/org scoped call is missing identifiers | Set `HARNESS_ORG`/`HARNESS_PROJECT` or pass `org_id`/`project_id` per tool call |
|
|
1889
|
+
| `resource_scope "org" requires org_id...` or `resource_scope "project" requires project_id...` | A multi-scope resource was forced to org/project scope without enough identifiers | Pass the missing `org_id`/`project_id`, configure `HARNESS_ORG`/`HARNESS_PROJECT`, or use `resource_scope: "account"` when supported |
|
|
1823
1890
|
| `Read-only mode is enabled ... operations are not allowed` | `HARNESS_READ_ONLY=true` blocks create/update/delete/execute | Set `HARNESS_READ_ONLY=false` if write operations are intended |
|
|
1824
1891
|
| Pipeline run fails pre-flight with unresolved required inputs | Provided `inputs` did not cover required runtime placeholders | Fetch `runtime_input_template`, supply missing simple keys, or use `input_set_ids` for structural inputs |
|
|
1825
1892
|
| Pipeline CI shorthand (`branch`, `tag`, `pr_number`, `commit_sha`) did not apply | `inputs.build` was already provided, so shorthand expansion was intentionally skipped | Remove `inputs.build` to use shorthand expansion, or keep full explicit `build` structure |
|
|
1826
1893
|
| Pipeline run loaded the wrong YAML revision | The pipeline definition is stored in Git and the run did not specify the desired pipeline branch | Pass `params.pipeline_branch` on the `run` action; this maps to Harness `pipelineBranchName` |
|
|
1894
|
+
| `wait: true` returned `_wait.error` | The pipeline trigger succeeded, but server-side polling failed | Recheck the `execution_id` with `harness_get(resource_type="execution", ...)` before deciding whether to rerun |
|
|
1895
|
+
| `wait: true` returned `execution_timed_out: true` | The execution did not reach a terminal status before `wait_timeout_seconds` | Use the returned `execution_id` to recheck status or diagnose the still-running execution |
|
|
1827
1896
|
| Execution logs are empty or blob downloads return 403 | Harness-hosted log blob URLs require the configured Harness client/auth path, especially for internal or self-managed hosts | Keep `HARNESS_BASE_URL` pointed at the target Harness host and use `harness_get(resource_type="execution_log", ...)` or `harness_diagnose(..., include_logs=true)` rather than bypassing the MCP client |
|
|
1828
1897
|
| `Operation declined by user` | User declined the elicitation confirmation dialog | The user chose not to proceed — verify the operation details and retry if intended |
|
|
1829
1898
|
| `body.template_yaml (or body.yaml) is required` for template create/update | Template APIs expect full YAML payload | Provide full `template_yaml` string in `body`; for deletes, pass `version_label` to delete one version (omit to delete all versions) |
|
package/build/client/types.d.ts
CHANGED
|
@@ -58,5 +58,10 @@ export interface RequestOptions {
|
|
|
58
58
|
/** Retry policy from OperationPolicy. When "do_not_retry", transient errors
|
|
59
59
|
* (5xx, timeouts) throw immediately instead of retrying. */
|
|
60
60
|
retryPolicy?: "safe" | "idempotency_key_required" | "do_not_retry";
|
|
61
|
+
/** Internal tracing metadata. Never serialized into HTTP headers/query/body. */
|
|
62
|
+
tracing?: {
|
|
63
|
+
/** API name that produced this concrete request path. */
|
|
64
|
+
route?: string;
|
|
65
|
+
};
|
|
61
66
|
}
|
|
62
67
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+CAA+C;AAC/C,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,yDAAyD;AACzD,MAAM,WAAW,mBAAmB,CAAC,CAA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,CAAC,MAAM,EAAE,GAAG,
|
|
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,CA0sjH/B,CAAC;AACF,eAAe,MAAM,CAAC"}
|