github-pro-mcp 0.0.2 → 0.0.3

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 +166 -70
  3. package/THIRD-PARTY-NOTICES.md +635 -0
  4. package/dist-package/index.js +28601 -0
  5. package/package.json +20 -15
  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,57 @@
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
+ It runs locally, connects to your host over stdio, and calls the GitHub API
11
+ directly with your own token. There is no intermediary service.
12
+
13
+ New to MCP? It is the open protocol that lets a host connect a model to tools:
14
+ https://modelcontextprotocol.io/
15
+
16
+ **Documentation, installation guides, permissions and token generator:**
17
+ https://mcp.anantanandgupta.net/
18
+
19
+ ## What you can do
20
+
21
+ - **Triage issues** - read, search, comment, label, close, reopen and manage
22
+ sub-issues.
23
+ - **Review pull requests** - read details, commits and reviews, create pull
24
+ requests and merge them.
25
+ - **Work with files** - read, create, update and delete files, and search code
26
+ across repositories.
27
+ - **Organize work** - set Priority, Effort and dates, and move items through
28
+ Projects v2.
29
+ - **Find your way around** - list every repository an organization owns, and
30
+ search organizations and code.
31
+
32
+ Ask in plain language. The agent chooses the tools, and the server handles the
33
+ API details.
34
+
35
+ ## Why this server
36
+
37
+ - **34 tools across 8 domains.** Issues, pull requests, repositories, projects,
38
+ labels, organizations, file operations and server info.
39
+ - **Organization-aware.** `owner_list_repository` lists every repository in an
40
+ organization.
41
+ - **Built for real API conditions.** Retries with backoff, rate-limit handling
42
+ and a circuit breaker for repeated failures. The defaults work; there is
43
+ nothing to tune.
44
+ - **Guardrails.** Pin the server to one owner or repository with
45
+ `GITHUB_OWNER` / `GITHUB_REPO`, and mismatched calls are rejected.
46
+ - **Any MCP host.** A standard stdio server. Works with opencode, Claude
47
+ Desktop, Cursor, VS Code and anything else that speaks MCP.
48
+ - **No runtime dependencies.** The npm package ships one bundled file, so
49
+ installing it does not pull a dependency tree.
50
+ - **GitHub Enterprise Server.** Point `GITHUB_HOST` at your GHES API.
15
51
 
16
52
  ## Installation
17
53
 
54
+ Requires Node.js 22 or newer for the npm package. The Docker image includes
55
+ Node.js.
56
+
18
57
  ### npm
19
58
 
20
59
  ```bash
@@ -22,94 +61,136 @@ An MCP (Model Context Protocol) server providing comprehensive GitHub API access
22
61
  npm install -g github-pro-mcp
23
62
 
24
63
  # Or run directly without installing
25
- npx github-pro-mcp
64
+ npx -y github-pro-mcp
26
65
  ```
27
66
 
28
67
  ### Docker
29
68
 
30
- Multi-arch images for `linux/amd64` and `linux/arm64`:
69
+ Multi-arch images are published for `linux/amd64` and `linux/arm64`.
31
70
 
32
71
  ```bash
33
72
  docker pull anantanandgupta/github-pro-mcp
34
73
  ```
35
74
 
36
- ## Quick Start
75
+ ## Quick start
37
76
 
38
- Set your GitHub token and run:
77
+ 1. Create a token with the generator:
78
+ https://mcp.anantanandgupta.net/github-pro-mcp/token/
79
+ 2. Install the server with npm or Docker.
80
+ 3. Add it to your MCP host and restart the host.
81
+ 4. Verify with the `auth_get_current_login` tool.
39
82
 
40
- ```bash
41
- export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here
42
- github-pro-mcp
43
- ```
83
+ ### Create a token
44
84
 
45
- Or with Docker:
85
+ Use a fine-grained personal access token. The generator builds a pre-filled
86
+ GitHub page with the right checkboxes:
46
87
 
47
- ```bash
48
- docker run -i --rm \
49
- -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here \
50
- anantanandgupta/github-pro-mcp
51
- ```
88
+ - **Read-only preset:** Metadata read, Contents read, Issues read, Pull requests
89
+ read, Issue fields read, Issue types read, Projects read.
90
+ - **Read-write preset:** Metadata read, Contents write, Issues write, Pull
91
+ requests write, Issue fields write, Issue types read, Projects write.
52
92
 
53
- ## Configuration
93
+ Merging a pull request also requires Contents write. If the repository belongs
94
+ to an organization that requires approval, request it while creating the token.
54
95
 
55
- ### Required
96
+ The full per-tool permission table is at
97
+ https://mcp.anantanandgupta.net/github-pro-mcp/permissions/
56
98
 
57
- | Variable | Description |
58
- |----------|-------------|
59
- | `GITHUB_PERSONAL_ACCESS_TOKEN` | GitHub PAT with appropriate scopes |
99
+ ### Connect opencode
60
100
 
61
- ### Optional
101
+ Add to your opencode config (v2 nests servers under `mcp.servers`):
62
102
 
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`:
81
-
82
- ```json
103
+ ```jsonc
83
104
  {
84
105
  "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}"
106
+ "servers": {
107
+ "github_pro": {
108
+ "type": "local",
109
+ "command": ["npx", "-y", "github-pro-mcp"],
110
+ "environment": {
111
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "{env:GITHUB_TOKEN}"
112
+ }
90
113
  }
91
114
  }
92
115
  }
93
116
  }
94
117
  ```
95
118
 
96
- For Docker-based usage:
119
+ `{env:GITHUB_TOKEN}` reads that variable from the environment opencode starts
120
+ in. Use a literal token instead if you prefer.
121
+
122
+ ### Connect Claude Desktop
123
+
124
+ Edit `claude_desktop_config.json` and restart Claude Desktop:
125
+
126
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
127
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
97
128
 
98
129
  ```json
130
+ {
131
+ "mcpServers": {
132
+ "github": {
133
+ "command": "npx",
134
+ "args": ["-y", "github-pro-mcp"],
135
+ "env": {
136
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "github_pat_..."
137
+ }
138
+ }
139
+ }
140
+ }
141
+ ```
142
+
143
+ ### Connect Cursor or VS Code
144
+
145
+ Both support stdio MCP servers. The configuration is the same command and token
146
+ as above; only the file location differs. Exact snippets are in the
147
+ installation guide:
148
+
149
+ https://mcp.anantanandgupta.net/github-pro-mcp/install/
150
+
151
+ ### Use Docker with opencode
152
+
153
+ ```jsonc
99
154
  {
100
155
  "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}"
156
+ "servers": {
157
+ "github_pro": {
158
+ "type": "local",
159
+ "command": ["docker", "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "anantanandgupta/github-pro-mcp"],
160
+ "environment": {
161
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "{env:GITHUB_TOKEN}"
162
+ }
106
163
  }
107
164
  }
108
165
  }
109
166
  }
110
167
  ```
111
168
 
112
- ## Tool Reference
169
+ The same `docker run` command works as the server command in other hosts.
170
+
171
+ ## Configuration
172
+
173
+ ### Required
174
+
175
+ | Variable | Description |
176
+ |----------|-------------|
177
+ | `GITHUB_PERSONAL_ACCESS_TOKEN` | GitHub personal access token. Fine-grained is recommended. |
178
+
179
+ ### Optional
180
+
181
+ | Variable | Description |
182
+ |----------|-------------|
183
+ | `GITHUB_HOST` | GitHub Enterprise Server API, for example `https://github.example.com/api/v3` |
184
+ | `GITHUB_OWNER` | Pin the server to a single owner and reject mismatched calls |
185
+ | `GITHUB_REPO` | Pin the server to a single repository and reject mismatched calls |
186
+
187
+ Retries, rate limiting and logging have sensible defaults. You do not need to
188
+ tune them for normal use.
189
+
190
+ ## Tools
191
+
192
+ 34 tools across 8 domains. Tool names appear in your host's tool list after the
193
+ server starts.
113
194
 
114
195
  | Domain | Tools | Count |
115
196
  |--------|-------|-------|
@@ -123,16 +204,31 @@ For Docker-based usage:
123
204
  | **Server Info** | `server_info` | 1 |
124
205
  | **Total** | | **34** |
125
206
 
126
- ## FAQ / Troubleshooting
207
+ Task-based examples and the prompts they respond to are at
208
+ https://mcp.anantanandgupta.net/github-pro-mcp/tools/
209
+
210
+ ## Troubleshooting
211
+
212
+ | Symptom | Likely cause |
213
+ |---------|--------------|
214
+ | `401` | Token expired, revoked or mistyped |
215
+ | `403` | Missing permission, organization approval, or SSO not authorized |
216
+ | `404` | The resource does not exist, or the token cannot see it |
217
+ | `429` | Rate limited. The server retries; wait if it persists |
218
+ | No tools appear in the host | The host was not restarted, or the server failed to start |
219
+ | Server exits immediately | `GITHUB_PERSONAL_ACCESS_TOKEN` is not set in the host's environment |
220
+
221
+ ## Support
127
222
 
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 |
223
+ - **Documentation:** https://mcp.anantanandgupta.net/
224
+ - **Issues and feature requests:** https://github.com/anantanandgupta/mcp-servers/issues
225
+ - **npm:** https://www.npmjs.com/package/github-pro-mcp
226
+ - **Docker:** https://hub.docker.com/r/anantanandgupta/github-pro-mcp
135
227
 
136
228
  ## License
137
229
 
138
- ISC
230
+ Proprietary. Free to install and use, including for internal business purposes.
231
+ Modification, redistribution, sublicensing and reverse engineering are not
232
+ permitted. See the
233
+ [license](https://github.com/anantanandgupta/mcp-servers/blob/main/github-pro-mcp/LICENSE)
234
+ for the full terms.