Repository navigation
Add local read-only GitHub MCP server setup #7383
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # GitHub MCP server for local development | ||
|
|
||
| The official GitHub MCP server provides read-only repository, pull request, and | ||
| issue tools. The Compose setup runs it locally for development, independently of | ||
| any agent. Production deployment and agent integration are separate work. | ||
|
|
||
| ## Start the server | ||
|
|
||
| Install Docker with Compose and start Docker, then run from the repository root: | ||
|
|
||
| ```bash | ||
| docker compose -f services/github-mcp/compose.yml up -d | ||
| ``` | ||
|
|
||
| The server listens at `http://127.0.0.1:8082/`. Clients running on the same | ||
| Compose network can use `http://github-mcp:8082/`. Each client must supply a | ||
| GitHub token in its `Authorization` header; the server does not hold the App's | ||
| private key. | ||
|
|
||
| The container's read-only flag controls its exposed tools. GitHub token | ||
| permissions also restrict what the token can do. The local server is not a | ||
| replacement for production access control. | ||
|
|
||
| When finished: | ||
|
|
||
| ```bash | ||
| docker compose -f services/github-mcp/compose.yml down | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| services: | ||
| github-mcp: | ||
| image: ghcr.io/github/github-mcp-server:v2.0.3 | ||
| command: ["http", "--read-only", "--toolsets=repos,pull_requests,issues"] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might need to add env here to pass the auth to the mcp directly instead of having the part of the mcp request if that is supported.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I might be misunderstanding this, but from the GitHub App auth docs, it looks like the server’s built-in App auth may only work in stdio mode, and HTTP clients need to provide a token. I also tried setting |
||
| ports: | ||
| - "127.0.0.1:8082:8082" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this under
docs?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to keep it separate from any particular agent, but I've now moved it to
services/github-mcp