OpenSRE connects to GitHub via the GitHub MCP server to search code, browse recent commits, inspect files, and trace changes correlated with alerts — helping identify which deployment or code change triggered an incident.Documentation Index
Fetch the complete documentation index at: https://opensre.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- GitHub account with repository access
- Personal access token or GitHub Copilot MCP access
Setup
Option 1: Interactive CLI
Option 2: Environment variables
| Variable | Default | Description |
|---|---|---|
GITHUB_MCP_AUTH_TOKEN | — | Required. GitHub personal access token |
GITHUB_MCP_URL | https://api.githubcopilot.com/mcp/ | GitHub MCP server URL |
GITHUB_MCP_MODE | streamable-http | Transport mode: streamable-http, sse, or stdio |
GITHUB_MCP_TOOLSETS | repos,issues,pull_requests,actions | Comma-separated toolsets to enable |
GITHUB_MCP_COMMAND | — | Command to run (required for stdio mode only) |
GITHUB_MCP_ARGS | — | Space-separated args for stdio mode |
Option 3: Persistent store
Creating a personal access token
- In GitHub, go to Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token
- Select the following scopes:
repo,read:org - Copy the token
For GitHub Enterprise Server, set
GITHUB_MCP_URL to your enterprise MCP endpoint.Transport modes
| Mode | When to use |
|---|---|
streamable-http | Default. Works with GitHub Copilot MCP and most hosted instances |
sse | For older MCP servers using Server-Sent Events |
stdio | For running a local MCP server process (npx @modelcontextprotocol/server-github) |
Verify
Troubleshooting
| Symptom | Fix |
|---|---|
| Authentication failed | Check that the token has repo scope and is not expired |
| Required tools missing | Ensure toolsets include repos — it provides get_file_contents, list_commits, etc. |
| Connection refused | Verify GITHUB_MCP_URL is reachable and the MCP server is running |
Security best practices
- Use a fine-grained personal access token with read-only repository access.
- Limit token scope to the repositories OpenSRE needs to inspect.
- Store the token in
.env, not in source code.
Tracer