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

Commitd225fb4

Browse files
authored
Merge branch 'main' into connor4312-patch-1
2 parentsaaa9fc5 +3f7d5b0 commitd225fb4

25 files changed

+1337
-136
lines changed

‎.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@juruen@sammorrowdrums@williammartin@toby

‎.github/workflows/docker-publish.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name:Docker
2+
3+
# This workflow uses actions that are not certified by GitHub.
4+
# They are provided by a third-party and are governed by
5+
# separate terms of service, privacy policy, and support
6+
# documentation.
7+
8+
on:
9+
schedule:
10+
-cron:'27 0 * * *'
11+
push:
12+
branches:[ "main" ]
13+
# Publish semver tags as releases.
14+
tags:[ 'v*.*.*' ]
15+
pull_request:
16+
branches:[ "main" ]
17+
18+
env:
19+
# Use docker.io for Docker Hub if empty
20+
REGISTRY:ghcr.io
21+
# github.repository as <account>/<repo>
22+
IMAGE_NAME:${{ github.repository }}
23+
24+
25+
jobs:
26+
build:
27+
28+
runs-on:ubuntu-latest
29+
permissions:
30+
contents:read
31+
packages:write
32+
# This is used to complete the identity challenge
33+
# with sigstore/fulcio when running outside of PRs.
34+
id-token:write
35+
36+
steps:
37+
-name:Checkout repository
38+
uses:actions/checkout@v4
39+
40+
# Install the cosign tool except on PR
41+
# https://github.com/sigstore/cosign-installer
42+
-name:Install cosign
43+
if:github.event_name != 'pull_request'
44+
uses:sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20#v3.5.0
45+
with:
46+
cosign-release:'v2.2.4'
47+
48+
# Set up BuildKit Docker container builder to be able to build
49+
# multi-platform images and export cache
50+
# https://github.com/docker/setup-buildx-action
51+
-name:Set up Docker Buildx
52+
uses:docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226# v3.0.0
53+
54+
# Login against a Docker registry except on PR
55+
# https://github.com/docker/login-action
56+
-name:Log into registry ${{ env.REGISTRY }}
57+
if:github.event_name != 'pull_request'
58+
uses:docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d# v3.0.0
59+
with:
60+
registry:${{ env.REGISTRY }}
61+
username:${{ github.actor }}
62+
password:${{ secrets.GITHUB_TOKEN }}
63+
64+
# Extract metadata (tags, labels) for Docker
65+
# https://github.com/docker/metadata-action
66+
-name:Extract Docker metadata
67+
id:meta
68+
uses:docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934# v5.0.0
69+
with:
70+
images:${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
71+
72+
# Build and push Docker image with Buildx (don't push on PR)
73+
# https://github.com/docker/build-push-action
74+
-name:Build and push Docker image
75+
id:build-and-push
76+
uses:docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09# v5.0.0
77+
with:
78+
context:.
79+
push:${{ github.event_name != 'pull_request' }}
80+
tags:${{ steps.meta.outputs.tags }}
81+
labels:${{ steps.meta.outputs.labels }}
82+
cache-from:type=gha
83+
cache-to:type=gha,mode=max
84+
85+
# Sign the resulting Docker image digest except on PRs.
86+
# This will only write to the public Rekor transparency log when the Docker
87+
# repository is public to avoid leaking data. If you would like to publish
88+
# transparency data even for private images, pass --force to cosign below.
89+
# https://github.com/sigstore/cosign
90+
-name:Sign the published Docker image
91+
if:${{ github.event_name != 'pull_request' }}
92+
env:
93+
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
94+
TAGS:${{ steps.meta.outputs.tags }}
95+
DIGEST:${{ steps.build-and-push.outputs.digest }}
96+
# This step uses the identity token to provision an ephemeral certificate
97+
# against the sigstore community Fulcio instance.
98+
run:echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

‎CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
##Contributing
2+
3+
[fork]:https://github.com/github/github-mcp-server/fork
4+
[pr]:https://github.com/github/github-mcp-server/compare
5+
[style]:https://github.com/github/github-mcp-server/blob/main/.golangci.yaml
6+
7+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
8+
9+
Contributions to this project are[released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the[project's open source license](LICENSE.txt).
10+
11+
Please note that this project is released with a[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
12+
13+
##Prerequisites for running and testing code
14+
15+
These are one time installations required to be able to test your changes locally as part of the pull request (PR) submission process.
16+
17+
1. install Go[through download](https://go.dev/doc/install) |[through Homebrew](https://formulae.brew.sh/formula/go)
18+
1.[install golangci-lint](https://golangci-lint.run/welcome/install/#local-installation)
19+
20+
##Submitting a pull request
21+
22+
1.[Fork][fork] and clone the repository
23+
1. Make sure the tests pass on your machine:`go test -v ./...`
24+
1. Make sure linter passes on your machine:`golangci-lint run`
25+
1. Create a new branch:`git checkout -b my-branch-name`
26+
1. Make your change, add tests, and make sure the tests and linter still pass
27+
1. Push to your fork and[submit a pull request][pr]
28+
1. Pat yourself on the back and wait for your pull request to be reviewed and merged.
29+
30+
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
31+
32+
- Follow the[style guide][style].
33+
- Write tests.
34+
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
35+
- Write a[good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
36+
37+
##Resources
38+
39+
-[How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
40+
-[Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
41+
-[GitHub Help](https://help.github.com)

‎Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM golang:1.23.7 AS build
2+
# Set the working directory
3+
WORKDIR /build
4+
# Copy the current directory contents into the working directory
5+
COPY . .
6+
# Install dependencies
7+
RUN go mod download
8+
# Build the server
9+
RUN CGO_ENABLED=0 go build -o github-mcp-server cmd/github-mcp-server/main.go
10+
# Make a stage to run the app
11+
FROM gcr.io/distroless/base-debian12
12+
# Set the working directory
13+
WORKDIR /server
14+
# Copy the binary from the build stage
15+
COPY --from=build /build/github-mcp-server .
16+
# Command to run the server
17+
CMD ["./github-mcp-server","stdio"]

‎README.md

Lines changed: 106 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,34 @@ and set it as the GITHUB_PERSONAL_ACCESS_TOKEN environment variable.
2222
-`repo`: Repository name (string, required)
2323
-`issue_number`: Issue number (number, required)
2424

25+
-**create_issue** - Create a new issue in a GitHub repository
26+
27+
-`owner`: Repository owner (string, required)
28+
-`repo`: Repository name (string, required)
29+
-`title`: Issue title (string, required)
30+
-`body`: Issue body content (string, optional)
31+
-`assignees`: Comma-separated list of usernames to assign to this issue (string, optional)
32+
-`labels`: Comma-separated list of labels to apply to this issue (string, optional)
33+
2534
-**add_issue_comment** - Add a comment to an issue
2635

2736
-`owner`: Repository owner (string, required)
2837
-`repo`: Repository name (string, required)
2938
-`issue_number`: Issue number (number, required)
3039
-`body`: Comment text (string, required)
3140

41+
-**list_issues** - List and filter repository issues
42+
43+
-`owner`: Repository owner (string, required)
44+
-`repo`: Repository name (string, required)
45+
-`state`: Filter by state ('open', 'closed', 'all') (string, optional)
46+
-`labels`: Comma-separated list of labels to filter by (string, optional)
47+
-`sort`: Sort by ('created', 'updated', 'comments') (string, optional)
48+
-`direction`: Sort direction ('asc', 'desc') (string, optional)
49+
-`since`: Filter by date (ISO 8601 timestamp) (string, optional)
50+
-`page`: Page number (number, optional)
51+
-`per_page`: Results per page (number, optional)
52+
3253
-**search_issues** - Search for issues and pull requests
3354
-`query`: Search query (string, required)
3455
-`sort`: Sort field (string, optional)
@@ -181,6 +202,59 @@ and set it as the GITHUB_PERSONAL_ACCESS_TOKEN environment variable.
181202
-`state`: Alert state (string, optional)
182203
-`severity`: Alert severity (string, optional)
183204

205+
##Resources
206+
207+
###Repository Content
208+
209+
-**Get Repository Content**
210+
Retrieves the content of a repository at a specific path.
211+
212+
-**Template**:`repo://{owner}/{repo}/contents{/path*}`
213+
-**Parameters**:
214+
-`owner`: Repository owner (string, required)
215+
-`repo`: Repository name (string, required)
216+
-`path`: File or directory path (string, optional)
217+
218+
-**Get Repository Content for a Specific Branch**
219+
Retrieves the content of a repository at a specific path for a given branch.
220+
221+
-**Template**:`repo://{owner}/{repo}/refs/heads/{branch}/contents{/path*}`
222+
-**Parameters**:
223+
-`owner`: Repository owner (string, required)
224+
-`repo`: Repository name (string, required)
225+
-`branch`: Branch name (string, required)
226+
-`path`: File or directory path (string, optional)
227+
228+
-**Get Repository Content for a Specific Commit**
229+
Retrieves the content of a repository at a specific path for a given commit.
230+
231+
-**Template**:`repo://{owner}/{repo}/sha/{sha}/contents{/path*}`
232+
-**Parameters**:
233+
-`owner`: Repository owner (string, required)
234+
-`repo`: Repository name (string, required)
235+
-`sha`: Commit SHA (string, required)
236+
-`path`: File or directory path (string, optional)
237+
238+
-**Get Repository Content for a Specific Tag**
239+
Retrieves the content of a repository at a specific path for a given tag.
240+
241+
-**Template**:`repo://{owner}/{repo}/refs/tags/{tag}/contents{/path*}`
242+
-**Parameters**:
243+
-`owner`: Repository owner (string, required)
244+
-`repo`: Repository name (string, required)
245+
-`tag`: Tag name (string, required)
246+
-`path`: File or directory path (string, optional)
247+
248+
-**Get Repository Content for a Specific Pull Request**
249+
Retrieves the content of a repository at a specific path for a given pull request.
250+
251+
-**Template**:`repo://{owner}/{repo}/refs/pull/{pr_number}/head/contents{/path*}`
252+
-**Parameters**:
253+
-`owner`: Repository owner (string, required)
254+
-`repo`: Repository name (string, required)
255+
-`pr_number`: Pull request number (string, required)
256+
-`path`: File or directory path (string, optional)
257+
184258
##Standard input/output server
185259

186260
```sh
@@ -214,9 +288,39 @@ GitHub MCP Server running on stdio
214288
215289
```
216290
291+
## i18n / Overriding descriptions
292+
293+
The descriptions of the tools can be overridden by creating a github-mcp-server.json filein the same directory as the binary.
294+
The file should contain a JSON object with the tool names as keys and the new descriptions as values.
295+
For example:
296+
297+
```json
298+
{
299+
"TOOL_ADD_ISSUE_COMMENT_DESCRIPTION":"an alternative description",
300+
"TOOL_CREATE_BRANCH_DESCRIPTION":"Create a new branchin a GitHub repository"
301+
}
302+
```
303+
304+
You can create anexport of the current translations by running the binary with the`--export-translations` flag.
305+
This flag will preserve any translations/overrides you have made,while adding any new translations that have been added to the binary since the lasttime you exported.
306+
307+
```sh
308+
./github-mcp-server --export-translations
309+
cat github-mcp-server.json
310+
```
311+
312+
You can also use ENV vars to override the descriptions. The environment variable names are the same as the keysin the JSON file,
313+
prefixed with`GITHUB_MCP_` and all uppercase.
314+
315+
For example, to override the`TOOL_ADD_ISSUE_COMMENT_DESCRIPTION` tool, you canset the following environment variable:
316+
317+
```sh
318+
export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"
319+
```
320+
217321
## Testing on VS Code Insiders
218322
219-
First of all, install`github-mcp-server`with:
323+
First of all, install`github-mcp-server` with:
220324
221325
```bash
222326
go install ./cmd/github-mcp-server
@@ -257,24 +361,21 @@ Try something like the following prompt to verify that it works:
257361
I'd like to know more about my GitHub profile.
258362
```
259363
260-
261364
## TODO
262365
263366
Lots of things!
264367
265368
Missing tools:
266369
267370
- push_files (files array)
268-
- create_issue (assignees and labels arrays)
269371
- list_issues (labels array)
270372
- update_issue (labels and assignees arrays)
271373
- create_pull_request_review (comments array)
272374
273375
Testing
274376
275-
- Unit tests
276377
- Integration tests
277-
- Blackbox testing: ideally comparing output toAnthromorphic's server to make sure that this is a fully compatible drop-in replacement.
378+
- Blackbox testing: ideally comparing output toAnthropic's server to make sure that this is a fully compatible drop-in replacement.
278379
279380
And some other stuff:
280381

‎SECURITY.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Thanks for helping make GitHub safe for everyone.
2+
3+
#Security
4+
5+
GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as[GitHub](https://github.com/GitHub).
6+
7+
Even though[open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation.
8+
9+
##Reporting Security Issues
10+
11+
If you believe you have found a security vulnerability in any GitHub-owned repository, please report it to us through coordinated disclosure.
12+
13+
**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**
14+
15+
Instead, please send an email to opensource-security[@]github.com.
16+
17+
Please include as much of the information listed below as you can to help us better understand and resolve the issue:
18+
19+
* The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
20+
* Full paths of source file(s) related to the manifestation of the issue
21+
* The location of the affected source code (tag/branch/commit or direct URL)
22+
* Any special configuration required to reproduce the issue
23+
* Step-by-step instructions to reproduce the issue
24+
* Proof-of-concept or exploit code (if possible)
25+
* Impact of the issue, including how an attacker might exploit the issue
26+
27+
This information will help us triage your report more quickly.
28+
29+
##Policy
30+
31+
See[GitHub's Safe Harbor Policy](https://docs.github.com/en/site-policy/security-policies/github-bug-bounty-program-legal-safe-harbor#1-safe-harbor-terms)

‎SUPPORT.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#Support
2+
3+
##How to file issues and get help
4+
5+
This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.
6+
7+
For help or questions about using this project, please open an issue.
8+
9+
- The`github-mcp-server` is under active development and maintained by GitHub staff**AND THE COMMUNITY**. We will do our best to respond to support, feature requests, and community questions in a timely manner.
10+
11+
##GitHub Support Policy
12+
13+
Support for this project is limited to the resources listed above.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp