Services → GitHub

Connect GitHub

Read code, history and diffs from selected repositories. One connection per repository, each with a token that can reach only that repository.

Tier 1 Fine-grained personal access token ~5 min profile github/code-read

Setting this up with your own agent? Give it these instructions.

Why one token per repository

The hosted GitHub MCP endpoint is a single URL. Which repository a call reaches is

decided by the owner and repo arguments, not by the address you connect to. So

naming a Prodpeek connection gh-api does not stop it reading gh-billing — only

the token does.

That is why the shape here is one connection per repository, each with its own

fine-grained token scoped to exactly that repository. A project spanning four repos

is four connections in the same Prodpeek project. It is slightly more setup, and it

is the difference between "we asked it not to" and "it cannot".

Steps

  1. Go to **Settings → Developer settings → Personal access tokens → Fine-grained tokens and choose Generate new token**. (Direct link: https://github.com/settings/personal-access-tokens/new.)
  1. Name it for the connection you are about to create — prodpeek-<repo> — so that revoking the right one later is obvious.
  1. Set an expiry. Ninety days is a reasonable default; a token wired into a gateway is exactly the kind that gets forgotten.
  1. Under Repository access, choose Only select repositories and pick the one repository this connection is for. Not "All repositories".
  1. Under Repository permissions, set: - Contents → Read-only - Pull requests → Read-only (skip if you only need files and history) - Metadata → Read-only (GitHub adds this automatically)

Leave everything else at No access. In particular leave Secret scanning

alerts, Code scanning alerts and Actions alone — the profile denies those tools,

and a token that cannot reach them means the denial holds even if the profile is

ever misconfigured.

  1. Generate the token and copy it. GitHub shows it once.
  1. In Prodpeek: Services → Add a service, choose GitHub — code read, name it after the repository, leave the URL at the suggested endpoint, and paste the token. Then Test connection — it lists what the endpoint advertises and how the profile classifies each tool.

If you are adding several repositories

Repeat the whole thing per repository, including a new token each time. The "Add

another endpoint" button on a service card copies a connection's credential to a new

URL, which is right for a vendor that splits one account across endpoints

(DigitalOcean) — but wrong here: sharing a token across repositories is precisely

the scoping you just set up being undone.

Screenshots

Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token. Screenshot pending — the steps above stand on their own.
Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token.
Repository access set to "Only select repositories", with a single repository chosen. Screenshot pending — the steps above stand on their own.
Repository access set to "Only select repositories", with a single repository chosen.
Contents, Pull requests and Metadata each set to Read-only — and nothing set to Read and write. Screenshot pending — the steps above stand on their own.
Contents, Pull requests and Metadata each set to Read-only — and nothing set to Read and write.