Skip to content

Commit 023bf78

Browse files
Merge branch 'main' into main
2 parents 8e7cd40 + 0418808 commit 023bf78

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4996
-627
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ updates:
1313
directory: "/"
1414
schedule:
1515
interval: "weekly"
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "weekly"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Close inactive issues
2+
on:
3+
schedule:
4+
- cron: "30 8 * * *"
5+
6+
jobs:
7+
close-issues:
8+
runs-on: ubuntu-latest
9+
env:
10+
PR_DAYS_BEFORE_STALE: 60
11+
PR_DAYS_BEFORE_CLOSE: 120
12+
PR_STALE_LABEL: stale
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
steps:
17+
- uses: actions/stale@v9
18+
with:
19+
days-before-issue-stale: ${{ env.PR_DAYS_BEFORE_STALE }}
20+
days-before-issue-close: ${{ env.PR_DAYS_BEFORE_CLOSE }}
21+
stale-issue-label: ${{ env.PR_STALE_LABEL }}
22+
stale-issue-message: "This issue is stale because it has been open for ${{ env.PR_DAYS_BEFORE_STALE }} days with no activity. Leave a comment to avoid closing this issue in ${{ env.PR_DAYS_BEFORE_CLOSE }} days."
23+
close-issue-message: "This issue was closed because it has been inactive for ${{ env.PR_DAYS_BEFORE_CLOSE }} days since being marked as stale."
24+
days-before-pr-stale: -1
25+
days-before-pr-close: -1
26+
# Start with the oldest items first
27+
ascending: true
28+
repo-token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 78 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Alternatively, to manually configure VS Code, choose the appropriate JSON block
3636
<tr><th align=left colspan=2>VS Code (version 1.101 or greater)</th></tr>
3737
<tr valign=top>
3838
<td>
39-
39+
4040
```json
4141
{
4242
"servers": {
@@ -130,7 +130,7 @@ To keep your GitHub PAT secure and reusable across different MCP hosts:
130130
```bash
131131
# CLI usage
132132
claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT
133-
133+
134134
# In config files (where supported)
135135
"env": {
136136
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
@@ -144,6 +144,7 @@ To keep your GitHub PAT secure and reusable across different MCP hosts:
144144
- **Minimum scopes**: Only grant necessary permissions
145145
- `repo` - Repository operations
146146
- `read:packages` - Docker image access
147+
- `read:org` - Organization team access
147148
- **Separate tokens**: Use different PATs for different projects/environments
148149
- **Regular rotation**: Update tokens periodically
149150
- **Never commit**: Keep tokens out of version control
@@ -240,10 +241,10 @@ For other MCP host applications, please refer to our installation guides:
240241

241242
- **[GitHub Copilot in other IDEs](/docs/installation-guides/install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
242243
- **[Claude Code & Claude Desktop](docs/installation-guides/install-claude.md)** - Installation guide for Claude Code and Claude Desktop
243-
- **[Cursor](docs/installation-guides/install-cursor.md)** - Installation guide for Cursor IDE
244+
- **[Cursor](docs/installation-guides/install-cursor.md)** - Installation guide for Cursor IDE
244245
- **[Windsurf](docs/installation-guides/install-windsurf.md)** - Installation guide for Windsurf IDE
245246

246-
For a complete overview of all installation options, see our **[Installation Guides Index](docs/installation-guides/installation-guides.md)**.
247+
For a complete overview of all installation options, see our **[Installation Guides Index](docs/installation-guides)**.
247248

248249
> **Note:** Any host application that supports local MCP servers should be able to access the local GitHub MCP server. However, the specific configuration process, syntax and stability of the integration will vary by host application. While many may follow a similar format to the examples above, this is not guaranteed. Please refer to your host application's documentation for the correct MCP configuration syntax and setup process.
249250
@@ -294,6 +295,7 @@ The following sets of tools are available (all are on by default):
294295
| `pull_requests` | GitHub Pull Request related tools |
295296
| `repos` | GitHub Repository related tools |
296297
| `secret_protection` | Secret protection related tools, such as GitHub Secret Scanning |
298+
| `security_advisories` | Security advisories related tools |
297299
| `users` | GitHub User related tools |
298300
<!-- END AUTOMATED TOOLSETS -->
299301

@@ -421,6 +423,13 @@ The following sets of tools are available (all are on by default):
421423
- **get_me** - Get my user profile
422424
- No parameters required
423425

426+
- **get_team_members** - Get team members
427+
- `org`: Organization login (owner) that contains the team. (string, required)
428+
- `team_slug`: Team slug (string, required)
429+
430+
- **get_teams** - Get teams
431+
- `user`: Username to get teams for. If not provided, uses the authenticated user. (string, optional)
432+
424433
</details>
425434

426435
<details>
@@ -458,7 +467,7 @@ The following sets of tools are available (all are on by default):
458467

459468
- **list_discussion_categories** - List discussion categories
460469
- `owner`: Repository owner (string, required)
461-
- `repo`: Repository name (string, required)
470+
- `repo`: Repository name. If not provided, discussion categories will be queried at the organisation level. (string, optional)
462471

463472
- **list_discussions** - List discussions
464473
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
@@ -525,6 +534,7 @@ The following sets of tools are available (all are on by default):
525534
- `owner`: Repository owner (string, required)
526535
- `repo`: Repository name (string, required)
527536
- `title`: Issue title (string, required)
537+
- `type`: Type of this issue (string, optional)
528538

529539
- **get_issue** - Get issue details
530540
- `issue_number`: The number of the issue (number, required)
@@ -556,17 +566,20 @@ The following sets of tools are available (all are on by default):
556566
- `page`: Page number for pagination (min 1) (number, optional)
557567
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
558568
- `repo`: Repository name (string, required)
569+
570+
- **list_issue_types** - List available issue types
571+
- `owner`: The organization owner of the repository (string, required)
559572

560573
- **list_issues** - List issues
561-
- `direction`: Sort direction (string, optional)
574+
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
575+
- `direction`: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)
562576
- `labels`: Filter by labels (string[], optional)
577+
- `orderBy`: Order issues by field. If provided, the 'direction' also needs to be provided. (string, optional)
563578
- `owner`: Repository owner (string, required)
564-
- `page`: Page number for pagination (min 1) (number, optional)
565579
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
566580
- `repo`: Repository name (string, required)
567581
- `since`: Filter by date (ISO 8601 timestamp) (string, optional)
568-
- `sort`: Sort order (string, optional)
569-
- `state`: Filter by state (string, optional)
582+
- `state`: Filter by state, by default both open and closed issues are returned when not provided (string, optional)
570583

571584
- **list_sub_issues** - List sub-issues
572585
- `issue_number`: Issue number (number, required)
@@ -591,11 +604,11 @@ The following sets of tools are available (all are on by default):
591604

592605
- **search_issues** - Search issues
593606
- `order`: Sort order (string, optional)
594-
- `owner`: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
607+
- `owner`: Optional repository owner. If provided with repo, only issues for this repository are listed. (string, optional)
595608
- `page`: Page number for pagination (min 1) (number, optional)
596609
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
597610
- `query`: Search query using GitHub issues search syntax (string, required)
598-
- `repo`: Optional repository name. If provided with owner, only notifications for this repository are listed. (string, optional)
611+
- `repo`: Optional repository name. If provided with owner, only issues for this repository are listed. (string, optional)
599612
- `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)
600613

601614
- **update_issue** - Edit issue
@@ -608,6 +621,7 @@ The following sets of tools are available (all are on by default):
608621
- `repo`: Repository name (string, required)
609622
- `state`: New state (string, optional)
610623
- `title`: New title (string, optional)
624+
- `type`: New issue type (string, optional)
611625

612626
</details>
613627

@@ -763,11 +777,11 @@ The following sets of tools are available (all are on by default):
763777

764778
- **search_pull_requests** - Search pull requests
765779
- `order`: Sort order (string, optional)
766-
- `owner`: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
780+
- `owner`: Optional repository owner. If provided with repo, only pull requests for this repository are listed. (string, optional)
767781
- `page`: Page number for pagination (min 1) (number, optional)
768782
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
769783
- `query`: Search query using GitHub pull request search syntax (string, required)
770-
- `repo`: Optional repository name. If provided with owner, only notifications for this repository are listed. (string, optional)
784+
- `repo`: Optional repository name. If provided with owner, only pull requests for this repository are listed. (string, optional)
771785
- `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)
772786

773787
- **submit_pending_pull_request_review** - Submit the requester's latest pending pull request review
@@ -848,6 +862,15 @@ The following sets of tools are available (all are on by default):
848862
- `repo`: Repository name (string, required)
849863
- `sha`: Accepts optional commit SHA. If specified, it will be used instead of ref (string, optional)
850864

865+
- **get_latest_release** - Get latest release
866+
- `owner`: Repository owner (string, required)
867+
- `repo`: Repository name (string, required)
868+
869+
- **get_release_by_tag** - Get a release by tag name
870+
- `owner`: Repository owner (string, required)
871+
- `repo`: Repository name (string, required)
872+
- `tag`: Tag name (e.g., 'v1.0.0') (string, required)
873+
851874
- **get_tag** - Get tag details
852875
- `owner`: Repository owner (string, required)
853876
- `repo`: Repository name (string, required)
@@ -867,6 +890,12 @@ The following sets of tools are available (all are on by default):
867890
- `repo`: Repository name (string, required)
868891
- `sha`: Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA. (string, optional)
869892

893+
- **list_releases** - List releases
894+
- `owner`: Repository owner (string, required)
895+
- `page`: Page number for pagination (min 1) (number, optional)
896+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
897+
- `repo`: Repository name (string, required)
898+
870899
- **list_tags** - List tags
871900
- `owner`: Repository owner (string, required)
872901
- `page`: Page number for pagination (min 1) (number, optional)
@@ -914,6 +943,41 @@ The following sets of tools are available (all are on by default):
914943

915944
<details>
916945

946+
<summary>Security Advisories</summary>
947+
948+
- **get_global_security_advisory** - Get a global security advisory
949+
- `ghsaId`: GitHub Security Advisory ID (format: GHSA-xxxx-xxxx-xxxx). (string, required)
950+
951+
- **list_global_security_advisories** - List global security advisories
952+
- `affects`: Filter advisories by affected package or version (e.g. "package1,package2@1.0.0"). (string, optional)
953+
- `cveId`: Filter by CVE ID. (string, optional)
954+
- `cwes`: Filter by Common Weakness Enumeration IDs (e.g. ["79", "284", "22"]). (string[], optional)
955+
- `ecosystem`: Filter by package ecosystem. (string, optional)
956+
- `ghsaId`: Filter by GitHub Security Advisory ID (format: GHSA-xxxx-xxxx-xxxx). (string, optional)
957+
- `isWithdrawn`: Whether to only return withdrawn advisories. (boolean, optional)
958+
- `modified`: Filter by publish or update date or date range (ISO 8601 date or range). (string, optional)
959+
- `published`: Filter by publish date or date range (ISO 8601 date or range). (string, optional)
960+
- `severity`: Filter by severity. (string, optional)
961+
- `type`: Advisory type. (string, optional)
962+
- `updated`: Filter by update date or date range (ISO 8601 date or range). (string, optional)
963+
964+
- **list_org_repository_security_advisories** - List org repository security advisories
965+
- `direction`: Sort direction. (string, optional)
966+
- `org`: The organization login. (string, required)
967+
- `sort`: Sort field. (string, optional)
968+
- `state`: Filter by advisory state. (string, optional)
969+
970+
- **list_repository_security_advisories** - List repository security advisories
971+
- `direction`: Sort direction. (string, optional)
972+
- `owner`: The owner of the repository. (string, required)
973+
- `repo`: The name of the repository. (string, required)
974+
- `sort`: Sort field. (string, optional)
975+
- `state`: Filter by advisory state. (string, optional)
976+
977+
</details>
978+
979+
<details>
980+
917981
<summary>Users</summary>
918982

919983
- **search_users** - Search users
@@ -1094,4 +1158,4 @@ The exported Go API of this module should currently be considered unstable, and
10941158

10951159
## License
10961160

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

cmd/github-mcp-server/generate_docs.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/github/github-mcp-server/pkg/raw"
1414
"github.com/github/github-mcp-server/pkg/toolsets"
1515
"github.com/github/github-mcp-server/pkg/translations"
16-
gogithub "github.com/google/go-github/v73/github"
16+
gogithub "github.com/google/go-github/v74/github"
1717
"github.com/mark3labs/mcp-go/mcp"
1818
"github.com/shurcooL/githubv4"
1919
"github.com/spf13/cobra"
@@ -64,7 +64,7 @@ func generateReadmeDocs(readmePath string) error {
6464
t, _ := translations.TranslationHelper()
6565

6666
// Create toolset group with mock clients
67-
tsg := github.DefaultToolsetGroup(false, mockGetClient, mockGetGQLClient, mockGetRawClient, t)
67+
tsg := github.DefaultToolsetGroup(false, mockGetClient, mockGetGQLClient, mockGetRawClient, t, 5000)
6868

6969
// Generate toolsets documentation
7070
toolsetsDoc := generateToolsetsDoc(tsg)
@@ -302,7 +302,7 @@ func generateRemoteToolsetsDoc() string {
302302
t, _ := translations.TranslationHelper()
303303

304304
// Create toolset group with mock clients
305-
tsg := github.DefaultToolsetGroup(false, mockGetClient, mockGetGQLClient, mockGetRawClient, t)
305+
tsg := github.DefaultToolsetGroup(false, mockGetClient, mockGetGQLClient, mockGetRawClient, t, 5000)
306306

307307
// Generate table header
308308
buf.WriteString("| Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")

cmd/github-mcp-server/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ var (
5555
ExportTranslations: viper.GetBool("export-translations"),
5656
EnableCommandLogging: viper.GetBool("enable-command-logging"),
5757
LogFilePath: viper.GetString("log-file"),
58+
ContentWindowSize: viper.GetInt("content-window-size"),
5859
}
5960
return ghmcp.RunStdioServer(stdioServerConfig)
6061
},
@@ -75,6 +76,7 @@ func init() {
7576
rootCmd.PersistentFlags().Bool("enable-command-logging", false, "When enabled, the server will log all command requests and responses to the log file")
7677
rootCmd.PersistentFlags().Bool("export-translations", false, "Save translations to a JSON file")
7778
rootCmd.PersistentFlags().String("gh-host", "", "Specify the GitHub hostname (for GitHub Enterprise etc.)")
79+
rootCmd.PersistentFlags().Int("content-window-size", 5000, "Specify the content window size")
7880

7981
// Bind flag to viper
8082
_ = viper.BindPFlag("toolsets", rootCmd.PersistentFlags().Lookup("toolsets"))
@@ -84,6 +86,7 @@ func init() {
8486
_ = viper.BindPFlag("enable-command-logging", rootCmd.PersistentFlags().Lookup("enable-command-logging"))
8587
_ = viper.BindPFlag("export-translations", rootCmd.PersistentFlags().Lookup("export-translations"))
8688
_ = viper.BindPFlag("host", rootCmd.PersistentFlags().Lookup("gh-host"))
89+
_ = viper.BindPFlag("content-window-size", rootCmd.PersistentFlags().Lookup("content-window-size"))
8790

8891
// Add subcommands
8992
rootCmd.AddCommand(stdioCmd)

0 commit comments

Comments
 (0)