Configure your AI client
Add the Harness MCP Server to Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Gemini CLI, and Amazon Q Developer CLI using a Harness API key.
Add the Harness MCP Server to your editor or terminal so your AI assistant can call Harness tools. Each client below uses the same npx harness-mcp-v2 command with a Harness API key supplied through the env block.
Before you begin
Before you configure AI client, ensure you have the following:
Harness API key: A PAT in the format
pat.<accountId>.<tokenId>.<secret>. Go to Harness MCP Server to review prerequisites.Node.js: Required for
npx. Go to Install with an alternative method to review other options.
Claude Desktop
To set up AI client on Claude Desktop, navigate to the file location specified below:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%/Claude/claude_desktop_config.json
Claude Code
To set up AI client on Claude code, run the following commands on the terminal:
Then set HARNESS_API_KEY in your environment or .env file.
Cursor
To set up AI client on Cursor, add the following JSON file to .cursor/mcp.json, and replace the Harness API key appropriately:
VS Code
To set up AI client on VS Code, add the following JSON file to .vscode/mcp.json or to your VS Code settings, and replace the Harness API key appropriately:
Windsurf
To set up AI client on Windsurf, add the following JSON file to ~/.windsurf/mcp.json, and replace the Harness API key appropriately:
Gemini CLI
To set up AI client on Gemini CLI, add the following JSON file to ~/.gemini/settings.json, and replace the Harness API key appropriately:
Gemini CLI Extensions
You can install AI client using Gemini CLI Extensions. You can run the following command in your terminal:
Amazon Q Developer CLI
To set up AI client on Amazon Q Developer CLI, add the following JSON file to ~/.aws/amazonq/mcp.json, and replace the Harness API key appropriately:
Next steps
Tools reference: Review the tools your agent can now call.
Environment variables: Restrict scope, enable read-only mode, or filter toolsets.
Troubleshooting: Resolve connection and configuration errors.
Last updated
Was this helpful?