@giantswarm-io/pro 1.3.1
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.
- package/LICENSE +201 -0
- package/README.md +317 -0
- package/bin/index.js +65 -0
- package/package.json +40 -0
- package/src/index.js +49 -0
- package/src/lib/api.js +87 -0
- package/src/lib/auth/provider.js +395 -0
- package/src/lib/fields.js +111 -0
- package/src/lib/items.js +426 -0
- package/src/lib/logger.js +40 -0
- package/src/lib/mcp/http.js +233 -0
- package/src/lib/mcp/resources.js +304 -0
- package/src/lib/mcp/server.js +156 -0
- package/src/lib/mcp/sub-issues.js +580 -0
- package/src/lib/mcp/tools.js +601 -0
- package/src/lib/project.js +406 -0
- package/src/lib/rest-api.js +141 -0
- package/src/lib/selfupdate.js +107 -0
- package/src/lib/sub-issues.js +100 -0
- package/src/lib/utils.js +23 -0
- package/src/lib/version.js +19 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2016 - 2026 Giant Swarm GmbH
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# Giant Swarm Portfolio Roadmap Organizer (PRO)
|
|
2
|
+
|
|
3
|
+
An MCP server for managing Giant Swarm's project boards on GitHub Projects V2.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
PRO exposes Giant Swarm project boards to AI assistants via the [Model Context Protocol](https://modelcontextprotocol.io/). It supports multiple boards:
|
|
8
|
+
|
|
9
|
+
- **Roadmap Board** ([#273](https://github.com/orgs/giantswarm/projects/273)) -- Company quarterly goals (rocks), team/SIG/WG issues
|
|
10
|
+
- **Customer Board** ([#345](https://github.com/orgs/giantswarm/projects/345)) -- Customer-related activities and requests from private customer repositories
|
|
11
|
+
|
|
12
|
+
The server provides tools for listing, filtering, creating, and updating issues on either board, along with per-board schema resources that describe the available fields and their valid values. Field filtering is generic -- the LLM reads the board's schema resource to discover available fields, then passes arbitrary field name/value pairs as filters.
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
|
|
16
|
+
- Node.js 20+
|
|
17
|
+
- GitHub Personal Access Token with `project:write` and `repo:write` scopes
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
git clone https://github.com/giantswarm/pro.git
|
|
23
|
+
cd pro
|
|
24
|
+
npm install
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
To make the `pro` command available globally (required for the MCP client config and self-update), install it into your user path -- no `sudo` needed:
|
|
28
|
+
|
|
29
|
+
**Option A: Using nvm or fnm (recommended)**
|
|
30
|
+
|
|
31
|
+
If you manage Node.js with [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm), npm's global prefix is already in your home directory:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install -g .
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Option B: Configure npm's global prefix**
|
|
38
|
+
|
|
39
|
+
Without a version manager, npm's default global prefix is a system path. Redirect it to a user-local directory:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm config set prefix ~/.local
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Make sure `~/.local/bin` is in your `PATH` (add to `~/.bashrc` or `~/.zshrc`):
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Then install:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install -g .
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Option C: Use the full path in MCP config**
|
|
58
|
+
|
|
59
|
+
If you prefer not to install globally, point your MCP client config directly at the checkout:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"mcpServers": {
|
|
64
|
+
"giantswarm-pro": {
|
|
65
|
+
"command": "node",
|
|
66
|
+
"args": ["/path/to/pro/bin/index.js"],
|
|
67
|
+
"env": {
|
|
68
|
+
"GITHUB_API_TOKEN": "your-github-token"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Note: this skips the global binary, so `pro --self-update` won't be available.
|
|
76
|
+
|
|
77
|
+
## Configuration
|
|
78
|
+
|
|
79
|
+
### Environment Variables
|
|
80
|
+
|
|
81
|
+
- `GITHUB_API_TOKEN` (required): GitHub PAT with `project:write` and `repo:write` scopes.
|
|
82
|
+
- `HTTP_PORT` (optional): Port for HTTP transport (default: 8080).
|
|
83
|
+
|
|
84
|
+
## Transport Modes
|
|
85
|
+
|
|
86
|
+
The server supports two transport modes, selected via the `--transport` flag:
|
|
87
|
+
|
|
88
|
+
### stdio (default)
|
|
89
|
+
|
|
90
|
+
For local AI client integration (Claude Desktop, Cursor, Continue):
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
node bin/index.js
|
|
94
|
+
# or explicitly:
|
|
95
|
+
node bin/index.js --transport=stdio
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Streamable HTTP
|
|
99
|
+
|
|
100
|
+
For remote deployment (Kubernetes, Docker):
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
node bin/index.js --transport=streamable-http
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This starts an HTTP server on port 8080 (configurable via `HTTP_PORT`) with:
|
|
107
|
+
- `POST/GET/DELETE /mcp` -- MCP streamable HTTP endpoint
|
|
108
|
+
- `GET /healthz` -- Liveness probe (always 200)
|
|
109
|
+
- `GET /readyz` -- Readiness probe (200 when MCP server is connected)
|
|
110
|
+
|
|
111
|
+
### MCP Client Configuration (stdio)
|
|
112
|
+
|
|
113
|
+
Add to your MCP client config (e.g., Claude Desktop, Cursor, Continue):
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": {
|
|
118
|
+
"giantswarm-pro": {
|
|
119
|
+
"command": "pro",
|
|
120
|
+
"args": [],
|
|
121
|
+
"env": {
|
|
122
|
+
"GITHUB_API_TOKEN": "your-github-token"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
See `mcp-config-example.json` for a template.
|
|
130
|
+
|
|
131
|
+
**Claude Desktop config locations:**
|
|
132
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
133
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
134
|
+
|
|
135
|
+
### Kubernetes Deployment
|
|
136
|
+
|
|
137
|
+
A Helm chart is available for deploying PRO in Kubernetes with the streamable HTTP transport.
|
|
138
|
+
|
|
139
|
+
**Prerequisites:**
|
|
140
|
+
|
|
141
|
+
1. Create a namespace:
|
|
142
|
+
```bash
|
|
143
|
+
kubectl create namespace mcp-pro
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
2. Create a secret with your GitHub token (requires `project:write` and `repo:write` scopes):
|
|
147
|
+
```bash
|
|
148
|
+
kubectl -n mcp-pro create secret generic pro-github-token \
|
|
149
|
+
--from-literal=token=your-github-token
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Install:**
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
helm install pro ./helm/pro -n mcp-pro
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Verify:**
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
kubectl -n mcp-pro get pods
|
|
162
|
+
kubectl -n mcp-pro port-forward svc/pro 8080:8080
|
|
163
|
+
curl http://localhost:8080/healthz # {"status":"ok"}
|
|
164
|
+
curl http://localhost:8080/readyz # {"status":"ready"}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The Helm chart configures `--transport=streamable-http` automatically. The deployment includes liveness (`/healthz`) and readiness (`/readyz`) probes, runs as a non-root user, and enforces a read-only root filesystem.
|
|
168
|
+
|
|
169
|
+
**Key Helm values:**
|
|
170
|
+
|
|
171
|
+
| Value | Default | Description |
|
|
172
|
+
|-------|---------|-------------|
|
|
173
|
+
| `image.repository` | `gsoci.azurecr.io/giantswarm/pro` | Container image registry and name |
|
|
174
|
+
| `image.tag` | `default .Chart.AppVersion` | Image tag |
|
|
175
|
+
| `service.port` | `8080` | Service port |
|
|
176
|
+
| `env` | GitHub token from secret | Environment variables for the container |
|
|
177
|
+
| `ingress.enabled` | `false` | Enable ingress (disabled by default) |
|
|
178
|
+
|
|
179
|
+
### Docker
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
docker run -d \
|
|
183
|
+
-p 8080:8080 \
|
|
184
|
+
-e GITHUB_API_TOKEN=your-github-token \
|
|
185
|
+
gsoci.azurecr.io/giantswarm/pro:v1.2.15
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
The container defaults to `--transport=streamable-http`.
|
|
189
|
+
|
|
190
|
+
## Boards
|
|
191
|
+
|
|
192
|
+
| Board | Project | Description |
|
|
193
|
+
|-------|---------|-------------|
|
|
194
|
+
| `roadmap` | [#273](https://github.com/orgs/giantswarm/projects/273) | Company quarterly goals, team/SIG/WG issues |
|
|
195
|
+
| `customer` | [#345](https://github.com/orgs/giantswarm/projects/345) | Customer activities and requests from private repos |
|
|
196
|
+
|
|
197
|
+
The `board` parameter defaults to `"roadmap"` on all tools for backward compatibility.
|
|
198
|
+
|
|
199
|
+
## MCP Tools
|
|
200
|
+
|
|
201
|
+
### Read Tools
|
|
202
|
+
|
|
203
|
+
- **`list_issues`** -- List and filter issues from a project board using generic field filters. Specify `board` to choose the board (`"roadmap"` or `"customer"`). Use `filters` (a field name-to-value map) to filter by any single-select field. Use `emptyFields` to find items missing specific field values. Read the board's schema resource first to discover available fields and valid options.
|
|
204
|
+
|
|
205
|
+
- **`get_issue_details`** -- Get full details for a specific item: repository metadata, title, body text, comments with timestamps, assignees, labels, dates, and all field values. Board-independent (queries by item ID).
|
|
206
|
+
|
|
207
|
+
### Write Tools
|
|
208
|
+
|
|
209
|
+
- **`update_issue_field`** -- Update a single-select field value. Provide human-readable field and option names; the server resolves them to GitHub node IDs. Specify `board` to target the correct board.
|
|
210
|
+
|
|
211
|
+
- **`create_issue_in_project`** -- Create a new GitHub Issue in a repository and add it to a board. Optionally set initial status and assignees. Public issues in `giantswarm/roadmap` require `confirmPublicSafe=true`.
|
|
212
|
+
|
|
213
|
+
- **`add_existing_issue`** -- Add an existing GitHub issue to a board by URL or node ID.
|
|
214
|
+
|
|
215
|
+
- **`archive_item`** -- Archive a project item from the active board view.
|
|
216
|
+
|
|
217
|
+
## MCP Resources
|
|
218
|
+
|
|
219
|
+
Resources are provided per board. Read the schema resource before querying to understand the available fields and their valid option values.
|
|
220
|
+
|
|
221
|
+
| Resource | Description |
|
|
222
|
+
|----------|-------------|
|
|
223
|
+
| `roadmap://schema` | Field schema for the Roadmap Board |
|
|
224
|
+
| `roadmap://overview` | Stats and status distribution for the Roadmap Board |
|
|
225
|
+
| `customer://schema` | Field schema for the Customer Board |
|
|
226
|
+
| `customer://overview` | Stats and status distribution for the Customer Board |
|
|
227
|
+
|
|
228
|
+
## Repository Safety Guidance
|
|
229
|
+
|
|
230
|
+
- `giantswarm/roadmap` is public. Use it only for sanitized, public-safe issue content.
|
|
231
|
+
- `giantswarm/giantswarm` is internal/private. Use it for internal and customer-specific operational details.
|
|
232
|
+
- Customer board issues live in private customer repositories (e.g. `giantswarm/<customer>`). The board itself is a public GitHub project, but issue content is only visible to users with repository access.
|
|
233
|
+
- The server enforces an explicit confirmation (`confirmPublicSafe=true`) before creating issues in `giantswarm/roadmap`.
|
|
234
|
+
|
|
235
|
+
## Example Conversations
|
|
236
|
+
|
|
237
|
+
**Roadmap -- Product Owner Workflow:**
|
|
238
|
+
```
|
|
239
|
+
You: "Show me all roadmap issues for Team Honey Badger that are missing a function field"
|
|
240
|
+
AI: [Reads roadmap://schema, then uses list_issues with board="roadmap", filters={"Team": "Honey Badger"}, emptyFields=["Function"]]
|
|
241
|
+
|
|
242
|
+
You: "Set the function for issue PVTI_xxx to 'Security'"
|
|
243
|
+
AI: [Uses update_issue_field with board="roadmap"]
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Customer Board -- Account Engineer Workflow:**
|
|
247
|
+
```
|
|
248
|
+
You: "Show me all customer issues that are blocked"
|
|
249
|
+
AI: [Reads customer://schema, then uses list_issues with board="customer", filters={"Status": "Blocked"}]
|
|
250
|
+
|
|
251
|
+
You: "What customer issues are assigned to Team Tenet?"
|
|
252
|
+
AI: [Uses list_issues with board="customer", filters={"Team": "Tenet"}]
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Cross-board Workflow:**
|
|
256
|
+
```
|
|
257
|
+
You: "Create a new feature request in the customer repo and add it to the customer board"
|
|
258
|
+
AI: [Uses create_issue_in_project with board="customer"]
|
|
259
|
+
|
|
260
|
+
You: "Add issue https://github.com/giantswarm/example/issues/42 to the roadmap board"
|
|
261
|
+
AI: [Uses add_existing_issue with board="roadmap"]
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Library Usage
|
|
265
|
+
|
|
266
|
+
The board core is importable as `@giantswarm-io/pro`, independent of the MCP server. Consumers (e.g. the Backstage roadmap backend plugin) get the same board registry, GraphQL queries, and field semantics the MCP server uses.
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
npm install @giantswarm-io/pro
|
|
270
|
+
# or, before the package is on npm / for unreleased versions:
|
|
271
|
+
npm install github:giantswarm/pro#v1.2.53
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
```js
|
|
275
|
+
import {
|
|
276
|
+
BOARDS, resolveBoardId,
|
|
277
|
+
listItems, getItemByID, updateItemField,
|
|
278
|
+
listFields, findFieldByName, findMatchingOption,
|
|
279
|
+
listSubIssues, addSubIssue, removeSubIssue, getParentIssue
|
|
280
|
+
} from '@giantswarm-io/pro';
|
|
281
|
+
|
|
282
|
+
const boardId = resolveBoardId('roadmap');
|
|
283
|
+
|
|
284
|
+
// Reads -- every function accepts an optional per-request token as its last
|
|
285
|
+
// argument (falls back to the GITHUB_API_TOKEN environment variable).
|
|
286
|
+
const { data } = await listItems({ boardId, filters: { Team: 'Bumblebee🐝' }, token });
|
|
287
|
+
const item = await getItemByID('PVTI_xxx', token);
|
|
288
|
+
|
|
289
|
+
// Writes -- resolve field and option names to node IDs, then mutate.
|
|
290
|
+
const field = await findFieldByName('Status', boardId, token);
|
|
291
|
+
const option = findMatchingOption(field.options, 'In Progress ⛏️');
|
|
292
|
+
await updateItemField('PVTI_xxx', field.id, { singleSelectOptionId: option.id }, boardId, token);
|
|
293
|
+
|
|
294
|
+
// Sub-issues (REST) -- targets take explicit owner/repo/issue_number,
|
|
295
|
+
// child issues are referenced by their integer ID (use resolveIssueId).
|
|
296
|
+
await addSubIssue({ owner: 'giantswarm', repo: 'giantswarm', issue_number: 1234, subIssueId: 987654321 }, token);
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
The exported surface is defined in [`src/index.js`](src/index.js). The MCP server and CLI are not part of the library entry point.
|
|
300
|
+
|
|
301
|
+
### Releases
|
|
302
|
+
|
|
303
|
+
The `Publish package` workflow runs on every GitHub Release (created automatically by the Auto-release workflow), sets the package version from the release tag, attaches the npm tarball to the release, and publishes `@giantswarm-io/pro` to npm (skipped while the `NPM_TOKEN` repository secret is not configured).
|
|
304
|
+
|
|
305
|
+
## Development
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
# Start the MCP server locally (stdio)
|
|
309
|
+
node bin/index.js
|
|
310
|
+
|
|
311
|
+
# Start with HTTP transport
|
|
312
|
+
node bin/index.js --transport=streamable-http
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## License
|
|
316
|
+
|
|
317
|
+
Copyright (c) 2025 Giant Swarm GmbH. All Rights Reserved.
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Giant Swarm PRO MCP Server
|
|
5
|
+
*
|
|
6
|
+
* Starts the MCP server with the selected transport:
|
|
7
|
+
* --transport=stdio (default) stdio transport for local AI clients
|
|
8
|
+
* --transport=streamable-http HTTP transport for remote/K8s deployment
|
|
9
|
+
*
|
|
10
|
+
* Required environment variables:
|
|
11
|
+
* - GITHUB_API_TOKEN: GitHub PAT with project:write and repo:write scopes
|
|
12
|
+
*
|
|
13
|
+
* Optional environment variables:
|
|
14
|
+
* - HTTP_PORT: Port for HTTP transport (default: 8080)
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { startMCPServer } from '../src/lib/mcp/server.js';
|
|
18
|
+
import { startHTTPServer } from '../src/lib/mcp/http.js';
|
|
19
|
+
import { logger } from '../src/lib/logger.js';
|
|
20
|
+
import { tools } from '../src/lib/mcp/tools.js';
|
|
21
|
+
import { BOARDS } from '../src/lib/project.js';
|
|
22
|
+
import { version } from '../src/lib/version.js';
|
|
23
|
+
import { selfUpdate } from '../src/lib/selfupdate.js';
|
|
24
|
+
|
|
25
|
+
// Handle --self-update flag
|
|
26
|
+
if (process.argv.includes('--self-update')) {
|
|
27
|
+
selfUpdate().catch(error => {
|
|
28
|
+
logger.error(`Self-update failed: ${error.message}`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
// Parse --transport flag from argv
|
|
33
|
+
const transportArg = process.argv.find(arg => arg.startsWith('--transport='));
|
|
34
|
+
const transport = transportArg ? transportArg.split('=')[1] : 'stdio';
|
|
35
|
+
|
|
36
|
+
const boardCount = Object.keys(BOARDS).length;
|
|
37
|
+
const resourceCount = boardCount * 2; // schema + overview per board
|
|
38
|
+
logger.info(`Giant Swarm PRO MCP Server v${version} (${tools.length} tools, ${resourceCount} resources, ${boardCount} boards)`);
|
|
39
|
+
|
|
40
|
+
switch (transport) {
|
|
41
|
+
case 'stdio':
|
|
42
|
+
if (!process.env.GITHUB_API_TOKEN) {
|
|
43
|
+
logger.error('GITHUB_API_TOKEN environment variable is required for stdio transport.');
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
logger.info('Starting with stdio transport');
|
|
47
|
+
startMCPServer().catch(error => {
|
|
48
|
+
logger.error(`Failed to start MCP server: ${error.message}`);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
});
|
|
51
|
+
break;
|
|
52
|
+
|
|
53
|
+
case 'streamable-http':
|
|
54
|
+
logger.info('Starting with streamable HTTP transport');
|
|
55
|
+
startHTTPServer().catch(error => {
|
|
56
|
+
logger.error(`Failed to start HTTP server: ${error.message}`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
});
|
|
59
|
+
break;
|
|
60
|
+
|
|
61
|
+
default:
|
|
62
|
+
logger.error(`Unknown transport: ${transport}. Use 'stdio' or 'streamable-http'.`);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@giantswarm-io/pro",
|
|
3
|
+
"version": "1.3.1",
|
|
4
|
+
"description": "Core library and MCP server for managing Giant Swarm's roadmap and customer project boards",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/giantswarm/pro.git"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "src/index.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./src/index.js",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"pro": "bin/index.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"bin",
|
|
21
|
+
"src",
|
|
22
|
+
"!src/**/*.test.js"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"start": "node bin/index.js",
|
|
29
|
+
"start:http": "node bin/index.js --transport=streamable-http",
|
|
30
|
+
"self-update": "node bin/index.js --self-update",
|
|
31
|
+
"test": "node --test"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@modelcontextprotocol/sdk": "^1.24.3",
|
|
35
|
+
"@octokit/graphql": "^9.0.3",
|
|
36
|
+
"@octokit/rest": "^22.0.1",
|
|
37
|
+
"express": "^5.2.1"
|
|
38
|
+
},
|
|
39
|
+
"author": "Timo Derstappen"
|
|
40
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @giantswarm-io/pro — importable core
|
|
3
|
+
*
|
|
4
|
+
* Library entry point for consumers that want pro's GitHub Projects board
|
|
5
|
+
* logic without the MCP server (e.g. the Backstage roadmap backend plugin).
|
|
6
|
+
*
|
|
7
|
+
* Every function accepts an optional per-request GitHub token as its last
|
|
8
|
+
* argument (or `token` option), falling back to the GITHUB_API_TOKEN
|
|
9
|
+
* environment variable. This is the injection point for callers that manage
|
|
10
|
+
* their own credentials (GitHub App installation tokens, per-user OAuth).
|
|
11
|
+
*
|
|
12
|
+
* The MCP server and CLI live behind `bin/index.js` and are not exported here.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
// Board registry and GraphQL queries
|
|
16
|
+
export {
|
|
17
|
+
BOARDS,
|
|
18
|
+
DEFAULT_BOARD,
|
|
19
|
+
resolveBoardId
|
|
20
|
+
} from './lib/project.js';
|
|
21
|
+
|
|
22
|
+
// Project items: list/filter, detail, field mutation
|
|
23
|
+
export {
|
|
24
|
+
listItems,
|
|
25
|
+
getItemByID,
|
|
26
|
+
updateItemField
|
|
27
|
+
} from './lib/items.js';
|
|
28
|
+
|
|
29
|
+
// Board fields: listing and name/value resolution (needed to build
|
|
30
|
+
// updateItemField mutation values from human-readable names)
|
|
31
|
+
export {
|
|
32
|
+
listFields,
|
|
33
|
+
findFieldByName,
|
|
34
|
+
findMatchingOption,
|
|
35
|
+
findMatchingIteration
|
|
36
|
+
} from './lib/fields.js';
|
|
37
|
+
|
|
38
|
+
// Sub-issue REST API (parent/child issue relationships)
|
|
39
|
+
export {
|
|
40
|
+
listSubIssues,
|
|
41
|
+
addSubIssue,
|
|
42
|
+
removeSubIssue,
|
|
43
|
+
getParentIssue,
|
|
44
|
+
reprioritizeSubIssue
|
|
45
|
+
} from './lib/sub-issues.js';
|
|
46
|
+
|
|
47
|
+
// Low-level GitHub clients for anything not covered above
|
|
48
|
+
export { graphQLWithAuth, fetchPaginated } from './lib/api.js';
|
|
49
|
+
export { getOctokit, parseIssueRef, resolveIssueId } from './lib/rest-api.js';
|