npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@abhishekmcp/github

v0.2.0

Published

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.

Readme

@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):

  1. TokenGITHUB_TOKEN (or GITHUB_PERSONAL_ACCESS_TOKEN). A Personal Access Token; simplest path.
  2. Cached OAuth token — from a previous github_login, stored at ~/.config/mcp-github/auth.json (0600), auto-refreshed when possible.
  3. 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):

  1. Create a GitHub OAuth App and enable Device Flow.
  2. export GITHUB_CLIENT_ID=<client id>.
  3. 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

| Variable | Effect | |----------|--------| | GITHUB_TOKEN / GITHUB_PERSONAL_ACCESS_TOKEN | Use this PAT (skips OAuth). | | GITHUB_CLIENT_ID | OAuth App client id for the device-flow login. | | GITHUB_READONLY | 1/true → only read + auth tools are registered. | | GITHUB_API_URL | REST base URL (default https://api.github.com); set for GitHub Enterprise Server. | | GITHUB_TIMEOUT_MS | Per-request timeout (default 30000). | | GITHUB_AUDIT_LOG | Path to append a JSON-lines audit record of every write (issue/comment). |

Production hardening

Requests use the official retry + throttling plugins (auto-retry transient 5xx, proactively wait on primary/secondary rate limits) and a request timeout, so the server survives real GitHub conditions instead of failing or hanging. List tools paginate up to 300 items (reporting truncation). Tokens are never logged (output is redacted defense-in-depth), and writes are recorded to GITHUB_AUDIT_LOG.

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