Sign In

@abhishekmcp/github

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abhishekmcp/github

MCP server for GitHub — search repos/code/issues, read repos/issues/PRs/files, and create issues, authenticated via OAuth device flow or a token, from any MCP client.

Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@abhishekmcp/github

A GitHub MCP server: search, browse, and act on GitHub from any MCP client. Authenticates via OAuth device flow (real OAuth, no hosted callback) or a token. Pure JavaScript (@octokit/rest), no native dependencies.

GitHub ships an official, much larger MCP server. This is a focused, learning-oriented build that does auth/secrets handling cleanly.

Tools

Auth: github_login (device flow), github_logout, whoami Search: search_repos, search_code, search_issues Read: get_repo, list_issues, get_issue, list_pull_requests, get_pull_request, get_file_contents, list_notifications, rate_limit Write (omitted when GITHUB_READONLY=1): create_issue, add_issue_comment

Responses are trimmed to the useful fields to stay token-efficient.

Authentication

Resolved in this order (nothing is required at startup):

  • TokenGITHUB_TOKEN (or GITHUB_PERSONAL_ACCESS_TOKEN). A Personal Access Token; simplest path.
  • Cached OAuth token — from a previous github_login, stored at ~/.config/mcp-github/auth.json (0600), auto-refreshed when possible.
  • Otherwise tools return a clear "run github_login" message.

OAuth device flow (one-time setup)

Device flow needs a public OAuth-App client id (no secret):

  • Create a GitHub OAuth App and enable Device Flow.
  • export GITHUB_CLIENT_ID=<client id>.
  • Run github_login → open the printed URL, enter the code, then run github_login again to finish.

Tokens are cached locally with 0600 permissions and are never logged.

Configuration

VariableEffect
GITHUB_TOKEN / GITHUB_PERSONAL_ACCESS_TOKENUse this PAT (skips OAuth).
GITHUB_CLIENT_IDOAuth App client id for the device-flow login.
GITHUB_READONLY1/true → only read + auth tools are registered.

Usage

# Claude Code (plugin):  /plugin marketplace add Abhishekkumar2021/mcp-suite  →  /plugin install github
# Claude Code (manual):
claude mcp add github --env GITHUB_TOKEN=<pat> -- npx -y @abhishekmcp/github
{
  "mcpServers": {
    "github": { "command": "npx", "args": ["-y", "@abhishekmcp/github"], "env": { "GITHUB_TOKEN": "<pat>" } }
  }
}

License

MIT

Keywords

mcp

FAQs

Package last updated on 28 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts