@@ -6,10 +6,27 @@ The Harness MCP Server is a [Model Context Protocol (MCP)](https://modelcontextp
6
6
7
7
### Tools
8
8
9
- The server implements one tool:
10
- - list-connector: List available connectors
11
- - Takes "connector_type", "connector_names", and "connector_ids" as optional arguments
12
- - Returns a list of connectors in JSON format
9
+ The server implements several toolsets:
10
+
11
+ #### Pipelines Toolset
12
+ - ` get_pipeline ` : Get details of a specific pipeline
13
+ - ` list_pipelines ` : List pipelines in a repository
14
+ - ` get_execution ` : Get details of a specific pipeline execution
15
+ - ` list_executions ` : List pipeline executions
16
+ - ` fetch_execution_url ` : Fetch the execution URL for a pipeline execution
17
+
18
+ #### Pull Requests Toolset
19
+ - ` get_pull_request ` : Get details of a specific pull request
20
+ - ` list_pull_requests ` : List pull requests in a repository
21
+ - ` get_pull_request_checks ` : Get status checks for a specific pull request
22
+ - ` create_pull_request ` : Create a new pull request
23
+
24
+ #### Repositories Toolset
25
+ - ` get_repository ` : Get details of a specific repository
26
+ - ` list_repositories ` : List repositories
27
+
28
+ #### Logs Toolset
29
+ - ` download_execution_logs ` : Download logs for a pipeline execution
13
30
14
31
## Prerequisites
15
32
@@ -22,18 +39,18 @@ The server implements one tool:
22
39
23
40
1 . Clone the repository:
24
41
``` bash
25
- git clone https://github.com/yourusername /harness-mcp.git
42
+ git clone https://github.com/vistaarjuneja /harness-mcp.git
26
43
cd harness-mcp
27
44
```
28
45
29
46
2 . Build the binary:
30
47
``` bash
31
- go build -o harness-mcp-server ./cmd/harness-mcp-server
48
+ go build -o cmd/harness-mcp-server/ harness-mcp-server ./cmd/harness-mcp-server
32
49
```
33
50
34
51
3 . Run the server:
35
52
``` bash
36
- HARNESS_API_KEY=your_api_key . /harness-mcp-server stdio
53
+ 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
37
54
```
38
55
39
56
### Claude Desktop Configuration
@@ -51,7 +68,10 @@ On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
51
68
"command" : " /path/to/harness-mcp-server" ,
52
69
"args" : [" stdio" ],
53
70
"env" : {
54
- "HARNESS_API_KEY" : " <YOUR_API_KEY>"
71
+ "HARNESS_API_KEY" : " <YOUR_API_KEY>" ,
72
+ "HARNESS_ACCOUNT_ID" : " <YOUR_ACCOUNT_ID>" ,
73
+ "HARNESS_ORG_ID" : " <YOUR_ORG_ID>" ,
74
+ "HARNESS_PROJECT_ID" : " <YOUR_PROJECT_ID>"
55
75
}
56
76
}
57
77
}
@@ -62,7 +82,30 @@ On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
62
82
## Usage with Claude Code
63
83
64
84
``` bash
65
- HARNESS_API_KEY=your_api_key /path/to/harness-mcp-server stdio
85
+ 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
86
+ ```
87
+
88
+ ## Usage with Windsurf
89
+
90
+ To use the Harness MCP Server with Windsurf:
91
+
92
+ 1 . Add the server configuration to your Windsurf config file:
93
+
94
+ ``` json
95
+ {
96
+ "mcpServers" : {
97
+ "harness" : {
98
+ "command" : " /path/to/harness-mcp-server" ,
99
+ "args" : [" stdio" ],
100
+ "env" : {
101
+ "HARNESS_API_KEY" : " <YOUR_API_KEY>" ,
102
+ "HARNESS_ACCOUNT_ID" : " <YOUR_ACCOUNT_ID>" ,
103
+ "HARNESS_ORG_ID" : " <YOUR_ORG_ID>" ,
104
+ "HARNESS_PROJECT_ID" : " <YOUR_PROJECT_ID>"
105
+ }
106
+ }
107
+ }
108
+ }
66
109
```
67
110
68
111
## Development
@@ -74,19 +117,24 @@ The Harness MCP Server supports the following command line arguments:
74
117
- ` --toolsets ` : Comma-separated list of tool groups to enable (default: "all")
75
118
- ` --read-only ` : Run the server in read-only mode
76
119
- ` --log-file ` : Path to log file for debugging
77
- - ` --enable-command-logging ` : Enable logging of all commands
120
+ - ` --log-level ` : Set the logging level (debug, info, warn, error)
78
121
- ` --version ` : Show version information
79
122
- ` --help ` : Show help message
123
+ - ` --base-url ` : Base URL for Harness (default: "https://app.harness.io ")
80
124
81
125
### Environment Variables
82
126
83
127
Environment variables are prefixed with ` HARNESS_ ` :
84
128
85
- - ` HARNESS_API_KEY ` : Harness API key
86
- - ` HARNESS_TOOLSETS ` : Comma-separated list of toolsets to enable
129
+ - ` HARNESS_API_KEY ` : Harness API key (required)
130
+ - ` HARNESS_ACCOUNT_ID ` : Harness account ID (required)
131
+ - ` HARNESS_ORG_ID ` : Harness organization ID (optional, but required for some operations)
132
+ - ` HARNESS_PROJECT_ID ` : Harness project ID (optional, but required for some operations)
133
+ - ` HARNESS_TOOLSETS ` : Comma-separated list of toolsets to enable (default: "all")
87
134
- ` HARNESS_READ_ONLY ` : Set to "true" to run in read-only mode
88
135
- ` HARNESS_LOG_FILE ` : Path to log file
89
- - ` HARNESS_ENABLE_COMMAND_LOGGING ` : Set to "true" to enable command logging
136
+ - ` HARNESS_LOG_LEVEL ` : Set the logging level (debug, info, warn, error)
137
+ - ` HARNESS_BASE_URL ` : Base URL for Harness (default: "https://app.harness.io ")
90
138
91
139
### Authentication
92
140
@@ -106,4 +154,4 @@ Upon launching, the Inspector will display a URL that you can access in your bro
106
154
107
155
## To do
108
156
109
- We need to figure out a good way to handle auth configuration, it's just hardcoded for this POC.
157
+ Add Docker image for easier use
0 commit comments