Skip to content

[pull] main from github:main #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7c62774
Add tail logs option (#615)
JoannaaKL Jun 30, 2025
b44dee6
Add script to generate docs (#622)
JoannaaKL Jul 1, 2025
721fd3e
Add comment to trim lines (#621)
JoannaaKL Jul 1, 2025
7200939
add DS_Store to .gitignore (#626)
tommaso-moro Jul 2, 2025
39109b3
Add discussion tools (#624)
JoannaaKL Jul 2, 2025
6043bec
Cleanup (#628)
JoannaaKL Jul 2, 2025
f88456f
Update list commits tool description (#629)
JoannaaKL Jul 2, 2025
23f6f3a
Add Dependabot Alert Tools (#631)
LuluBeatson Jul 3, 2025
08a49b0
use WithPagination tool option (#632)
LuluBeatson Jul 3, 2025
6c0453a
omit site_admin from get_me output
LuluBeatson Jul 4, 2025
37d1ed6
return MinimalUser
LuluBeatson Jul 4, 2025
1d057c9
refactor: user get methods to avoid nil checks
LuluBeatson Jul 4, 2025
e43fca1
embed optional UserDetails in MinimalUser
LuluBeatson Jul 4, 2025
ea73047
fix: stale information in CONTRIBUTING.md
SamMorrowDrums Jul 4, 2025
fc11713
Updated links to MCP Specification in `docs/host-integration.md` (#641)
jww3 Jul 7, 2025
39d7fec
Update `list_commits` Filtering Descriptions (#634)
LuluBeatson Jul 7, 2025
3730b84
fix: get_discussion graphQL invalid field (#648)
LuluBeatson Jul 7, 2025
0cf70eb
Remove redundant param for get_me and update contribution guide (#649)
tonytrg Jul 7, 2025
3341e6b
Update `create_or_update_file` SHA Arg Description (#651)
LuluBeatson Jul 8, 2025
89bb928
Include Copilot coding agent tool on the remote GitHub MCP server (#656)
nhu-do Jul 9, 2025
42e5ce9
Tommy/(Bug-fix): adjust tool description to account for author in pro…
tommaso-moro Jul 11, 2025
c23b1f9
`get_file_content` Match Paths in Git Tree if Full Path Unknown (#650)
LuluBeatson Jul 11, 2025
d15026b
fix: get_file_contents use "/" for root (#666)
LuluBeatson Jul 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: go mod download

- name: Run unit tests
run: go test -race ./...
run: script/test

- name: Build
run: go build -v ./cmd/github-mcp-server
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ __debug_bin*
# Go
vendor
bin/

# macOS
.DS_Store
21 changes: 11 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@ Please note that this project is released with a [Contributor Code of Conduct](C

These are one time installations required to be able to test your changes locally as part of the pull request (PR) submission process.

1. install Go [through download](https://go.dev/doc/install) | [through Homebrew](https://formulae.brew.sh/formula/go)
1. [install golangci-lint v2](https://golangci-lint.run/welcome/install/#local-installation)
1. Install Go [through download](https://go.dev/doc/install) | [through Homebrew](https://formulae.brew.sh/formula/go)
2. [Install golangci-lint v2](https://golangci-lint.run/welcome/install/#local-installation)

## Submitting a pull request

> **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`.

1. [Fork][fork] and clone the repository
1. Make sure the tests pass on your machine: `go test -v ./...`
1. Make sure linter passes on your machine: `golangci-lint run`
1. Create a new branch: `git checkout -b my-branch-name`
1. Make your change, add tests, and make sure the tests and linter still pass
1. Push to your fork and [submit a pull request][pr] targeting the `next` branch
1. Pat yourself on the back and wait for your pull request to be reviewed and merged.
2. Make sure the tests pass on your machine: `go test -v ./...`
3. Make sure linter passes on your machine: `golangci-lint run`
4. Create a new branch: `git checkout -b my-branch-name`
5. Add your changes and tests, and make sure the Action workflows still pass
- Run linter: `script/lint`
- Update snapshots and run tests: `UPDATE_TOOLSNAPS=true go test ./...`
- Update readme documentation: `script/generate-docs`
6. Push to your fork and [submit a pull request][pr] targeting the `main` branch
7. Pat yourself on the back and wait for your pull request to be reviewed and merged.

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

Expand Down
96 changes: 80 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ The following sets of tools are available (all are on by default):
| `context` | **Strongly recommended**: Tools that provide context about the current user and GitHub context you are operating in |
| `actions` | GitHub Actions workflows and CI/CD operations |
| `code_security` | Code security related tools, such as GitHub Code Scanning |
| `dependabot` | Dependabot tools |
| `discussions` | GitHub Discussions related tools |
| `experiments` | Experimental features that are not considered stable yet |
| `issues` | GitHub Issues related tools |
| `notifications` | GitHub Notifications related tools |
Expand Down Expand Up @@ -456,6 +458,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
- `repo`: Repository name (string, required)
- `return_content`: Returns actual log content instead of URLs (boolean, optional)
- `run_id`: Workflow run ID (required when using failed_only) (number, optional)
- `tail_lines`: Number of lines to return from the end of the log (number, optional)

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

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

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

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

- **rerun_failed_jobs** - Rerun failed jobs
Expand Down Expand Up @@ -547,7 +550,53 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
<summary>Context</summary>

- **get_me** - Get my user profile
- `reason`: Optional: the reason for requesting the user information (string, optional)
- No parameters required

</details>

<details>

<summary>Dependabot</summary>

- **get_dependabot_alert** - Get dependabot alert
- `alertNumber`: The number of the alert. (number, required)
- `owner`: The owner of the repository. (string, required)
- `repo`: The name of the repository. (string, required)

- **list_dependabot_alerts** - List dependabot alerts
- `owner`: The owner of the repository. (string, required)
- `repo`: The name of the repository. (string, required)
- `severity`: Filter dependabot alerts by severity (string, optional)
- `state`: Filter dependabot alerts by state. Defaults to open (string, optional)

</details>

<details>

<summary>Discussions</summary>

- **get_discussion** - Get discussion
- `discussionNumber`: Discussion Number (number, required)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

- **get_discussion_comments** - Get discussion comments
- `discussionNumber`: Discussion Number (number, required)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

- **list_discussion_categories** - List discussion categories
- `after`: Cursor for pagination, use the 'after' field from the previous response (string, optional)
- `before`: Cursor for pagination, use the 'before' field from the previous response (string, optional)
- `first`: Number of categories to return per page (min 1, max 100) (number, optional)
- `last`: Number of categories to return from the end (min 1, max 100) (number, optional)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

- **list_discussions** - List discussions
- `category`: Optional filter by discussion category ID. If provided, only discussions with this category are listed. (string, optional)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

</details>

Expand Down Expand Up @@ -583,8 +632,8 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
- **get_issue_comments** - Get issue comments
- `issue_number`: Issue number (number, required)
- `owner`: Repository owner (string, required)
- `page`: Page number (number, optional)
- `per_page`: Number of records per page (number, optional)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)

- **list_issues** - List issues
Expand Down Expand Up @@ -821,7 +870,7 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
- `owner`: Repository owner (username or organization) (string, required)
- `path`: Path where to create/update the file (string, required)
- `repo`: Repository name (string, required)
- `sha`: SHA of file being replaced (for updates) (string, optional)
- `sha`: Required if updating an existing file. The blob SHA of the file being replaced. (string, optional)

- **create_repository** - Create repository
- `autoInit`: Initialize with README (boolean, optional)
Expand Down Expand Up @@ -850,10 +899,10 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description

- **get_file_contents** - Get file or directory contents
- `owner`: Repository owner (username or organization) (string, required)
- `path`: Path to file/directory (directories must end with a slash '/') (string, required)
- `path`: Path to file/directory (directories must end with a slash '/') (string, optional)
- `ref`: Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head` (string, optional)
- `repo`: Repository name (string, required)
- `sha`: Accepts optional git sha, if sha is specified it will be used instead of ref (string, optional)
- `sha`: Accepts optional commit SHA. If specified, it will be used instead of ref (string, optional)

- **get_tag** - Get tag details
- `owner`: Repository owner (string, required)
Expand All @@ -867,12 +916,12 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
- `repo`: Repository name (string, required)

- **list_commits** - List commits
- `author`: Author username or email address (string, optional)
- `author`: Author username or email address to filter commits by (string, optional)
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)
- `sha`: SHA or Branch name (string, optional)
- `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)

- **list_tags** - List tags
- `owner`: Repository owner (string, required)
Expand Down Expand Up @@ -933,6 +982,21 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
</details>
<!-- END AUTOMATED TOOLS -->

### Additional Tools in Remote Github MCP Server

<details>

<summary>Copilot coding agent</summary>

- **create_pull_request_with_copilot** - Perform task with GitHub Copilot coding agent
- `owner`: Repository owner. You can guess the owner, but confirm it with the user before proceeding. (string, required)
- `repo`: Repository name. You can guess the repository name, but confirm it with the user before proceeding. (string, required)
- `problem_statement`: Detailed description of the task to be performed (e.g., 'Implement a feature that does X', 'Fix bug Y', etc.) (string, required)
- `title`: Title for the pull request that will be created (string, required)
- `base_ref`: Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch (string, optional)

</details>

## Library Usage

The exported Go API of this module should currently be considered unstable, and subject to breaking changes. In the future, we may offer stability; please file an issue if there is a use case where this would be valuable.
Expand Down
4 changes: 2 additions & 2 deletions docs/host-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ flowchart LR
- **Local MCP Server**: An MCP Server running locally, side-by-side with the Application.
- **Remote MCP Server**: An MCP Server running remotely, accessed via the internet. Most Remote MCP Servers require authentication via OAuth.

For more detail, see the [official MCP specification](https://modelcontextprotocol.io/specification/draft).
For more detail, see the [official MCP specification](https://modelcontextprotocol.io/specification/2025-06-18).

> [!NOTE]
> GitHub offers both a Local MCP Server and a Remote MCP Server.
Expand All @@ -84,7 +84,7 @@ For the Remote GitHub MCP Server, the recommended way to obtain a valid access t
> The Remote GitHub MCP Server itself does not provide Authentication services.
> Your client application must obtain valid GitHub access tokens through one of the supported methods.

The expected flow for obtaining a valid access token via OAuth is depicted in the [MCP Specification](https://modelcontextprotocol.io/specification/draft/basic/authorization#authorization-flow-steps). For convenience, we've embedded a copy of the authorization flow below. Please study it carefully as the remainder of this document is written with this flow in mind.
The expected flow for obtaining a valid access token via OAuth is depicted in the [MCP Specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization#authorization-flow-steps). For convenience, we've embedded a copy of the authorization flow below. Please study it carefully as the remainder of this document is written with this flow in mind.

```mermaid
sequenceDiagram
Expand Down
Loading
Loading