Github Second Brain MCP Server

Providing tools to AI to explore github codebase like agent

Remote serverstreamable-httpGo

What is the Github Second Brain MCP server?

Github Second Brain MCP server exists for a simple reason — assistants are far more useful when they can act on Github Second Brain directly instead of describing what you should do. Providing tools to AI to explore github codebase like agent.

What you get

A set of tools that let AI explore github repos on-demand so it can better assist you.

Setting it up

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

What the assistant can call

Once Github Second Brain is connected, these are the calls the assistant has available:

  • Solution — A self-hosted mcp server that gives an AI client a set of tools to explore and understand GitHub repos on its own
  • get_tree_directory — The get_tree_directory tool exposed by this server
  • get_repo_contents — The get_repo_contents tool exposed by this server
  • get_issue_context — The get_issue_context tool exposed by this server
  • get_code_diff — The get_code_diff tool exposed by this server

Configuration and credentials

You will need 2 environment variables: GITHUB_PERSONAL_ACCESS_TOKEN, YOUR_PERSONAL_GITHUB_ACCESS_TOKEN. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Before you rely on it

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the github second brain mcp server does with a few real requests.

Choosing this one

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Github Second Brain's toolset — Solution, get_tree_directory, get_repo_contents and 2 more — is a fair guide to whether it matches your workflow. It is maintained by BaoNguyen09; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Github Second Brain's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
SolutionA self-hosted mcp server that gives an AI client a set of tools to explore and understand GitHub repos on its own.
get_tree_directoryThe get_tree_directory tool exposed by this server.
get_repo_contentsThe get_repo_contents tool exposed by this server.
get_issue_contextThe get_issue_context tool exposed by this server.
get_code_diffThe get_code_diff tool exposed by this server.

How to install the Github Second Brain MCP server

{
  "mcpServers": {
    "github-second-brain": {
      "command": "docker",
      "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "GITHUB_PERSONAL_ACCESS_TOKEN",
          "ghcr.io/baonguyen09/github-second-brain:latest"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_PERSONAL_GITHUB_ACCESS_TOKEN"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GITHUB_PERSONAL_ACCESS_TOKENCredential the server authenticates with.Yes
YOUR_PERSONAL_GITHUB_ACCESS_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Github Second Brain to Solution.
  • Use Github Second Brain to get tree directory.
  • Use Github Second Brain to get repo contents.

Frequently asked questions

You need Docker installed and running, and a GitHub Personal Access Token with appropriate permissions for the GitHub APIs the server will use.