GitHub Brain is an experimental MCP server for summarizing GitHub discussions, issues, and pull requests. It helps answer questions like:
- What are the contributions of user X in the last month?
- Summarize this month's discussions.
Claude.mp4
GitHub Brain complements (but does not replace) the official GitHub MCP server. It uses a local database to store data pulled from GitHub, enabling:
- Fast responses
- More results than the standard 100-item API limit
- Markdown output for token efficiency
As a bonus, GitHub Brain also includes a simple web-based UI for ultra-fast search of the discussions, issues, and pull requests.
As a bonus, GitHub Brain also includes a Raycast extension for ultra-fast search of the discussions, issues, and pull requests.
- Go installed
scripts/run <command> [<args>]Workflow:
- Populate the local database with the
pullcommand. - Start the MCP server with the
mcpcommand.
Re-run pull anytime to update the database with new GitHub data. You can do this while mcp is running, but MCP requests may temporarily return errors during the update.
Each command has its own arguments. Some can be set via environment variables. The app will also load variables from a .env file in the current directory.
Example .env file
GITHUB_TOKEN=your_github_token
ORGANIZATION=my-org
Populate the local database with GitHub data.
Example:
scripts/run pull -o my-orgThe first call for an organization may take a while. Subsequent calls are faster, updating only with new data.
| Argument | Variable | Description |
|---|---|---|
-t |
GITHUB_TOKEN |
Your GitHub personal token to access the API. Required. |
-o |
ORGANIZATION |
The GitHub organization to pull data from. Required. |
-db |
DB_DIR |
Path to the SQLite database directory. Default: db folder in the current directory. An <organization>.db file will be created here. |
-i |
Only pull selected entities. Choose from: repositories, discussions, issues, pull-requests. Comma-separated list. |
|
-f |
Remove all data before pulling. If combined with -i, only the specified items will be removed. |
|
-e |
EXCLUDED_REPOSITORIES |
Comma-separated list of repositories to exclude from the pull of discussions, issues, and pull-requests. Useful for large repositories that are not relevant to the analysis. |
Personal access token scopes
Use the [fine-grained personal access tokens](https://github.com/settings/personal-access-tokens).
For private organizations, the token must have the following configuration:
- Repository permissions: Read access to discussions, issues, metadata, and pull requests. Click [here](https://github.com/settings/personal-access-tokens/new?name=github-brain&description=http%3A%2F%2Fgithub.com%2Fwham%2Fgithub-brain&issues=read&pull_requests=read&discussions=read) to generate.
For public organizations, an empty token is sufficient, as the data is publicly accessible.
Start the MCP server using the local database.
Example:
scripts/run mcp -o my-org| Argument | Variable | Description |
|---|---|---|
-o |
ORGANIZATION |
The GitHub organization to work with. Required. |
-db |
DB_DIR |
Path to the SQLite database directory. Default: db folder in the current directory. Loads data from <organization>.db in this directory. |
Start the UI server, which provides a web-based interface for interacting with the GitHub data. Alternative to MCP for quick lookups.
Example:
scripts/run ui -o my-org| Argument | Variable | Description |
|---|---|---|
-o |
ORGANIZATION |
The GitHub organization to work with. Required. |
-db |
DB_DIR |
Path to the SQLite database directory. Default: db folder in the current directory. Loads data from <organization>.db in this directory. |
-p |
UI_PORT |
Port for the UI server. Default: 8080. |
scripts/run is a convenience script that runs the MCP server. It builds the Go code and runs the mcp command with the checkout directory as the working directory. As a result, the SQLite database will be created in the db folder of the checkout directory.
Add to the Claude MCP configuration file:
{
"mcpServers": {
"github-brain": {
"type": "stdio",
"command": "<path-to-the-checkout-directory>/scripts/run",
"args": ["mcp"]
}
}Where <path-to-the-checkout-directory> is the path to the GitHub Brain repository on your local machine. Merge if mcpServers already exists.
Add to the VS Code MCP configuration file:
{
"servers": {
"github-brain": {
"type": "stdio",
"command": "<path-to-the-checkout-directory>/scripts/run",
"args": ["mcp"],
"version": "0.0.1"
}
}
}Where <path-to-the-checkout-directory> is the path to the GitHub Brain repository on your local machine. Merge if servers already exists.
Run the Raycast extension with:
scripts/raycastThe extension uses the MCP server to search GitHub data.


