Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Migrate PR #1515 review threads refactoring to go-sdk#1521

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge2 commits intotonytrg/add-review-threads
base:tonytrg/add-review-threads
Choose a base branch
Loading
fromcopilot/fix-merge-conflicts-get-review-comments
Draft
Show file tree
Hide file tree
Changes fromall commits
Commits
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/copilot-instructions.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@ This is the **GitHub MCP Server**, a Model Context Protocol (MCP) server that co
-**Type:** MCP server application with CLI interface
-**Primary Package:** github-mcp-server (stdio MCP server -**this is the main focus**)
-**Secondary Package:** mcpcurl (testing utility - don't break it, but not the priority)
-**Framework:** Usesmark3labs/mcp-go for MCP protocol, google/go-github for GitHub API
-**Framework:** Usesmodelcontextprotocol/go-sdk for MCP protocol, google/go-github for GitHub API
-**Size:**~60MB repository, 70 Go files
-**Library Usage:** This repository is also used as a library by the remote server. Functions that could be called by other repositories should be exported (capitalized), even if not required internally. Preserve existing export patterns.

Expand Down
32 changes: 32 additions & 0 deletions.github/prompts/bug-report-review.prompt.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
messages:
- role: system
content: |
You are a triage assistant for the GitHub MCP Server repository. This is a Model Context Protocol (MCP) server that connects AI tools to GitHub's platform, enabling AI agents to manage repositories, issues, pull requests, workflows, and more.

Your job is to analyze bug reports and assess their completeness.

Analyze the issue for these key elements:
1. Clear description of the problem
2. Affected version (from running `docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version`)
3. Steps to reproduce the behavior
4. Expected vs actual behavior
5. Relevant logs (if applicable)

Provide ONE of these assessments:

### AI Assessment: Ready for Review
Use when the bug report has most required information and can be triaged by a maintainer.

### AI Assessment: Missing Details
Use when critical information is missing (no reproduction steps, no version info, unclear problem description).

### AI Assessment: Unsure
Use when you cannot determine the completeness of the report.

After your assessment header, provide a brief explanation of your rating.
If details are missing, note which specific sections need more information.
- role: user
content: "{{input}}"
model: openai/gpt-4o-mini
modelParameters:
max_tokens: 500
31 changes: 31 additions & 0 deletions.github/prompts/default-issue-review.prompt.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
messages:
- role: system
content: |
You are a triage assistant for the GitHub MCP Server repository. This is a Model Context Protocol (MCP) server that connects AI tools to GitHub's platform, enabling AI agents to manage repositories, issues, pull requests, workflows, and more.

Your job is to analyze new issues and help categorize them.

Analyze the issue to determine:
1. Is this a bug report, feature request, question, or something else?
2. Is the issue clear and well-described?
3. Does it contain enough information for maintainers to act on?

Provide ONE of these assessments:

### AI Assessment: Ready for Review
Use when the issue is clear, well-described, and contains enough context for maintainers to understand and act on it.

### AI Assessment: Missing Details
Use when the issue is unclear, lacks context, or needs more information to be actionable.

### AI Assessment: Unsure
Use when you cannot determine the nature or completeness of the issue.

After your assessment header, provide a brief explanation including:
- What type of issue this appears to be (bug, feature request, question, etc.)
- What additional information might be helpful if any
- role: user
content: "{{input}}"
model: openai/gpt-4o-mini
modelParameters:
max_tokens: 500
30 changes: 30 additions & 0 deletions.github/workflows/ai-issue-assessment.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
name: AI Issue Assessment

on:
issues:
types: [opened, labeled]

jobs:
ai-issue-assessment:
if: >
(github.event.action == 'opened' && github.event.issue.labels[0] == null) ||
(github.event.action == 'labeled' && github.event.label.name == 'bug')
runs-on: ubuntu-latest
permissions:
issues: write
models: read
contents: read

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Run AI assessment
uses: github/ai-assessment-comment-labeler@e3bedc38cfffa9179fe4cee8f7ecc93bffb3fee7 # v1.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ai_review_label: 'bug, enhancement'
issue_number: ${{ github.event.issue.number }}
issue_body: ${{ github.event.issue.body }}
prompts_directory: '.github/prompts'
labels_to_prompts_mapping: 'bug,bug-report-review.prompt.yml|default,default-issue-review.prompt.yml'
2 changes: 1 addition & 1 deletion.github/workflows/code-scanning.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,7 +35,7 @@ jobs:
runner:'["ubuntu-22.04"]'
steps:
-name:Checkout repository
uses:actions/checkout@v5
uses:actions/checkout@v6

-name:Initialize CodeQL
uses:github/codeql-action/init@v4
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/docker-publish.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,7 @@ jobs:

steps:
-name:Checkout repository
uses:actions/checkout@v5
uses:actions/checkout@v6

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/docs-check.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,7 +14,7 @@ jobs:
runs-on:ubuntu-latest
steps:
-name:Checkout code
uses:actions/checkout@v5
uses:actions/checkout@v6

-name:Set up Go
uses:actions/setup-go@v6
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/go.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/goreleaser.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,7 +14,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/license-check.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/lint.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,7 +13,7 @@ jobs:
name:lint
runs-on:ubuntu-latest
steps:
-uses:actions/checkout@v5
-uses:actions/checkout@v6
-uses:actions/setup-go@v6
with:
go-version:stable
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/moderator.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ jobs:
models:read
contents:read
steps:
-uses:actions/checkout@v5
-uses:actions/checkout@v6
-uses:github/ai-moderator@v1
with:
token:${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion.github/workflows/registry-releaser.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup Go
uses: actions/setup-go@v6
Expand Down
82 changes: 75 additions & 7 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/github/github-mcp-server)](https://goreportcard.com/report/github.com/github/github-mcp-server)

# GitHub MCP Server

The GitHub MCP Server connects AI tools directly to GitHub's platform. This gives AI agents, assistants, and chatbots the ability to read repositories and code files, manage issues and PRs, analyze code, and automate workflows. All through natural language interactions.
Expand DownExpand Up@@ -326,6 +328,8 @@ _Toolsets are not limited to Tools. Relevant MCP Resources and Prompts are also

When no toolsets are specified, [default toolsets](#default-toolset) are used.

> **Looking for examples?** See the [Server Configuration Guide](./docs/server-configuration.md) for common recipes like minimal setups, read-only mode, and combining tools with toolsets.

#### Specifying Toolsets

To specify toolsets you want available to the LLM, you can pass an allow-list in two ways:
Expand All@@ -343,6 +347,38 @@ To specify toolsets you want available to the LLM, you can pass an allow-list in

The environment variable `GITHUB_TOOLSETS` takes precedence over the command line argument if both are provided.

#### Specifying Individual Tools

You can also configure specific tools using the `--tools` flag. Tools can be used independently or combined with toolsets and dynamic toolsets discovery for fine-grained control.

1. **Using Command Line Argument**:

```bash
github-mcp-server --tools get_file_contents,issue_read,create_pull_request
```

2. **Using Environment Variable**:
```bash
GITHUB_TOOLS="get_file_contents,issue_read,create_pull_request" ./github-mcp-server
```

3. **Combining with Toolsets** (additive):
```bash
github-mcp-server --toolsets repos,issues --tools get_gist
```
This registers all tools from `repos` and `issues` toolsets, plus `get_gist`.

4. **Combining with Dynamic Toolsets** (additive):
```bash
github-mcp-server --tools get_file_contents --dynamic-toolsets
```
This registers `get_file_contents` plus the dynamic toolset tools (`enable_toolset`, `list_available_toolsets`, `get_toolset_tools`).

**Important Notes:**
- Tools, toolsets, and dynamic toolsets can all be used together
- Read-only mode takes priority: write tools are skipped if `--read-only` is set, even if explicitly requested via `--tools`
- Tool names must match exactly (e.g., `get_file_contents`, not `getFileContents`). Invalid tool names will cause the server to fail at startup with an error message

### Using Toolsets With Docker

When using Docker, you can pass the toolsets as environment variables:
Expand All@@ -354,6 +390,25 @@ docker run -i --rm \
ghcr.io/github/github-mcp-server
```

### Using Tools With Docker

When using Docker, you can pass specific tools as environment variables. You can also combine tools with toolsets:

```bash
# Tools only
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
-e GITHUB_TOOLS="get_file_contents,issue_read,create_pull_request" \
ghcr.io/github/github-mcp-server

# Tools combined with toolsets (additive)
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
-e GITHUB_TOOLSETS="repos,issues" \
-e GITHUB_TOOLS="get_gist" \
ghcr.io/github/github-mcp-server
```

### Special toolsets

#### "all" toolset
Expand DownExpand Up@@ -664,8 +719,8 @@ The following sets of tools are available:

- **issue_read** - Get issue details
- `issue_number`: The number of the issue (number, required)
- `method`: The read operation to perform on a single issue.
Options are:
- `method`: The read operation to perform on a single issue.
Options are:
1. get - Get details of a specific issue.
2. get_comments - Get issue comments.
3. get_sub_issues - Get sub-issues of the issue.
Expand All@@ -683,8 +738,8 @@ Options are:
- `issue_number`: Issue number to update (number, optional)
- `labels`: Labels to apply to this issue (string[], optional)
- `method`: Write operation to perform on a single issue.
Options are:
- 'create' - creates a new issue.
Options are:
- 'create' - creates a new issue.
- 'update' - updates an existing issue.
(string, required)
- `milestone`: Milestone number (number, optional)
Expand DownExpand Up@@ -764,7 +819,7 @@ Options are:
<summary>Notifications</summary>

- **dismiss_notification** - Dismiss notification
- `state`: The new state of the notification (read/done) (string,optional)
- `state`: The new state of the notification (read/done) (string,required)
- `threadID`: The ID of the notification thread (string, required)

- **get_notification_details** - Get notification details
Expand DownExpand Up@@ -1264,7 +1319,7 @@ docker run -i --rm \

## Lockdown Mode

Lockdown mode limits the content that the server will surface from public repositories. When enabled,requests that fetch issue details will return an error iftheissue was created by someone who does not havepush access to the repository. Private repositories are unaffected, and collaboratorscan still access their ownissues.
Lockdown mode limits the content that the server will surface from public repositories. When enabled,the server checks whethertheauthor of each item haspush access to the repository. Private repositories are unaffected, and collaboratorskeep full accesstotheir owncontent.

```bash
./github-mcp-server --lockdown-mode
Expand All@@ -1279,7 +1334,20 @@ docker run -i --rm \
ghcr.io/github/github-mcp-server
```

At the moment lockdown mode applies to the issue read toolset, but it is designed to extend to additional data surfaces over time.
The behavior of lockdown mode depends on the tool invoked.

Following tools will return an error when the author lacks the push access:

- `issue_read:get`
- `pull_request_read:get`

Following tools will filter out content from users lacking the push access:

- `issue_read:get_comments`
- `issue_read:get_sub_issues`
- `pull_request_read:get_comments`
- `pull_request_read:get_review_comments`
- `pull_request_read:get_reviews`

## i18n / Overriding Descriptions

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp