github-pro-mcp 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/LICENSE +76 -0
  2. package/README.md +196 -69
  3. package/THIRD-PARTY-NOTICES.md +635 -0
  4. package/dist-package/index.js +28661 -0
  5. package/package.json +23 -17
  6. package/dist/client.d.ts +0 -28
  7. package/dist/client.js +0 -85
  8. package/dist/index.d.ts +0 -2
  9. package/dist/index.js +0 -70
  10. package/dist/tools/issue_fields.d.ts +0 -4
  11. package/dist/tools/issue_fields.js +0 -108
  12. package/dist/tools/issues.d.ts +0 -12
  13. package/dist/tools/issues.js +0 -634
  14. package/dist/tools/labels.d.ts +0 -3
  15. package/dist/tools/labels.js +0 -87
  16. package/dist/tools/organizations.d.ts +0 -4
  17. package/dist/tools/organizations.js +0 -89
  18. package/dist/tools/projects.d.ts +0 -4
  19. package/dist/tools/projects.js +0 -440
  20. package/dist/tools/pull_requests.d.ts +0 -4
  21. package/dist/tools/pull_requests.js +0 -127
  22. package/dist/tools/repos.d.ts +0 -9
  23. package/dist/tools/repos.js +0 -251
  24. package/dist/tools/server.d.ts +0 -14
  25. package/dist/tools/server.js +0 -37
  26. package/dist/types/github-api.d.ts +0 -63
  27. package/dist/types/github-api.js +0 -1
  28. package/dist/utils/circuitBreaker.d.ts +0 -11
  29. package/dist/utils/circuitBreaker.js +0 -125
  30. package/dist/utils/errors.d.ts +0 -17
  31. package/dist/utils/errors.js +0 -107
  32. package/dist/utils/logger.d.ts +0 -14
  33. package/dist/utils/logger.js +0 -40
  34. package/dist/utils/metrics.d.ts +0 -11
  35. package/dist/utils/metrics.js +0 -70
  36. package/dist/utils/rateLimit.d.ts +0 -21
  37. package/dist/utils/rateLimit.js +0 -40
  38. package/dist/utils/retry.d.ts +0 -9
  39. package/dist/utils/retry.js +0 -76
  40. package/dist/utils/types.d.ts +0 -33
  41. package/dist/utils/types.js +0 -33
  42. package/dist/utils/validation.d.ts +0 -13
  43. package/dist/utils/validation.js +0 -88
package/LICENSE ADDED
@@ -0,0 +1,76 @@
1
+ GitHub Pro MCP Proprietary License
2
+
3
+ Copyright (c) 2026 Anant Anand Gupta. All rights reserved.
4
+
5
+ This software is proprietary. It is licensed, not sold.
6
+
7
+ 1. Grant of License
8
+
9
+ Subject to the terms of this License, you are granted a limited, non-exclusive,
10
+ non-transferable, non-sublicensable and revocable license to install and use
11
+ the software for your own personal use or for internal use within your
12
+ organization. You may make a reasonable number of copies for backup purposes,
13
+ provided every copy is subject to this License.
14
+
15
+ 2. Restrictions
16
+
17
+ You may not:
18
+
19
+ a. modify, adapt, translate, or create derivative works of the software;
20
+ b. redistribute, publish, sublicense, sell, resell, rent, lease, lend, or
21
+ otherwise make the software available to any third party;
22
+ c. make the software available as part of a product or service offered to
23
+ others, whether for payment or free of charge;
24
+ d. remove, obscure, or alter any copyright, trademark, or other proprietary
25
+ notice in the software;
26
+ e. reverse engineer, decompile, disassemble, or otherwise attempt to derive
27
+ the source code of the software, except to the extent that applicable law
28
+ expressly permits despite this limitation;
29
+ f. use the software to develop or operate a product or service that competes
30
+ with it.
31
+
32
+ 3. No Source Code
33
+
34
+ This License does not grant any right to the source code of the software. No
35
+ source code is published or made available, and the copyright holder has no
36
+ obligation to provide it.
37
+
38
+ 4. Ownership
39
+
40
+ All right, title, and interest in and to the software, including all
41
+ intellectual property rights, remain with the copyright holder. Nothing in
42
+ this License transfers ownership of the software to you.
43
+
44
+ 5. Third-Party Components
45
+
46
+ The software depends on third-party packages that are distributed under their
47
+ own licenses. Those licenses continue to apply to those components, and nothing
48
+ in this License limits your rights under them.
49
+
50
+ 6. No Warranty
51
+
52
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
53
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
54
+ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. THE COPYRIGHT
55
+ HOLDER DOES NOT WARRANT THAT THE SOFTWARE WILL BE UNINTERRUPTED, ERROR-FREE,
56
+ OR FIT FOR ANY PARTICULAR PURPOSE.
57
+
58
+ 7. Limitation of Liability
59
+
60
+ TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL THE
61
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
62
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
63
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
64
+
65
+ 8. Termination
66
+
67
+ This License terminates automatically if you breach any of its terms. Upon
68
+ termination you must stop using the software and delete all copies in your
69
+ possession or control. Sections 3, 4, 6, 7 and 9 survive termination.
70
+
71
+ 9. Acceptance
72
+
73
+ By installing, copying, or using the software, you accept this License. If you
74
+ do not accept it, do not install or use the software.
75
+
76
+ Licensing enquiries: see the repository URL in package.json.
package/README.md CHANGED
@@ -3,18 +3,71 @@
3
3
  [![npm version](https://img.shields.io/npm/v/github-pro-mcp)](https://www.npmjs.com/package/github-pro-mcp)
4
4
  [![Docker image](https://img.shields.io/docker/v/anantanandgupta/github-pro-mcp)](https://hub.docker.com/r/anantanandgupta/github-pro-mcp)
5
5
 
6
- An MCP (Model Context Protocol) server providing comprehensive GitHub API access via hybrid REST + GraphQL — **34 tools across 8 domains**.
7
-
8
- ## Features
9
-
10
- - **34 Tools** — issues, pull requests, repositories, projects v2, labels, organizations, file operations, server info
11
- - **Hybrid API** — REST for CRUD/search, GraphQL for cursor pagination and composite queries
12
- - **Resilient by Default** — automatic retry with exponential backoff + jitter, circuit breaker for API outages, proactive rate limit management
13
- - **Structured Logging** — multi-level (error/warn/info/debug) stderr output
14
- - **Owner/Repo Pinning** — lock the server to a specific owner or repository as a safety guardrail
6
+ GitHub Pro MCP gives Claude Code, Cursor, Copilot, opencode and any MCP host a
7
+ complete GitHub toolkit: **34 tools** for issues, pull requests, files, projects,
8
+ labels and organizations.
9
+
10
+ Read-only mode is the default. The server registers 19 read tools and keeps the
11
+ 15 write tools out of the agent's context. Set
12
+ `GITHUB_MCP_ENABLE_WRITES=true` to load the full set.
13
+
14
+ It runs locally, connects to your host over stdio, and calls the GitHub API
15
+ directly with your own token. There is no intermediary service.
16
+
17
+ New to MCP? It is the open protocol that lets a host connect a model to tools:
18
+ https://modelcontextprotocol.io/
19
+
20
+ **Documentation, installation guides, permissions and token generator:**
21
+ https://mcp.anantanandgupta.net/
22
+
23
+ ## What you can do
24
+
25
+ - **Triage issues** - read, search, comment, label, close, reopen and manage
26
+ sub-issues.
27
+ - **Review pull requests** - read details, commits and reviews, create pull
28
+ requests and merge them.
29
+ - **Work with files** - read, create, update and delete files, and search code
30
+ across repositories.
31
+ - **Organize work** - set Priority, Effort and dates, and move items through
32
+ Projects v2.
33
+ - **Find your way around** - list every repository an organization owns, and
34
+ search organizations and code.
35
+
36
+ Ask in plain language. The agent chooses the tools, and the server handles the
37
+ API details.
38
+
39
+ ## Why this server
40
+
41
+ - **34 tools across 8 domains.** Issues, pull requests, repositories, projects,
42
+ labels, organizations, file operations and server info.
43
+ - **Read-only by default.** 19 tools, no write surface. Enable writes explicitly.
44
+ - **Built for the common path.** The daily loop is small: read an issue, review a pull
45
+ request, change a file, update a project field. The long tail stays out of the
46
+ agent's context until you need it.
47
+ - **Organization-aware.** `owner_list_repository` lists every repository in an
48
+ organization.
49
+ - **Built for real API conditions.** Retries with backoff, rate-limit handling
50
+ and a circuit breaker for repeated failures. The defaults work; there is
51
+ nothing to tune.
52
+ - **Guardrails.** Pin the server to one owner or repository with
53
+ `GITHUB_OWNER` / `GITHUB_REPO`, and mismatched calls are rejected.
54
+ - **Guided token setup.** The generator builds a pre-filled fine-grained token
55
+ with a read-only or read-write preset.
56
+ - **Any MCP host.** A standard stdio server. Works with opencode, Claude
57
+ Desktop, Cursor, VS Code and anything else that speaks MCP.
58
+ - **No runtime dependencies.** The npm package ships one bundled file, so
59
+ installing it does not pull a dependency tree.
60
+ - **GitHub Enterprise Server.** Point `GITHUB_HOST` at your GHES API.
61
+
62
+ If your work is mostly Actions, security scanning, notifications, discussions,
63
+ gists, governance or Copilot, use the official GitHub MCP server. GitHub Pro MCP
64
+ is built for the daily issue, pull request, file and project loop.
15
65
 
16
66
  ## Installation
17
67
 
68
+ Requires Node.js 22 or newer for the npm package. The Docker image includes
69
+ Node.js.
70
+
18
71
  ### npm
19
72
 
20
73
  ```bash
@@ -22,94 +75,149 @@ An MCP (Model Context Protocol) server providing comprehensive GitHub API access
22
75
  npm install -g github-pro-mcp
23
76
 
24
77
  # Or run directly without installing
25
- npx github-pro-mcp
78
+ npx -y github-pro-mcp
26
79
  ```
27
80
 
28
81
  ### Docker
29
82
 
30
- Multi-arch images for `linux/amd64` and `linux/arm64`:
83
+ Multi-arch images are published for `linux/amd64` and `linux/arm64`.
31
84
 
32
85
  ```bash
33
86
  docker pull anantanandgupta/github-pro-mcp
34
87
  ```
35
88
 
36
- ## Quick Start
89
+ ## Quick start
37
90
 
38
- Set your GitHub token and run:
91
+ 1. Create a token with the generator:
92
+ https://mcp.anantanandgupta.net/github-pro-mcp/token/
93
+ 2. Install the server with npm or Docker.
94
+ 3. Add it to your MCP host and restart the host.
95
+ 4. Verify with the `auth_get_current_login` tool.
39
96
 
40
- ```bash
41
- export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here
42
- github-pro-mcp
43
- ```
97
+ By default the server is read-only and registers 19 tools. To enable issue,
98
+ pull request, file, label and project writes, set
99
+ `GITHUB_MCP_ENABLE_WRITES=true` in the host environment.
44
100
 
45
- Or with Docker:
101
+ ### Create a token
46
102
 
47
- ```bash
48
- docker run -i --rm \
49
- -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here \
50
- anantanandgupta/github-pro-mcp
51
- ```
103
+ Use a fine-grained personal access token. The generator builds a pre-filled
104
+ GitHub page with the right checkboxes:
52
105
 
53
- ## Configuration
106
+ - **Read-only preset:** Metadata read, Contents read, Issues read, Pull requests
107
+ read, Issue fields read, Issue types read, Projects read.
108
+ - **Read-write preset:** Metadata read, Contents write, Issues write, Pull
109
+ requests write, Issue fields write, Issue types read, Projects write.
54
110
 
55
- ### Required
111
+ Merging a pull request also requires Contents write. If the repository belongs
112
+ to an organization that requires approval, request it while creating the token.
56
113
 
57
- | Variable | Description |
58
- |----------|-------------|
59
- | `GITHUB_PERSONAL_ACCESS_TOKEN` | GitHub PAT with appropriate scopes |
114
+ The full per-tool permission table is at
115
+ https://mcp.anantanandgupta.net/github-pro-mcp/permissions/
60
116
 
61
- ### Optional
117
+ The read-only preset pairs with the default read-only mode. The read-write
118
+ preset requires `GITHUB_MCP_ENABLE_WRITES=true` in the host environment.
62
119
 
63
- | Variable | Default | Description |
64
- |----------|---------|-------------|
65
- | `GITHUB_HOST` | — | For GHES: `https://{hostname}/api/v3` |
66
- | `GITHUB_OWNER` | — | Pin server to a single owner (rejects mismatched calls) |
67
- | `GITHUB_REPO` | — | Pin server to a single repository (rejects mismatched calls) |
68
- | `GITHUB_RETRY_MAX_ATTEMPTS` | `3` | Max retries for transient errors |
69
- | `GITHUB_RETRY_BACKOFF_MS` | `1000` | Initial retry backoff (ms) |
70
- | `GITHUB_CIRCUIT_BREAKER_THRESHOLD` | `5` | Failures before circuit opens |
71
- | `GITHUB_CIRCUIT_BREAKER_RESET_MS` | `30000` | Circuit recovery timeout (ms) |
72
- | `GITHUB_RETRY_BACKOFF_FACTOR` | `2` | Exponential backoff multiplier |
73
- | `GITHUB_OWNER_TYPE_CACHE_MS` | `300000` | Cache TTL for owner type lookups (5 min) |
74
- | `GITHUB_THROTTLE_ON_RATE_LIMIT` | `retry` | Primary rate limit strategy: `retry` or `queue` |
75
- | `GITHUB_THROTTLE_ON_SECONDARY_RATE_LIMIT` | `retry` | Secondary rate limit strategy: `retry` or `queue` |
76
- | `GITHUB_LOG_LEVEL` | `error` | Log level: `error`, `warn`, `info`, `debug` |
77
-
78
- ## Usage with opencode
79
-
80
- Add to your `opencode.json`:
120
+ ### Connect opencode
81
121
 
82
- ```json
122
+ Add to your opencode config (v2 nests servers under `mcp.servers`):
123
+
124
+ ```jsonc
83
125
  {
84
126
  "mcp": {
85
- "github_pro": {
86
- "type": "local",
87
- "command": ["node", "path/to/github-pro-mcp/dist/index.js"],
88
- "environment": {
89
- "GITHUB_PERSONAL_ACCESS_TOKEN": "{env:GITHUB_TOKEN}"
127
+ "servers": {
128
+ "github_pro": {
129
+ "type": "local",
130
+ "command": ["npx", "-y", "github-pro-mcp"],
131
+ "environment": {
132
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "{env:GITHUB_TOKEN}",
133
+ "GITHUB_MCP_ENABLE_WRITES": "true"
134
+ }
90
135
  }
91
136
  }
92
137
  }
93
138
  }
94
139
  ```
95
140
 
96
- For Docker-based usage:
141
+ `{env:GITHUB_TOKEN}` reads that variable from the environment opencode starts
142
+ in. Use a literal token instead if you prefer. Remove
143
+ `GITHUB_MCP_ENABLE_WRITES` to stay read-only.
144
+
145
+ ### Connect Claude Desktop
146
+
147
+ Edit `claude_desktop_config.json` and restart Claude Desktop:
148
+
149
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
150
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
97
151
 
98
152
  ```json
153
+ {
154
+ "mcpServers": {
155
+ "github": {
156
+ "command": "npx",
157
+ "args": ["-y", "github-pro-mcp"],
158
+ "env": {
159
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "github_pat_...",
160
+ "GITHUB_MCP_ENABLE_WRITES": "true"
161
+ }
162
+ }
163
+ }
164
+ }
165
+ ```
166
+
167
+ ### Connect Cursor or VS Code
168
+
169
+ Both support stdio MCP servers. The configuration is the same command and token
170
+ as above; only the file location differs. Exact snippets are in the
171
+ installation guide:
172
+
173
+ https://mcp.anantanandgupta.net/github-pro-mcp/install/
174
+
175
+ ### Use Docker with opencode
176
+
177
+ ```jsonc
99
178
  {
100
179
  "mcp": {
101
- "github_pro": {
102
- "type": "local",
103
- "command": ["docker", "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "anantanandgupta/github-pro-mcp"],
104
- "environment": {
105
- "GITHUB_PERSONAL_ACCESS_TOKEN": "{env:GITHUB_TOKEN}"
180
+ "servers": {
181
+ "github_pro": {
182
+ "type": "local",
183
+ "command": ["docker", "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_MCP_ENABLE_WRITES", "anantanandgupta/github-pro-mcp"],
184
+ "environment": {
185
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "{env:GITHUB_TOKEN}",
186
+ "GITHUB_MCP_ENABLE_WRITES": "true"
187
+ }
106
188
  }
107
189
  }
108
190
  }
109
191
  }
110
192
  ```
111
193
 
112
- ## Tool Reference
194
+ The same `docker run` command works as the server command in other hosts.
195
+
196
+ ## Configuration
197
+
198
+ ### Required
199
+
200
+ | Variable | Description |
201
+ |----------|-------------|
202
+ | `GITHUB_PERSONAL_ACCESS_TOKEN` | GitHub personal access token. Fine-grained is recommended. |
203
+
204
+ ### Optional
205
+
206
+ | Variable | Description |
207
+ |----------|-------------|
208
+ | `GITHUB_HOST` | GitHub Enterprise Server API, for example `https://github.example.com/api/v3` |
209
+ | `GITHUB_OWNER` | Pin the server to a single owner and reject mismatched calls |
210
+ | `GITHUB_REPO` | Pin the server to a single repository and reject mismatched calls |
211
+ | `GITHUB_MCP_ENABLE_WRITES` | Set to `true`, `1`, `yes` or `on` to register the 15 write tools. Default `false` |
212
+
213
+ Retries, rate limiting and logging have sensible defaults. You do not need to
214
+ tune them for normal use.
215
+
216
+ ## Tools
217
+
218
+ 34 tools across 8 domains. Read-only mode registers 19 of them; the other 15
219
+ are write tools. Tool names appear in your host's tool list after the server
220
+ starts.
113
221
 
114
222
  | Domain | Tools | Count |
115
223
  |--------|-------|-------|
@@ -123,16 +231,35 @@ For Docker-based usage:
123
231
  | **Server Info** | `server_info` | 1 |
124
232
  | **Total** | | **34** |
125
233
 
126
- ## FAQ / Troubleshooting
234
+ Task-based examples and the prompts they respond to are at
235
+ https://mcp.anantanandgupta.net/github-pro-mcp/tools/
236
+
237
+ A measured comparison with the official GitHub MCP server is at
238
+ https://mcp.anantanandgupta.net/github-pro-mcp/compare/
239
+
240
+ ## Troubleshooting
241
+
242
+ | Symptom | Likely cause |
243
+ |---------|--------------|
244
+ | `401` | Token expired, revoked or mistyped |
245
+ | `403` | Missing permission, organization approval, or SSO not authorized |
246
+ | `404` | The resource does not exist, or the token cannot see it |
247
+ | `429` | Rate limited. The server retries; wait if it persists |
248
+ | No tools appear in the host | The host was not restarted, or the server failed to start |
249
+ | Server exits immediately | `GITHUB_PERSONAL_ACCESS_TOKEN` is not set in the host's environment |
250
+ | Write tool not in the list | `GITHUB_MCP_ENABLE_WRITES` is not set to `true` |
251
+
252
+ ## Support
127
253
 
128
- | Error | Likely Cause |
129
- |-------|-------------|
130
- | `401` | Token expired or invalid |
131
- | `403` | Missing OAuth scopes or SSO |
132
- | `404` | Resource doesn't exist or no access |
133
- | `429` | Rate limited — wait and retry |
134
- | Circuit breaker open | GitHub API returning repeated errors — auto-recovers in 30s |
254
+ - **Documentation:** https://mcp.anantanandgupta.net/
255
+ - **Issues and feature requests:** https://github.com/anantanandgupta/mcp-servers/issues
256
+ - **npm:** https://www.npmjs.com/package/github-pro-mcp
257
+ - **Docker:** https://hub.docker.com/r/anantanandgupta/github-pro-mcp
135
258
 
136
259
  ## License
137
260
 
138
- ISC
261
+ Proprietary. Free to install and use, including for internal business purposes.
262
+ Modification, redistribution, sublicensing and reverse engineering are not
263
+ permitted. See the
264
+ [license](https://github.com/anantanandgupta/mcp-servers/blob/main/github-pro-mcp/LICENSE)
265
+ for the full terms.