Connect an AI assistant to a GitHub account to read and act on repos, issues, and pull requests.
Shared by Parshu · Published Aug 1, 2026
Lets an AI assistant read repository contents, issues, and pull requests, and (depending on the token's scope) create or comment on them — useful for having an assistant triage issues, draft PR descriptions, or answer questions about a codebase's history directly. ```json { "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_GITHUB_TOKEN>" } } } } ``` Generate a token with only the scopes you actually need (read-only if you just want it answering questions; add repo write scope only if you want it opening issues/PRs on your behalf) — this token is exactly as powerful as whatever scopes you grant it, so don't over-grant out of convenience. Treat the token like any other credential: don't commit the config file with the token filled in to a public repo. Check the server's current documentation for the exact package name and available scopes before use, since MCP servers are updated frequently.