{"_id":"@abhishekmcp/github","_rev":"2-3c8d852f2e53d25d7f33844d0a99cdaf","name":"@abhishekmcp/github","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@abhishekmcp/github","version":"0.1.0","keywords":["mcp","modelcontextprotocol","github","octokit","claude"],"author":{"url":"https://github.com/Abhishekkumar2021","name":"Abhishek"},"license":"MIT","_id":"@abhishekmcp/github@0.1.0","maintainers":[{"name":"abhishek.opensource","email":"abhishek.opensource.dev@gmail.com"}],"homepage":"https://github.com/Abhishekkumar2021/mcp-suite/tree/main/servers/github#readme","bugs":{"url":"https://github.com/Abhishekkumar2021/mcp-suite/issues"},"bin":{"mcp-github":"dist/index.js"},"dist":{"shasum":"753bf127eef11407054f65ef86200647ffc6e5ef","tarball":"https://registry.npmjs.org/@abhishekmcp/github/-/github-0.1.0.tgz","fileCount":14,"integrity":"sha512-wKlNycaJT+c4w9qeEkJz+d66b/hLyF/gZtUuUW+2LTSPCA1PllpcJ6oB9J2ZYyaE3iSylHyHpSsumYIbsDLpWA==","signatures":[{"sig":"MEQCIFlhOWe+IvM4Wp55Qh3KRlXYMKdaACcWujLMXbEyusx1AiBSBg0ad6GltrvJzQ5Ig1ohHoh9KbxLmV/oRCsXPJO3Gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54872},"type":"module","engines":{"node":">=18"},"gitHead":"fd78e572f94860d5fc8946da8cde815a3cc5b85e","mcpName":"io.github.Abhishekkumar2021/github","scripts":{"dev":"tsc && node dist/index.js","test":"npm run build && node --test test/*.test.mjs","build":"tsc","start":"node dist/index.js","watch":"tsc --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"abhishek.opensource","email":"abhishek.opensource.dev@gmail.com"},"repository":{"url":"git+https://github.com/Abhishekkumar2021/mcp-suite.git","type":"git","directory":"servers/github"},"_npmVersion":"11.17.0","description":"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.","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^3.23.8","@octokit/rest":"^21.0.0","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/github_0.1.0_1782639201968_0.707467291839361","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@abhishekmcp/github","version":"0.2.0","description":"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.","mcpName":"io.github.Abhishekkumar2021/github","type":"module","bin":{"mcp-github":"dist/index.js"},"publishConfig":{"access":"public","provenance":true},"scripts":{"build":"tsc","watch":"tsc --watch","start":"node dist/index.js","dev":"tsc && node dist/index.js","test":"npm run build && node --test test/*.test.mjs","prepublishOnly":"npm run build"},"keywords":["mcp","modelcontextprotocol","github","octokit","claude"],"author":{"name":"Abhishek","url":"https://github.com/Abhishekkumar2021"},"license":"MIT","homepage":"https://github.com/Abhishekkumar2021/mcp-suite/tree/main/servers/github#readme","repository":{"type":"git","url":"git+https://github.com/Abhishekkumar2021/mcp-suite.git","directory":"servers/github"},"bugs":{"url":"https://github.com/Abhishekkumar2021/mcp-suite/issues"},"engines":{"node":">=18"},"dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","@octokit/plugin-retry":"^7.2.1","@octokit/plugin-throttling":"^9.6.1","@octokit/rest":"^21.0.0","zod":"^3.23.8"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.6.0"},"gitHead":"61175b48c26588a28a18e9aa3446cf02b5f76c29","_id":"@abhishekmcp/github@0.2.0","_nodeVersion":"22.23.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-OzVDiKU80dd19IwFpqmSgPu8OBOq/qrSGGYLiPBc4p/8QOp30ilwXTlXGa5Z8UIPe8Yw5+AWrrSUGjNBrcIPPw==","shasum":"aaed8475e56113d7af7e47fc42ed6dac5488b091","tarball":"https://registry.npmjs.org/@abhishekmcp/github/-/github-0.2.0.tgz","fileCount":17,"unpackedSize":65917,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@abhishekmcp%2fgithub@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBGsxT/6BLW1L99HpZD9u5c2m3bhH4JxlUT+EVAsaRIeAiAEELAXXUHAKZovheeE81sqIdc79wbNcKiApDiOi6nRzw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1b45e523-1878-4383-9abf-872dc84dcdfc"}},"directories":{},"maintainers":[{"name":"abhishek.opensource","email":"abhishek.opensource.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/github_0.2.0_1782640284726_0.8476224262327203"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-28T09:33:21.809Z","modified":"2026-06-28T09:51:25.142Z","0.1.0":"2026-06-28T09:33:22.111Z","0.2.0":"2026-06-28T09:51:24.862Z"},"bugs":{"url":"https://github.com/Abhishekkumar2021/mcp-suite/issues"},"author":{"name":"Abhishek","url":"https://github.com/Abhishekkumar2021"},"license":"MIT","homepage":"https://github.com/Abhishekkumar2021/mcp-suite/tree/main/servers/github#readme","keywords":["mcp","modelcontextprotocol","github","octokit","claude"],"repository":{"type":"git","url":"git+https://github.com/Abhishekkumar2021/mcp-suite.git","directory":"servers/github"},"description":"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.","maintainers":[{"name":"abhishek.opensource","email":"abhishek.opensource.dev@gmail.com"}],"readme":"# @abhishekmcp/github\n\nA GitHub [MCP](https://modelcontextprotocol.io) server: search, browse, and act on GitHub from any MCP\nclient. Authenticates via **OAuth device flow** (real OAuth, no hosted callback) or a **token**. Pure\nJavaScript ([`@octokit/rest`](https://github.com/octokit/rest.js)), no native dependencies.\n\n> GitHub ships an official, much larger MCP server. This is a focused, learning-oriented build that does\n> auth/secrets handling cleanly.\n\n## Tools\n\n**Auth:** `github_login` (device flow), `github_logout`, `whoami`\n**Search:** `search_repos`, `search_code`, `search_issues`\n**Read:** `get_repo`, `list_issues`, `get_issue`, `list_pull_requests`, `get_pull_request`,\n`get_file_contents`, `list_notifications`, `rate_limit`\n**Write** (omitted when `GITHUB_READONLY=1`): `create_issue`, `add_issue_comment`\n\nResponses are trimmed to the useful fields to stay token-efficient.\n\n## Authentication\n\nResolved in this order (nothing is required at startup):\n\n1. **Token** — `GITHUB_TOKEN` (or `GITHUB_PERSONAL_ACCESS_TOKEN`). A [Personal Access Token](https://github.com/settings/tokens); simplest path.\n2. **Cached OAuth token** — from a previous `github_login`, stored at `~/.config/mcp-github/auth.json` (`0600`), auto-refreshed when possible.\n3. Otherwise tools return a clear \"run `github_login`\" message.\n\n### OAuth device flow (one-time setup)\nDevice flow needs a **public** OAuth-App client id (no secret):\n1. Create a [GitHub OAuth App](https://github.com/settings/developers) and **enable Device Flow**.\n2. `export GITHUB_CLIENT_ID=<client id>`.\n3. Run `github_login` → open the printed URL, enter the code, then run `github_login` again to finish.\n\nTokens are cached locally with `0600` permissions and are never logged.\n\n## Configuration\n\n| Variable | Effect |\n|----------|--------|\n| `GITHUB_TOKEN` / `GITHUB_PERSONAL_ACCESS_TOKEN` | Use this PAT (skips OAuth). |\n| `GITHUB_CLIENT_ID` | OAuth App client id for the device-flow login. |\n| `GITHUB_READONLY` | `1`/`true` → only read + auth tools are registered. |\n| `GITHUB_API_URL` | REST base URL (default `https://api.github.com`); set for GitHub Enterprise Server. |\n| `GITHUB_TIMEOUT_MS` | Per-request timeout (default 30000). |\n| `GITHUB_AUDIT_LOG` | Path to append a JSON-lines audit record of every write (issue/comment). |\n\n### Production hardening\nRequests use the official retry + throttling plugins (auto-retry transient `5xx`, **proactively wait on\nprimary/secondary rate limits**) and a request timeout, so the server survives real GitHub conditions\ninstead of failing or hanging. List tools paginate up to 300 items (reporting truncation). Tokens are\nnever logged (output is redacted defense-in-depth), and writes are recorded to `GITHUB_AUDIT_LOG`.\n\n## Usage\n\n```bash\n# Claude Code (plugin):  /plugin marketplace add Abhishekkumar2021/mcp-suite  →  /plugin install github\n# Claude Code (manual):\nclaude mcp add github --env GITHUB_TOKEN=<pat> -- npx -y @abhishekmcp/github\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"github\": { \"command\": \"npx\", \"args\": [\"-y\", \"@abhishekmcp/github\"], \"env\": { \"GITHUB_TOKEN\": \"<pat>\" } }\n  }\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}