Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
28 changes: 28 additions & 0 deletions docs/hackbot/github.md
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
```
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ members = ["http_service", "agents/*", "libs/*", "services/*", "tools/*"]
exclude = [
# JavaScript package (no pyproject.toml).
"services/hackbot-ui",
# Compose configuration, not a Python package.
"services/github-mcp",
# Not migrated to the workspace yet.
"services/buildrepair",
]
Expand Down
6 changes: 6 additions & 0 deletions services/github-mcp/compose.yml

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

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"]

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?

ports:
- "127.0.0.1:8082:8082"