Skip to content

Commit 16b8a04

Browse files
authored
Merge branch 'main' into graphql-tools-feature
2 parents a8d0e99 + ea73047 commit 16b8a04

26 files changed

+1632
-138
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: go mod download
2727

2828
- name: Run unit tests
29-
run: go test -race ./...
29+
run: script/test
3030

3131
- name: Build
3232
run: go build -v ./cmd/github-mcp-server

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ __debug_bin*
1212
# Go
1313
vendor
1414
bin/
15+
16+
# macOS
17+
.DS_Store

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ These are one time installations required to be able to test your changes locall
1919

2020
## Submitting a pull request
2121

22-
> **Important**: Please open your pull request against the `next` branch, not `main`. The `next` branch is where we integrate new features and changes before they are merged to `main`.
23-
2422
1. [Fork][fork] and clone the repository
2523
1. Make sure the tests pass on your machine: `go test -v ./...`
2624
1. Make sure linter passes on your machine: `golangci-lint run`
2725
1. Create a new branch: `git checkout -b my-branch-name`
2826
1. Make your change, add tests, and make sure the tests and linter still pass
29-
1. Push to your fork and [submit a pull request][pr] targeting the `next` branch
27+
1. Push to your fork and [submit a pull request][pr] targeting the `main` branch
3028
1. Pat yourself on the back and wait for your pull request to be reviewed and merged.
3129

3230
Here are a few things you can do that will increase the likelihood of your pull request being accepted:

README.md

Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ The following sets of tools are available (all are on by default):
269269
| `context` | **Strongly recommended**: Tools that provide context about the current user and GitHub context you are operating in |
270270
| `actions` | GitHub Actions workflows and CI/CD operations |
271271
| `code_security` | Code security related tools, such as GitHub Code Scanning |
272+
| `dependabot` | Dependabot tools |
273+
| `discussions` | GitHub Discussions related tools |
272274
| `experiments` | Experimental features that are not considered stable yet |
273275
| `issues` | GitHub Issues related tools |
274276
| `notifications` | GitHub Notifications related tools |
@@ -456,6 +458,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
456458
- `repo`: Repository name (string, required)
457459
- `return_content`: Returns actual log content instead of URLs (boolean, optional)
458460
- `run_id`: Workflow run ID (required when using failed_only) (number, optional)
461+
- `tail_lines`: Number of lines to return from the end of the log (number, optional)
459462

460463
- **get_workflow_run** - Get workflow run
461464
- `owner`: Repository owner (string, required)
@@ -475,15 +478,15 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
475478
- **list_workflow_jobs** - List workflow jobs
476479
- `filter`: Filters jobs by their completed_at timestamp (string, optional)
477480
- `owner`: Repository owner (string, required)
478-
- `page`: The page number of the results to fetch (number, optional)
479-
- `per_page`: The number of results per page (max 100) (number, optional)
481+
- `page`: Page number for pagination (min 1) (number, optional)
482+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
480483
- `repo`: Repository name (string, required)
481484
- `run_id`: The unique identifier of the workflow run (number, required)
482485

483486
- **list_workflow_run_artifacts** - List workflow artifacts
484487
- `owner`: Repository owner (string, required)
485-
- `page`: The page number of the results to fetch (number, optional)
486-
- `per_page`: The number of results per page (max 100) (number, optional)
488+
- `page`: Page number for pagination (min 1) (number, optional)
489+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
487490
- `repo`: Repository name (string, required)
488491
- `run_id`: The unique identifier of the workflow run (number, required)
489492

@@ -492,16 +495,16 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
492495
- `branch`: Returns workflow runs associated with a branch. Use the name of the branch. (string, optional)
493496
- `event`: Returns workflow runs for a specific event type (string, optional)
494497
- `owner`: Repository owner (string, required)
495-
- `page`: The page number of the results to fetch (number, optional)
496-
- `per_page`: The number of results per page (max 100) (number, optional)
498+
- `page`: Page number for pagination (min 1) (number, optional)
499+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
497500
- `repo`: Repository name (string, required)
498501
- `status`: Returns workflow runs with the check run status (string, optional)
499502
- `workflow_id`: The workflow ID or workflow file name (string, required)
500503

501504
- **list_workflows** - List workflows
502505
- `owner`: Repository owner (string, required)
503-
- `page`: The page number of the results to fetch (number, optional)
504-
- `per_page`: The number of results per page (max 100) (number, optional)
506+
- `page`: Page number for pagination (min 1) (number, optional)
507+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
505508
- `repo`: Repository name (string, required)
506509

507510
- **rerun_failed_jobs** - Rerun failed jobs
@@ -553,6 +556,52 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
553556

554557
<details>
555558

559+
<summary>Dependabot</summary>
560+
561+
- **get_dependabot_alert** - Get dependabot alert
562+
- `alertNumber`: The number of the alert. (number, required)
563+
- `owner`: The owner of the repository. (string, required)
564+
- `repo`: The name of the repository. (string, required)
565+
566+
- **list_dependabot_alerts** - List dependabot alerts
567+
- `owner`: The owner of the repository. (string, required)
568+
- `repo`: The name of the repository. (string, required)
569+
- `severity`: Filter dependabot alerts by severity (string, optional)
570+
- `state`: Filter dependabot alerts by state. Defaults to open (string, optional)
571+
572+
</details>
573+
574+
<details>
575+
576+
<summary>Discussions</summary>
577+
578+
- **get_discussion** - Get discussion
579+
- `discussionNumber`: Discussion Number (number, required)
580+
- `owner`: Repository owner (string, required)
581+
- `repo`: Repository name (string, required)
582+
583+
- **get_discussion_comments** - Get discussion comments
584+
- `discussionNumber`: Discussion Number (number, required)
585+
- `owner`: Repository owner (string, required)
586+
- `repo`: Repository name (string, required)
587+
588+
- **list_discussion_categories** - List discussion categories
589+
- `after`: Cursor for pagination, use the 'after' field from the previous response (string, optional)
590+
- `before`: Cursor for pagination, use the 'before' field from the previous response (string, optional)
591+
- `first`: Number of categories to return per page (min 1, max 100) (number, optional)
592+
- `last`: Number of categories to return from the end (min 1, max 100) (number, optional)
593+
- `owner`: Repository owner (string, required)
594+
- `repo`: Repository name (string, required)
595+
596+
- **list_discussions** - List discussions
597+
- `category`: Optional filter by discussion category ID. If provided, only discussions with this category are listed. (string, optional)
598+
- `owner`: Repository owner (string, required)
599+
- `repo`: Repository name (string, required)
600+
601+
</details>
602+
603+
<details>
604+
556605
<summary>Issues</summary>
557606

558607
- **add_issue_comment** - Add comment to issue
@@ -583,8 +632,8 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
583632
- **get_issue_comments** - Get issue comments
584633
- `issue_number`: Issue number (number, required)
585634
- `owner`: Repository owner (string, required)
586-
- `page`: Page number (number, optional)
587-
- `per_page`: Number of records per page (number, optional)
635+
- `page`: Page number for pagination (min 1) (number, optional)
636+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
588637
- `repo`: Repository name (string, required)
589638

590639
- **list_issues** - List issues
@@ -872,7 +921,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
872921
- `page`: Page number for pagination (min 1) (number, optional)
873922
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
874923
- `repo`: Repository name (string, required)
875-
- `sha`: SHA or Branch name (string, optional)
924+
- `sha`: The commit SHA, branch name, or tag name to list commits from. If not specified, defaults to the repository's default branch. (string, optional)
876925

877926
- **list_tags** - List tags
878927
- `owner`: Repository owner (string, required)

docs/remote-server.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Below is a table of available toolsets for the remote GitHub MCP Server. Each to
2020
| all | All available GitHub MCP tools | https://api.githubcopilot.com/mcp/ | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2F%22%7D) | [read-only](https://api.githubcopilot.com/mcp/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Freadonly%22%7D) |
2121
| Actions | GitHub Actions workflows and CI/CD operations | https://api.githubcopilot.com/mcp/x/actions | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-actions&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Factions%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/actions/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-actions&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Factions%2Freadonly%22%7D) |
2222
| Code Security | Code security related tools, such as GitHub Code Scanning | https://api.githubcopilot.com/mcp/x/code_security | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-code_security&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcode_security%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/code_security/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-code_security&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcode_security%2Freadonly%22%7D) |
23+
| Dependabot | Dependabot tools | https://api.githubcopilot.com/mcp/x/dependabot | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-dependabot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fdependabot%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/dependabot/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-dependabot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fdependabot%2Freadonly%22%7D) |
24+
| Discussions | GitHub Discussions related tools | https://api.githubcopilot.com/mcp/x/discussions | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-discussions&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fdiscussions%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/discussions/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-discussions&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fdiscussions%2Freadonly%22%7D) |
2325
| Experiments | Experimental features that are not considered stable yet | https://api.githubcopilot.com/mcp/x/experiments | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-experiments&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fexperiments%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/experiments/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-experiments&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fexperiments%2Freadonly%22%7D) |
2426
| Issues | GitHub Issues related tools | https://api.githubcopilot.com/mcp/x/issues | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-issues&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fissues%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/issues/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-issues&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fissues%2Freadonly%22%7D) |
2527
| Notifications | GitHub Notifications related tools | https://api.githubcopilot.com/mcp/x/notifications | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-notifications&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fnotifications%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/notifications/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-notifications&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fnotifications%2Freadonly%22%7D) |
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"annotations": {
3+
"title": "Get dependabot alert",
4+
"readOnlyHint": true
5+
},
6+
"description": "Get details of a specific dependabot alert in a GitHub repository.",
7+
"inputSchema": {
8+
"properties": {
9+
"alertNumber": {
10+
"description": "The number of the alert.",
11+
"type": "number"
12+
},
13+
"owner": {
14+
"description": "The owner of the repository.",
15+
"type": "string"
16+
},
17+
"repo": {
18+
"description": "The name of the repository.",
19+
"type": "string"
20+
}
21+
},
22+
"required": [
23+
"owner",
24+
"repo",
25+
"alertNumber"
26+
],
27+
"type": "object"
28+
},
29+
"name": "get_dependabot_alert"
30+
}

pkg/github/__toolsnaps__/get_issue_comments.snap

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
"type": "string"
1616
},
1717
"page": {
18-
"description": "Page number",
18+
"description": "Page number for pagination (min 1)",
19+
"minimum": 1,
1920
"type": "number"
2021
},
21-
"per_page": {
22-
"description": "Number of records per page",
22+
"perPage": {
23+
"description": "Results per page for pagination (min 1, max 100)",
24+
"maximum": 100,
25+
"minimum": 1,
2326
"type": "number"
2427
},
2528
"repo": {

pkg/github/__toolsnaps__/list_commits.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "List commits",
44
"readOnlyHint": true
55
},
6-
"description": "Get list of commits of a branch in a GitHub repository",
6+
"description": "Get list of commits of a branch in a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).",
77
"inputSchema": {
88
"properties": {
99
"author": {
@@ -30,7 +30,7 @@
3030
"type": "string"
3131
},
3232
"sha": {
33-
"description": "SHA or Branch name",
33+
"description": "The commit SHA, branch name, or tag name to list commits from. If not specified, defaults to the repository's default branch.",
3434
"type": "string"
3535
}
3636
},
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"annotations": {
3+
"title": "List dependabot alerts",
4+
"readOnlyHint": true
5+
},
6+
"description": "List dependabot alerts in a GitHub repository.",
7+
"inputSchema": {
8+
"properties": {
9+
"owner": {
10+
"description": "The owner of the repository.",
11+
"type": "string"
12+
},
13+
"repo": {
14+
"description": "The name of the repository.",
15+
"type": "string"
16+
},
17+
"severity": {
18+
"description": "Filter dependabot alerts by severity",
19+
"enum": [
20+
"low",
21+
"medium",
22+
"high",
23+
"critical"
24+
],
25+
"type": "string"
26+
},
27+
"state": {
28+
"default": "open",
29+
"description": "Filter dependabot alerts by state. Defaults to open",
30+
"enum": [
31+
"open",
32+
"fixed",
33+
"dismissed",
34+
"auto_dismissed"
35+
],
36+
"type": "string"
37+
}
38+
},
39+
"required": [
40+
"owner",
41+
"repo"
42+
],
43+
"type": "object"
44+
},
45+
"name": "list_dependabot_alerts"
46+
}

0 commit comments

Comments
 (0)