You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,10 +147,24 @@ More about using MCP server tools in VS Code's [agent mode documentation](https:
147
147
148
148
### Build from source
149
149
150
-
If you don't have Docker, you can use `go` to build the binary in the
151
-
`cmd/github-mcp-server` directory, and use the `github-mcp-server stdio`
152
-
command with the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable set to
153
-
your token.
150
+
If you don't have Docker, you can use `go build` to build the binary in the
151
+
`cmd/github-mcp-server` directory, and use the `github-mcp-server stdio` command with the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable set to your token. To specify the output location of the build, use the `-o` flag. You should configure your server to use the built executable as its `command`. For example:
152
+
153
+
```JSON
154
+
{
155
+
"mcp": {
156
+
"servers": {
157
+
"github": {
158
+
"command": "/path/to/github-mcp-server",
159
+
"args": ["stdio"],
160
+
"env": {
161
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
162
+
}
163
+
}
164
+
}
165
+
}
166
+
}
167
+
```
154
168
155
169
## GitHub Enterprise Server
156
170
@@ -464,6 +478,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
464
478
-`ref`: Git reference (string, optional)
465
479
-`state`: Alert state (string, optional)
466
480
-`severity`: Alert severity (string, optional)
481
+
-`tool_name`: The name of the tool used for code scanning (string, optional)
// Add global flags that will be shared by all commands
71
+
rootCmd.PersistentFlags().StringSlice("toolsets", github.DefaultTools, "An optional comma separated list of groups of tools to allow, defaults to enabling all")
rootCmd.PersistentFlags().Bool("read-only", false, "Restrict the server to read-only operations")
66
74
rootCmd.PersistentFlags().String("log-file", "", "Path to log file")
67
75
rootCmd.PersistentFlags().Bool("enable-command-logging", false, "When enabled, the server will log all command requests and responses to the log file")
68
76
rootCmd.PersistentFlags().Bool("export-translations", false, "Save translations to a JSON file")
69
77
rootCmd.PersistentFlags().String("gh-host", "", "Specify the GitHub hostname (for GitHub Enterprise etc.)")
Copy file name to clipboardExpand all lines: pkg/github/code_scanning.go
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -86,11 +86,16 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
86
86
mcp.Description("The Git reference for the results you want to list."),
87
87
),
88
88
mcp.WithString("state",
89
-
mcp.Description("State of the code scanning alerts to list. Set to closed to list only closed code scanning alerts. Default: open"),
89
+
mcp.Description("Filter code scanning alerts by state. Defaults to open"),
90
90
mcp.DefaultString("open"),
91
+
mcp.Enum("open", "closed", "dismissed", "fixed"),
91
92
),
92
93
mcp.WithString("severity",
93
-
mcp.Description("Only code scanning alerts with this severity will be returned. Possible values are: critical, high, medium, low, warning, note, error."),
94
+
mcp.Description("Filter code scanning alerts by severity"),
0 commit comments