Skip to content

Add local read-only GitHub MCP server setup - #7383

Open
Foxbolts wants to merge 4 commits into
mozilla:masterfrom
Foxbolts:ml/hackbot-github-mcp
Open

Foxbolts wants to merge 4 commits into
mozilla:masterfrom
Foxbolts:ml/hackbot-github-mcp

Conversation

@Foxbolts

@Foxbolts Foxbolts commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Related to #7055

Description

Add a Docker Compose setup for running the official GitHub MCP server locally in read-only mode. The service runs independently of any agent and exposes repository, pull request, and issue tools.

Notes

  • Includes a manual check that reads a pull request and checks the server's tool annotations.
  • The client supplies a GitHub token; the server does not hold the GitHub App private key.
  • Production deployment and agent integration are separate work.

Testing

  • Pre-commit checks passed.
  • Ran the manual check against the official v2.0.3 server binary and the test PR; all 22 exposed tools reported read-only annotations.
  • Started the official container with Docker Compose and repeated the manual PR and read-only tool checks successfully.

@Foxbolts
Foxbolts requested a review from a team as a code owner November 3, 2026 22:08
class GitHubMCPServer:
def __init__(
self,
binary: str = "github-mcp-server",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at github-mcp-server, we might be able to replace all of this by deploying the official container as a service in our GCP project. That would do the work for us with almost no code on our side.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good. replaced the wrapper with a docker compose setup that runs the official gh mcp container in read-only mode for local development. I tested it against a test PR and confirmed it can read the PR and expose read-only tools. iiuc, we can connect an agent to it as part of the GitHub integration, and use the GCP service once it’s deployed

@Foxbolts
Foxbolts force-pushed the ml/hackbot-github-mcp branch from 029924f to 3dfd594 Compare November 6, 2026 18:33
@Foxbolts Foxbolts changed the title Add reusable read-only GitHub MCP support for broker sidecars Add local read-only GitHub MCP server setup Nov 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this under docs?

Copy link
Copy Markdown
Contributor Author

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

Comment thread services/github-mcp/check.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the goal if this check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a smoke test to verify that the server can read a PR and check for the tools. Forgot to remove the hardcoded test repo before opening the PR 😅 but I could also remove this if you don't think it's valuable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could drop it. We will later have that tested as part of the integration with the agents anyway.

@Foxbolts
Foxbolts force-pushed the ml/hackbot-github-mcp branch from 3dfd594 to 2fb67e7 Compare November 10, 2026 15:18
Comment thread services/github-mcp/check.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could drop it. We will later have that tested as part of the integration with the agents anyway.

services:
github-mcp:
image: ghcr.io/github/github-mcp-server:v2.0.3
command: ["http", "--read-only", "--toolsets=repos,pull_requests,issues"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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 GITHUB_PERSONAL_ACCESS_TOKEN on the container, but got a 401 without an auth header. Maybe we need another way to supply the token for the GCP service?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants