Access and interact with Harness platform data, including pipelines, repositories, logs, and artifact registries.
The Harness MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with Harness APIs, enabling advanced automation and interaction capabilities for developers and tools.
The server implements several toolsets:
Toolset Name: pipelines
get_pipeline
: Get details of a specific pipelinelist_pipelines
: List pipelines in a repositoryget_execution
: Get details of a specific pipeline executionlist_executions
: List pipeline executionsfetch_execution_url
: Fetch the execution URL for a pipeline executionToolset Name: pullrequests
get_pull_request
: Get details of a specific pull requestlist_pull_requests
: List pull requests in a repositoryget_pull_request_checks
: Get status checks for a specific pull requestget_pull_request_activities
: Get activities and comments for a specific pull requestcreate_pull_request
: Create a new pull requestToolset Name: repositories
get_repository
: Get details of a specific repositorylist_repositories
: List repositoriesToolset Name: registries
get_registry
: Get details of a specific registry in Harness artifact registrylist_artifact_files
: List files for a specific artifact version in a Harness artifact registrylist_artifact_versions
: List artifact versions in a Harness artifact registrylist_artifacts
: List artifacts in a Harness artifact registrylist_registries
: List registries in Harness artifact registryToolset Name: dashboards
list_dashboards
: Lists all available Harness dashboardsget_dashboard_data
: Retrieves the data from a specific Harness dashboardToolset Name: cloudcostmanagement
get_ccm_overview
: Retrieve the cost overview for a specific account.list_ccm_cost_categories
: List all cost categories names for a specified account.list_ccm_cost_categories_detail
: List all cost categories details for a specified account.get_ccm_cost_category
: Retrieve a cost category detail by Id for a specified account.Toolset Name: logs
download_execution_logs
: Download logs for a pipeline executionThis project provides a Makefile
to simplify common development tasks. The main targets are:
make build
– Build the mcp-server binary with version information embedded.make init
– Set up git hooks and submodules for pre-commit checks.make dep
– Download Go module dependencies.make tools
– Install tools required for the build (if any are specified).make format
– Format Go code using goimports and gci.You can run any of these commands from the project root. For example:
make build
make format
git clone https://github.com/harness/mcp-server.git
cd mcp-server
go build -o cmd/harness-mcp-server/harness-mcp-server ./cmd/harness-mcp-server
HARNESS_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
Alternatively, you can use the pre-built Docker image:
docker run -i --rm \
-e HARNESS_API_KEY=your_api_key \
-e HARNESS_DEFAULT_ORG_ID=your_org_id \
-e HARNESS_DEFAULT_PROJECT_ID=your_project_id \
-e HARNESS_BASE_URL=your_base_url \
harness/mcp-server stdio
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"harness": {
"command": "/path/to/harness-mcp-server",
"args": ["stdio"],
"env": {
"HARNESS_API_KEY": "<YOUR_API_KEY>",
"HARNESS_DEFAULT_ORG_ID": "<YOUR_ORG_ID>",
"HARNESS_DEFAULT_PROJECT_ID": "<YOUR_PROJECT_ID>"
}
}
}
}
HARNESS_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
To use the Harness MCP Server with Windsurf:
{
"mcpServers": {
"harness": {
"command": "/path/to/harness-mcp-server",
"args": ["stdio"],
"env": {
"HARNESS_API_KEY": "<YOUR_API_KEY>",
"HARNESS_DEFAULT_ORG_ID": "<YOUR_ORG_ID>",
"HARNESS_DEFAULT_PROJECT_ID": "<YOUR_PROJECT_ID>",
"HARNESS_BASE_URL": "<YOUR_BASE_URL>"
}
}
}
}
{
"mcpServers": {
"harness": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"HARNESS_API_KEY",
"-e",
"HARNESS_DEFAULT_ORG_ID",
"-e",
"HARNESS_DEFAULT_PROJECT_ID",
"-e",
"HARNESS_BASE_URL",
"harness/mcp-server",
"stdio"
],
"env": {
"HARNESS_API_KEY": "<YOUR_API_KEY>",
"HARNESS_DEFAULT_ORG_ID": "<YOUR_ORG_ID>",
"HARNESS_DEFAULT_PROJECT_ID": "<YOUR_PROJECT_ID>",
"HARNESS_BASE_URL": "<YOUR_BASE_URL>"
}
}
}
}
To use the Harness MCP Server with Amazon Q Developer CLI:
~/.aws/amazonq/mcp.json
{
"mcpServers": {
"harness": {
"command": "/path/to/harness-mcp-server",
"args": ["stdio"],
"env": {
"HARNESS_API_KEY": "<YOUR_API_KEY>",
"HARNESS_DEFAULT_ORG_ID": "<YOUR_ORG_ID>",
"HARNESS_DEFAULT_PROJECT_ID": "<YOUR_PROJECT_ID>",
"HARNESS_BASE_URL": "<YOUR_BASE_URL>"
}
}
}
}
{
"mcpServers": {
"harness": {
"command": "/path/to/harness-mcp-server",
"args": ["stdio"],
"env": {
"HARNESS_API_KEY": "your_api_key",
"HARNESS_DEFAULT_ORG_ID": "your_org_id",
"HARNESS_DEFAULT_PROJECT_ID": "your_project_id",
"HARNESS_BASE_URL": "<if-needed>"
}
}
}
}
{
"mcp": {
"servers": {
"harness": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"HARNESS_API_KEY",
"-e",
"HARNESS_DEFAULT_ORG_ID",
"-e",
"HARNESS_DEFAULT_PROJECT_ID",
"-e",
"HARNESS_BASE_URL",
"harness/mcp-server",
"stdio"
],
"env": {
"HARNESS_API_KEY": "<YOUR_API_KEY>",
"HARNESS_DEFAULT_ORG_ID": "<YOUR_ORG_ID>",
"HARNESS_DEFAULT_PROJECT_ID": "<YOUR_PROJECT_ID>",
"HARNESS_BASE_URL": "<YOUR_BASE_URL>"
}
}
}
}
}
The Harness MCP Server supports the following command line arguments:
--toolsets
: Comma-separated list of tool groups to enable (default: "all")--read-only
: Run the server in read-only mode--log-file
: Path to log file for debugging--log-level
: Set the logging level (debug, info, warn, error)--version
: Show version information--help
: Show help message--base-url
: Base URL for Harness (default: "https://app.harness.io")Environment variables are prefixed with HARNESS_
:
HARNESS_API_KEY
: Harness API key (required) - Account ID is automatically extracted from the API keyHARNESS_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)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)HARNESS_TOOLSETS
: Comma-separated list of toolsets to enable (default: "all")HARNESS_READ_ONLY
: Set to "true" to run in read-only modeHARNESS_LOG_FILE
: Path to log fileHARNESS_LOG_LEVEL
: Set the logging level (debug, info, warn, error)HARNESS_BASE_URL
: Base URL for Harness (default: "https://app.harness.io")The server uses a Harness API key for authentication. This can be set via the HARNESS_API_KEY
environment variable.
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector with this command:
npx @modelcontextprotocol/inspector /path/to/harness-mcp-server stdio
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Reference / test server with prompts, resources, and tools
Create crafted UI components inspired by the best 21st.dev design engineers.
ALAPI MCP Tools,Call hundreds of API interfaces via MCP
AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform
APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.
Enable AI agents to interact with the Atla API for state-of-the-art LLMJ evaluation.
Generate images using Amazon Nova Canvas with text prompts and color guidance.
Bring the full power of BrowserStack’s Test Platform to your AI tools, making testing faster and easier for every developer and tester on your team.
Flag features, manage company data, and control feature access using Bucket.
Official MCP server for Buildable AI-powered development platform. Enables AI assistants to manage tasks, track progress, get project context, and collaborate with humans on software projects.