Skip to content

Commit 5221ead

Browse files
authored
Merge branch 'main' into main
2 parents 75ca348 + 45e90ae commit 5221ead

15 files changed

+1473
-60
lines changed

README.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ The following sets of tools are available (all are on by default):
322322
| `dependabot` | Dependabot tools |
323323
| `discussions` | GitHub Discussions related tools |
324324
| `experiments` | Experimental features that are not considered stable yet |
325+
| `gists` | GitHub Gist related tools |
325326
| `issues` | GitHub Issues related tools |
326327
| `notifications` | GitHub Notifications related tools |
327328
| `orgs` | GitHub Organization related tools |
@@ -501,7 +502,31 @@ The following sets of tools are available (all are on by default):
501502
- `orderBy`: Order discussions by field. If provided, the 'direction' also needs to be provided. (string, optional)
502503
- `owner`: Repository owner (string, required)
503504
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
504-
- `repo`: Repository name (string, required)
505+
- `repo`: Repository name. If not provided, discussions will be queried at the organisation level. (string, optional)
506+
507+
</details>
508+
509+
<details>
510+
511+
<summary>Gists</summary>
512+
513+
- **create_gist** - Create Gist
514+
- `content`: Content for simple single-file gist creation (string, required)
515+
- `description`: Description of the gist (string, optional)
516+
- `filename`: Filename for simple single-file gist creation (string, required)
517+
- `public`: Whether the gist is public (boolean, optional)
518+
519+
- **list_gists** - List Gists
520+
- `page`: Page number for pagination (min 1) (number, optional)
521+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
522+
- `since`: Only gists updated after this time (ISO 8601 timestamp) (string, optional)
523+
- `username`: GitHub username (omit for authenticated user's gists) (string, optional)
524+
525+
- **update_gist** - Update Gist
526+
- `content`: Content for the file (string, required)
527+
- `description`: Updated description of the gist (string, optional)
528+
- `filename`: Filename to update or create (string, required)
529+
- `gist_id`: ID of the gist to update (string, required)
505530

506531
</details>
507532

@@ -646,7 +671,7 @@ The following sets of tools are available (all are on by default):
646671
- `order`: Sort order (string, optional)
647672
- `page`: Page number for pagination (min 1) (number, optional)
648673
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
649-
- `query`: Search query using GitHub organizations search syntax scoped to type:org (string, required)
674+
- `query`: Organization search query. Examples: 'microsoft', 'location:california', 'created:>=2025-01-01'. Search is automatically scoped to type:org. (string, required)
650675
- `sort`: Sort field by category (string, optional)
651676

652677
</details>
@@ -771,10 +796,12 @@ The following sets of tools are available (all are on by default):
771796
- **update_pull_request** - Edit pull request
772797
- `base`: New base branch name (string, optional)
773798
- `body`: New description (string, optional)
799+
- `draft`: Mark pull request as draft (true) or ready for review (false) (boolean, optional)
774800
- `maintainer_can_modify`: Allow maintainer edits (boolean, optional)
775801
- `owner`: Repository owner (string, required)
776802
- `pullNumber`: Pull request number to update (number, required)
777803
- `repo`: Repository name (string, required)
804+
- `reviewers`: GitHub usernames to request reviews from (string[], optional)
778805
- `state`: New state (string, optional)
779806
- `title`: New title (string, optional)
780807

@@ -870,16 +897,16 @@ The following sets of tools are available (all are on by default):
870897
- `repo`: Repository name (string, required)
871898

872899
- **search_code** - Search code
873-
- `order`: Sort order (string, optional)
900+
- `order`: Sort order for results (string, optional)
874901
- `page`: Page number for pagination (min 1) (number, optional)
875902
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
876-
- `query`: Search query using GitHub code search syntax (string, required)
903+
- `query`: Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more. (string, required)
877904
- `sort`: Sort field ('indexed' only) (string, optional)
878905

879906
- **search_repositories** - Search repositories
880907
- `page`: Page number for pagination (min 1) (number, optional)
881908
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
882-
- `query`: Search query (string, required)
909+
- `query`: Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering. (string, required)
883910

884911
</details>
885912

@@ -909,8 +936,8 @@ The following sets of tools are available (all are on by default):
909936
- `order`: Sort order (string, optional)
910937
- `page`: Page number for pagination (min 1) (number, optional)
911938
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
912-
- `query`: Search query using GitHub users search syntax scoped to type:user (string, required)
913-
- `sort`: Sort field by category (string, optional)
939+
- `query`: User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user. (string, required)
940+
- `sort`: Sort users by number of followers or repositories, or when the person joined GitHub. (string, optional)
914941

915942
</details>
916943
<!-- END AUTOMATED TOOLS -->
@@ -1083,4 +1110,4 @@ The exported Go API of this module should currently be considered unstable, and
10831110

10841111
## License
10851112

1086-
This project is licensed under the terms of the MIT open source license. Please refer to [MIT](./LICENSE) for the full terms.
1113+
This project is licensed under the terms of the MIT open source license. Please refer to [MIT](./LICENSE) for the full terms.

docs/remote-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Below is a table of available toolsets for the remote GitHub MCP Server. Each to
2525
| 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) |
2626
| 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) |
2727
| 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) |
28+
| Gists | GitHub Gist related tools | https://api.githubcopilot.com/mcp/x/gists | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-gists&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fgists%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/gists/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-gists&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fgists%2Freadonly%22%7D) |
2829
| 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) |
2930
| 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) |
3031
| Organizations | GitHub Organization related tools | https://api.githubcopilot.com/mcp/x/orgs | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-orgs&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Forgs%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/orgs/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-orgs&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Forgs%2Freadonly%22%7D) |

pkg/github/__toolsnaps__/search_code.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"title": "Search code",
44
"readOnlyHint": true
55
},
6-
"description": "Search for code across GitHub repositories",
6+
"description": "Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.",
77
"inputSchema": {
88
"properties": {
99
"order": {
10-
"description": "Sort order",
10+
"description": "Sort order for results",
1111
"enum": [
1212
"asc",
1313
"desc"
@@ -26,7 +26,7 @@
2626
"type": "number"
2727
},
2828
"query": {
29-
"description": "Search query using GitHub code search syntax",
29+
"description": "Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more.",
3030
"type": "string"
3131
},
3232
"sort": {

pkg/github/__toolsnaps__/search_repositories.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "Search repositories",
44
"readOnlyHint": true
55
},
6-
"description": "Search for GitHub repositories",
6+
"description": "Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.",
77
"inputSchema": {
88
"properties": {
99
"page": {
@@ -18,7 +18,7 @@
1818
"type": "number"
1919
},
2020
"query": {
21-
"description": "Search query",
21+
"description": "Repository search query. Examples: 'machine learning in:name stars:\u003e1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering.",
2222
"type": "string"
2323
}
2424
},

pkg/github/__toolsnaps__/search_users.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "Search users",
44
"readOnlyHint": true
55
},
6-
"description": "Search for GitHub users exclusively",
6+
"description": "Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.",
77
"inputSchema": {
88
"properties": {
99
"order": {
@@ -26,11 +26,11 @@
2626
"type": "number"
2727
},
2828
"query": {
29-
"description": "Search query using GitHub users search syntax scoped to type:user",
29+
"description": "User search query. Examples: 'john smith', 'location:seattle', 'followers:\u003e100'. Search is automatically scoped to type:user.",
3030
"type": "string"
3131
},
3232
"sort": {
33-
"description": "Sort field by category",
33+
"description": "Sort users by number of followers or repositories, or when the person joined GitHub.",
3434
"enum": [
3535
"followers",
3636
"repositories",

pkg/github/__toolsnaps__/update_pull_request.snap

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"description": "New description",
1515
"type": "string"
1616
},
17+
"draft": {
18+
"description": "Mark pull request as draft (true) or ready for review (false)",
19+
"type": "boolean"
20+
},
1721
"maintainer_can_modify": {
1822
"description": "Allow maintainer edits",
1923
"type": "boolean"
@@ -30,6 +34,13 @@
3034
"description": "Repository name",
3135
"type": "string"
3236
},
37+
"reviewers": {
38+
"description": "GitHub usernames to request reviews from",
39+
"items": {
40+
"type": "string"
41+
},
42+
"type": "array"
43+
},
3344
"state": {
3445
"description": "New state",
3546
"enum": [

pkg/github/discussions.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func getQueryType(useOrdering bool, categoryID *githubv4.ID) any {
119119

120120
func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
121121
return mcp.NewTool("list_discussions",
122-
mcp.WithDescription(t("TOOL_LIST_DISCUSSIONS_DESCRIPTION", "List discussions for a repository")),
122+
mcp.WithDescription(t("TOOL_LIST_DISCUSSIONS_DESCRIPTION", "List discussions for a repository or organisation.")),
123123
mcp.WithToolAnnotation(mcp.ToolAnnotation{
124124
Title: t("TOOL_LIST_DISCUSSIONS_USER_TITLE", "List discussions"),
125125
ReadOnlyHint: ToBoolPtr(true),
@@ -129,8 +129,7 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
129129
mcp.Description("Repository owner"),
130130
),
131131
mcp.WithString("repo",
132-
mcp.Required(),
133-
mcp.Description("Repository name"),
132+
mcp.Description("Repository name. If not provided, discussions will be queried at the organisation level."),
134133
),
135134
mcp.WithString("category",
136135
mcp.Description("Optional filter by discussion category ID. If provided, only discussions with this category are listed."),
@@ -150,10 +149,15 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
150149
if err != nil {
151150
return mcp.NewToolResultError(err.Error()), nil
152151
}
153-
repo, err := RequiredParam[string](request, "repo")
152+
repo, err := OptionalParam[string](request, "repo")
154153
if err != nil {
155154
return mcp.NewToolResultError(err.Error()), nil
156155
}
156+
// when not provided, default to the .github repository
157+
// this will query discussions at the organisation level
158+
if repo == "" {
159+
repo = ".github"
160+
}
157161

158162
category, err := OptionalParam[string](request, "category")
159163
if err != nil {

0 commit comments

Comments
 (0)