{"id":29358352,"url":"https://github.com/harness/mcp-server","last_synced_at":"2026-05-15T18:07:15.521Z","repository":{"id":295874344,"uuid":"983627253","full_name":"harness/mcp-server","owner":"harness","description":"This is the official repo for the Harness MCP server","archived":false,"fork":false,"pushed_at":"2025-07-03T07:09:19.000Z","size":24000,"stargazers_count":8,"open_issues_count":5,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T08:25:01.214Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harness.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-14T17:04:13.000Z","updated_at":"2025-06-30T17:43:55.000Z","dependencies_parsed_at":"2025-06-11T03:21:41.976Z","dependency_job_id":"a89b9ffb-1c1e-4203-a447-a77b3f742ed7","html_url":"https://github.com/harness/mcp-server","commit_stats":null,"previous_names":["harness/mcp-server"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/harness/mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fmcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fmcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fmcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fmcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harness","download_url":"https://codeload.github.com/harness/mcp-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fmcp-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264411050,"owners_count":23603797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-09T07:00:15.764Z","updated_at":"2026-05-15T18:07:10.460Z","avatar_url":"https://github.com/harness.png","language":"Go","funding_links":[],"categories":["Developer Tools","Official Servers","⚙️ DevOps","Other"],"sub_categories":["CI/CD \u0026 DevOps"],"readme":"# Harness MCP Server\n\nThe Harness MCP Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that provides seamless integration with Harness APIs, enabling advanced automation and interaction capabilities for developers and tools.\n\n## Components\n\n### Tools\n\nThe server implements several toolsets:\n\n#### Pipelines Toolset \n\nToolset Name: `pipelines`\n\n- `get_pipeline`: Get details of a specific pipeline\n- `list_pipelines`: List pipelines in a repository\n- `get_execution`: Get details of a specific pipeline execution\n- `list_executions`: List pipeline executions\n- `fetch_execution_url`: Fetch the execution URL for a pipeline execution\n\n#### Pull Requests Toolset\n\nToolset Name: `pullrequests`\n\n- `get_pull_request`: Get details of a specific pull request\n- `list_pull_requests`: List pull requests in a repository\n- `get_pull_request_checks`: Get status checks for a specific pull request\n- `get_pull_request_activities`: Get activities and comments for a specific pull request\n- `create_pull_request`: Create a new pull request\n\n#### Repositories Toolset\n\nToolset Name: `repositories`\n\n- `get_repository`: Get details of a specific repository\n- `list_repositories`: List repositories\n\n#### Registries Toolset\n\nToolset Name: `registries`\n\n- `get_registry`: Get details of a specific registry in Harness artifact registry\n- `list_artifact_files`: List files for a specific artifact version in a Harness artifact registry\n- `list_artifact_versions`: List artifact versions in a Harness artifact registry\n- `list_artifacts`: List artifacts in a Harness artifact registry\n- `list_registries`: List registries in Harness artifact registry\n\n#### Dashboards Toolset\n\nToolset Name: `dashboards`\n\n- `list_dashboards`: Lists all available Harness dashboards\n- `get_dashboard_data`: Retrieves the data from a specific Harness dashboard\n\n#### Cloud Cost Management Toolset\n\nToolset Name: `cloudcostmanagement`\n\n- `get_ccm_overview`: Retrieve the cost overview for a specific account.\n- `list_ccm_cost_categories`:  List all cost categories names for a specified account.\n- `list_ccm_cost_categories_detail`:  List all cost categories details for a specified account.\n- `get_ccm_cost_category`:  Retrieve a cost category detail by Id  for a specified account.\n\n#### Chaos Engineering Toolset\n\nToolset Name: `chaos`\n\n- `chaos_experiments_list`: List all the chaos experiments for a specific account.\n- `chaos_experiment_describe`: Get details of a specific chaos experiment.\n- `chaos_experiment_run`:  Run a specific chaos experiment.\n- `chaos_experiment_run_result`:  Get the result of a specific chaos experiment run.\n\n#### Logs Toolset\n\nToolset Name: `logs`\n\n- `download_execution_logs`: Download logs for a pipeline execution\n\n## Prerequisites\n\n1. You will need to have Go 1.23 or later installed on your system.\n2. A Harness API key for authentication.\n\n## Quickstart\n\n## Makefile Usage\n\nThis project provides a `Makefile` to simplify common development tasks. The main targets are:\n\n- `make build` – Build the mcp-server binary with version information embedded.\n- `make init` – Set up git hooks and submodules for pre-commit checks.\n- `make dep` – Download Go module dependencies.\n- `make tools` – Install tools required for the build (if any are specified).\n- `make format` – Format Go code using goimports and gci.\n\nYou can run any of these commands from the project root. For example:\n\n```sh\nmake build\nmake format\n```\n\n\n### Build from Source\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/harness/mcp-server.git\ncd mcp-server\n```\n\n2. Build the binary:\n```bash\ngo build -o cmd/harness-mcp-server/harness-mcp-server ./cmd/harness-mcp-server\n```\n\n3. Run the server:\n```bash\nHARNESS_API_KEY=your_api_key HARNESS_DEFAULT_ORG_ID=your_org_id HARNESS_DEFAULT_PROJECT_ID=your_project_id ./cmd/harness-mcp-server/harness-mcp-server stdio\n```\n\n### Use Docker Image\n\nAlternatively, you can use the pre-built Docker image:\n\n```bash\ndocker run -i --rm \\\n  -e HARNESS_API_KEY=your_api_key \\\n  -e HARNESS_DEFAULT_ORG_ID=your_org_id \\\n  -e HARNESS_DEFAULT_PROJECT_ID=your_project_id \\\n  -e HARNESS_BASE_URL=your_base_url \\\n  harness/mcp-server stdio\n```\n\n### Claude Desktop Configuration\n\nOn MacOS: `~/Library/Application\\ Support/Claude/claude_desktop_config.json`  \nOn Windows: `%APPDATA%/Claude/claude_desktop_config.json`\n\n\u003cdetails\u003e\n  \u003csummary\u003eServer Configuration\u003c/summary\u003e\n  \n  ```json\n  {\n    \"mcpServers\": {\n      \"harness\": {\n        \"command\": \"/path/to/harness-mcp-server\",\n        \"args\": [\"stdio\"],\n        \"env\": {\n          \"HARNESS_API_KEY\": \"\u003cYOUR_API_KEY\u003e\",\n          \"HARNESS_DEFAULT_ORG_ID\": \"\u003cYOUR_ORG_ID\u003e\",\n          \"HARNESS_DEFAULT_PROJECT_ID\": \"\u003cYOUR_PROJECT_ID\u003e\"\n        }\n      }\n    }\n  }\n  ```\n\u003c/details\u003e\n\n## Usage with Claude Code\n\n```bash\nHARNESS_API_KEY=your_api_key HARNESS_ACCOUNT_ID=your_account_id HARNESS_ORG_ID=your_org_id HARNESS_PROJECT_ID=your_project_id ./cmd/harness-mcp-server/harness-mcp-server stdio\n```\n\n## Usage with Windsurf\n\nTo use the Harness MCP Server with Windsurf:\n\n1. Add the server configuration to your Windsurf config file:\n\n### Using Local Binary\n\n```json\n{\n  \"mcpServers\": {\n    \"harness\": {\n      \"command\": \"/path/to/harness-mcp-server\",\n      \"args\": [\"stdio\"],\n      \"env\": {\n        \"HARNESS_API_KEY\": \"\u003cYOUR_API_KEY\u003e\",\n        \"HARNESS_DEFAULT_ORG_ID\": \"\u003cYOUR_ORG_ID\u003e\",\n        \"HARNESS_DEFAULT_PROJECT_ID\": \"\u003cYOUR_PROJECT_ID\u003e\",\n        \"HARNESS_BASE_URL\": \"\u003cYOUR_BASE_URL\u003e\"\n      }\n    }\n  }\n}\n```\n\n### Using Docker Image\n\n```json\n{\n  \"mcpServers\": {\n    \"harness\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-e\",\n        \"HARNESS_API_KEY\",\n        \"-e\",\n        \"HARNESS_DEFAULT_ORG_ID\",\n        \"-e\",\n        \"HARNESS_DEFAULT_PROJECT_ID\",\n        \"-e\",\n        \"HARNESS_BASE_URL\",\n        \"harness/mcp-server\",\n        \"stdio\"\n      ],\n      \"env\": {\n        \"HARNESS_API_KEY\": \"\u003cYOUR_API_KEY\u003e\",\n        \"HARNESS_DEFAULT_ORG_ID\": \"\u003cYOUR_ORG_ID\u003e\",\n        \"HARNESS_DEFAULT_PROJECT_ID\": \"\u003cYOUR_PROJECT_ID\u003e\",\n        \"HARNESS_BASE_URL\": \"\u003cYOUR_BASE_URL\u003e\"\n      }\n    }\n  }\n}\n```\n## Usage with Amazon Q Developer CLI\n\nTo use the Harness MCP Server with Amazon Q Developer CLI:\n\n1. Add the server configuration to your Amazon Q config file at: `~/.aws/amazonq/mcp.json`  \n\n### Using Local Binary\n\n```json\n{\n  \"mcpServers\": {\n    \"harness\": {\n      \"command\": \"/path/to/harness-mcp-server\",\n      \"args\": [\"stdio\"],\n      \"env\": {\n        \"HARNESS_API_KEY\": \"\u003cYOUR_API_KEY\u003e\",\n        \"HARNESS_DEFAULT_ORG_ID\": \"\u003cYOUR_ORG_ID\u003e\",\n        \"HARNESS_DEFAULT_PROJECT_ID\": \"\u003cYOUR_PROJECT_ID\u003e\",\n        \"HARNESS_BASE_URL\": \"\u003cYOUR_BASE_URL\u003e\"\n      }\n    }\n  }\n}\n```\n\n### Cursor Configuration\n\n```json\n{\n  \"mcpServers\": {\n    \"harness\": {\n      \"command\": \"/path/to/harness-mcp-server\",\n      \"args\": [\"stdio\"],\n      \"env\": {\n        \"HARNESS_API_KEY\": \"your_api_key\",\n        \"HARNESS_DEFAULT_ORG_ID\": \"your_org_id\",\n        \"HARNESS_DEFAULT_PROJECT_ID\": \"your_project_id\",\n        \"HARNESS_BASE_URL\": \"\u003cif-needed\u003e\"\n      }\n    }\n  }\n}\n```\n\n[Cursor MCP Guide](https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers)\n\n[![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/install-mcp?name=harness\u0026config=eyJjb21tYW5kIjoiZG9ja2VyIHJ1biAtaSAtLXJtIC1lIEhBUk5FU1NfQVBJX0tFWSAtZSBIQVJORVNTX0RFRkFVTFRfT1JHX0lEIC1lIEhBUk5FU1NfREVGQVVMVF9QUk9KRUNUX0lEIC1lIEhBUk5FU1NfQkFTRV9VUkwgaGFybmVzcy9tY3Atc2VydmVyIHN0ZGlvIiwiZW52Ijp7IkhBUk5FU1NfQVBJX0tFWSI6IjxZT1VSX0FQSV9LRVk%2BIiwiSEFSTkVTU19ERUZBVUxUX09SR19JRCI6IjxZT1VSX09SR19JRD4iLCJIQVJORVNTX0RFRkFVTFRfUFJPSkVDVF9JRCI6IjxZT1VSX1BST0pFQ1RfSUQ%2BIiwiSEFSTkVTU19CQVNFX1VSTCI6IjxZT1VSX0JBU0VfVVJMPiJ9fQ%3D%3D)\n\n### VS Code Configuration\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"harness\": {\n        \"command\": \"docker\",\n        \"args\": [\n          \"run\",\n          \"-i\",\n          \"--rm\",\n          \"-e\",\n          \"HARNESS_API_KEY\",\n          \"-e\",\n          \"HARNESS_DEFAULT_ORG_ID\",\n          \"-e\",\n          \"HARNESS_DEFAULT_PROJECT_ID\",\n          \"-e\",\n          \"HARNESS_BASE_URL\",\n          \"harness/mcp-server\",\n          \"stdio\"\n        ],\n        \"env\": {\n          \"HARNESS_API_KEY\": \"\u003cYOUR_API_KEY\u003e\",\n          \"HARNESS_DEFAULT_ORG_ID\": \"\u003cYOUR_ORG_ID\u003e\",\n          \"HARNESS_DEFAULT_PROJECT_ID\": \"\u003cYOUR_PROJECT_ID\u003e\",\n          \"HARNESS_BASE_URL\": \"\u003cYOUR_BASE_URL\u003e\"\n        }\n      }\n    }\n  }\n}\n\n```\n\n[VS Code MCP Guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)\n\n\n## Development\n\n### Command Line Arguments\n\nThe Harness MCP Server supports the following command line arguments:\n\n- `--toolsets`: Comma-separated list of tool groups to enable (default: \"all\")\n- `--read-only`: Run the server in read-only mode\n- `--log-file`: Path to log file for debugging\n- `--log-level`: Set the logging level (debug, info, warn, error)\n- `--version`: Show version information\n- `--help`: Show help message\n- `--base-url`: Base URL for Harness (default: \"https://app.harness.io\")\n\n### Environment Variables\n\nEnvironment variables are prefixed with `HARNESS_`:\n\n- `HARNESS_API_KEY`: Harness API key (required) - Account ID is automatically extracted from the API key\n- `HARNESS_DEFAULT_ORG_ID`: Default Harness organization ID (optional, if not specified it would need to be passed in the request if it's required for that operation)\n- `HARNESS_DEFAULT_PROJECT_ID`: Default Harness project ID (optional, if not specified it would need to be passed in the request if it's required for that operation)\n- `HARNESS_TOOLSETS`: Comma-separated list of toolsets to enable (default: \"all\")\n- `HARNESS_READ_ONLY`: Set to \"true\" to run in read-only mode\n- `HARNESS_LOG_FILE`: Path to log file\n- `HARNESS_LOG_LEVEL`: Set the logging level (debug, info, warn, error)\n- `HARNESS_BASE_URL`: Base URL for Harness (default: \"https://app.harness.io\")\n\n### Authentication\n\nThe server uses a Harness API key for authentication. This can be set via the `HARNESS_API_KEY` environment variable.\n\n## Debugging\n\nSince MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).\n\nYou can launch the MCP Inspector with this command:\n\n```bash\nnpx @modelcontextprotocol/inspector /path/to/harness-mcp-server stdio\n```\n\nUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharness%2Fmcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharness%2Fmcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharness%2Fmcp-server/lists"}