@edgegap/mcp 0.2.2 → 0.3.0
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/README.md +277 -341
- package/dist/hosted.js +61 -0
- package/dist/http.js +122 -0
- package/dist/index.js +1 -1
- package/dist/tools.js +38 -8
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -1,341 +1,277 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
[
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
| `
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
|
|
|
182
|
-
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
| `
|
|
201
|
-
| `
|
|
202
|
-
| `
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
**The registry credentials endpoint is not in the public spec.** It is
|
|
279
|
-
`GET /v1/wizard/registry-credentials`, the same call the Unity plugin makes,
|
|
280
|
-
preceded by `POST /v1/wizard/init-quick-start` when the project is not yet
|
|
281
|
-
provisioned.
|
|
282
|
-
|
|
283
|
-
**Bulk operations are deliberately absent.** `stop` takes one `request_id`.
|
|
284
|
-
There is no bulk-stop tool, because an agent with a filter expression and a bug
|
|
285
|
-
can stop a production fleet.
|
|
286
|
-
|
|
287
|
-
**Both a hosted endpoint and a local package.** The hosted endpoint removes
|
|
288
|
-
every step between finding this server and calling a tool, which is where most
|
|
289
|
-
developers drop out. The local package is the only way to run the server
|
|
290
|
-
without extending custody of an unscoped token to a third party, including us.
|
|
291
|
-
Neither one dominates the other, so both ship. See `worker/DECISION.md` for the
|
|
292
|
-
longer version.
|
|
293
|
-
|
|
294
|
-
## Scope
|
|
295
|
-
|
|
296
|
-
Not exposed, on purpose: private fleets, smart fleets, endpoint storage,
|
|
297
|
-
ACL/whitelist entries, deployment tags, metrics, registry tag deletion, DNS
|
|
298
|
-
configuration, and matchmaker lifecycle (start, stop, delete).
|
|
299
|
-
|
|
300
|
-
These belong to studios already operating on the platform, not to a developer
|
|
301
|
-
getting a first game online. Dockerfile generation and validation, registry
|
|
302
|
-
push, a basic matchmaker config, and relays were moved in scope because agents
|
|
303
|
-
hit them before the first deploy, not after.
|
|
304
|
-
|
|
305
|
-
## Known limitation: asking for the token at all
|
|
306
|
-
|
|
307
|
-
This applies to local mode, where the token is collected through elicitation
|
|
308
|
-
rather than read from config.
|
|
309
|
-
|
|
310
|
-
The MCP specification says servers should not use elicitation to collect
|
|
311
|
-
sensitive data, and an API token is sensitive. This server does it anyway,
|
|
312
|
-
because requiring a token in a config file before anything works is the largest
|
|
313
|
-
drop in the onboarding funnel, and the whole point of the server is to remove
|
|
314
|
-
setup friction.
|
|
315
|
-
|
|
316
|
-
That is a deliberate trade rather than a pattern to copy. What makes it
|
|
317
|
-
defensible is the set of mitigations in `src/auth.ts` — memory-only storage,
|
|
318
|
-
plain-language disclosure, required acknowledgement, redaction from all output,
|
|
319
|
-
and the environment variable always winning when present. Removing any of them
|
|
320
|
-
breaks the trade.
|
|
321
|
-
|
|
322
|
-
The real fix is on Edgegap's side and would improve both modes: scoped,
|
|
323
|
-
revocable, deploy-only credentials, issued through OAuth rather than pasted as
|
|
324
|
-
a secret. Until those exist, the interactive prompt is a workaround and is
|
|
325
|
-
labelled as one in the code.
|
|
326
|
-
|
|
327
|
-
## Development
|
|
328
|
-
|
|
329
|
-
```bash
|
|
330
|
-
npm run typecheck
|
|
331
|
-
node smoke.mjs # handshake, tool registration, read-only mode
|
|
332
|
-
node guards.mjs # local validation and allowlist enforcement
|
|
333
|
-
node elicit.mjs # token prompt: accept, refuse acknowledgement, decline, no support
|
|
334
|
-
node newtools.mjs # validator, registry, relay, matchmaker tools against a local mock API
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
None of these reach Edgegap. `newtools.mjs` points `EDGEGAP_BASE_URL` at a
|
|
338
|
-
mock server on localhost. `elicit.mjs` asserts that the prompt states
|
|
339
|
-
the org-wide scope, that the acknowledgement is required, that the token never
|
|
340
|
-
appears in tool output, and that declining produces a stop-and-report message
|
|
341
|
-
rather than a retry loop.
|
|
1
|
+
# Edgegap MCP Server
|
|
2
|
+
|
|
3
|
+
Connect AI coding agents to Edgegap through our MCP server. Your agent can take a headless server build all the way to players connecting: write or check the Dockerfile, push the image to your private Edgegap registry, deploy an authoritative dedicated server close to players, and read logs when something breaks.
|
|
4
|
+
|
|
5
|
+
[](https://cursor.com/en/install-mcp?name=Edgegap&config=eyJ1cmwiOiJodHRwczovL21jcC5lZGdlZ2FwLmRldi9tY3AiLCJoZWFkZXJzIjp7IkF1dGhvcml6YXRpb24iOiIifX0%3D)
|
|
6
|
+
[](https://vscode.dev/redirect/mcp/install?name=Edgegap&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.edgegap.dev%2Fmcp%22%2C%22headers%22%3A%7B%22Authorization%22%3A%22%22%7D%7D)
|
|
7
|
+
|
|
8
|
+
## 👉 Supported Features
|
|
9
|
+
|
|
10
|
+
> [!TIP]
|
|
11
|
+
> **Using Unity, Unreal Engine, or Godot?** Our [Unity](https://docs.edgegap.com/unity), [Unreal Engine](https://docs.edgegap.com/unreal-engine), and [Godot](https://docs.edgegap.com/godot) guides and plugins remain the fastest path for those engines. The MCP server works alongside them, and on its own for any engine.
|
|
12
|
+
|
|
13
|
+
Use our MCP server when:
|
|
14
|
+
|
|
15
|
+
* **Containerizing your game server** - your agent writes a Dockerfile for your build (or checks the one you have) against Edgegap's requirements, then pushes the image to your private Edgegap container registry.
|
|
16
|
+
* **Deploying a dedicated server** - create an application and version, deploy close to your players, and get the connection address.
|
|
17
|
+
* **Setting up matchmaking** - generate a matchmaker configuration that points at your deployed version, ready to upload in the dashboard.
|
|
18
|
+
* **Running a host-client game** - create a relay session if your game is built with one player as host. See [Dedicated Servers or Relays?](#dedicated-servers-or-relays) first.
|
|
19
|
+
* **Building a CI/CD pipeline** - test your deployments and teardown from a build system.
|
|
20
|
+
* **Troubleshooting a game server issue** - inspect app versions and deployment status, read container logs, or reproduce a failed deployment.
|
|
21
|
+
|
|
22
|
+
> [!WARNING]
|
|
23
|
+
> Out of scope / not supported by MCP: creating or running a matchmaker (the MCP generates the configuration, you upload it in the dashboard); server browser; lobbies; managed clusters; private fleets; or billing.
|
|
24
|
+
|
|
25
|
+
> [!NOTE]
|
|
26
|
+
> If you need help, [please reach out to us over Discord](https://discord.gg/MmJf8fWjnt). For live games support see our [ticketing system](https://edgegap.atlassian.net/servicedesk/customer/portal/3).
|
|
27
|
+
|
|
28
|
+
<a id="dedicated-servers-or-relays"></a>
|
|
29
|
+
|
|
30
|
+
## ⚖️ Dedicated Servers or Relays?
|
|
31
|
+
|
|
32
|
+
Edgegap can host your multiplayer game in two ways. **We recommend dedicated servers**, and so does our MCP server: your agent will default to a dedicated server and only use a relay when you've chosen a host-client setup.
|
|
33
|
+
|
|
34
|
+
| | Dedicated server (recommended) | Relay |
|
|
35
|
+
| ----------------------- | ------------------------------------------------ | --------------------------------------------------------- |
|
|
36
|
+
| What Edgegap runs | Your headless server build, close to players | A traffic forwarder only, no game code |
|
|
37
|
+
| Who runs the game | The server | One player's game (the host) |
|
|
38
|
+
| Cheating | Much harder, the server has authority | The host can change anything |
|
|
39
|
+
| Fairness | Every player connects directly to the server | The host has no latency, everyone else goes through two hops |
|
|
40
|
+
| When the host leaves | The match continues | The match ends, unless your game supports host migration |
|
|
41
|
+
| Performance limited by | The server's allocated CPU and memory | The host's PC and home internet upload |
|
|
42
|
+
| You need | A server build in a container image | Netcode built as a listen server (host-client) |
|
|
43
|
+
|
|
44
|
+
> [!NOTE]
|
|
45
|
+
> **No server image yet?** That's not a reason to choose relays. Your agent can write the Dockerfile for your build with `edgegap_generate_dockerfile`. Learn more about relays in [Distributed Relay](https://docs.edgegap.com/learn/distributed-relay).
|
|
46
|
+
|
|
47
|
+
## 🚀 Installation
|
|
48
|
+
|
|
49
|
+
MCP server installation is very simple:
|
|
50
|
+
|
|
51
|
+
1. Install the MCP server for [Popular Agents](#popular-agents) or with [Custom Integration](#custom-integration).
|
|
52
|
+
2. Generate and attach an API token for your agent to use with our MCP server.
|
|
53
|
+
|
|
54
|
+
Generate (and view) your secret tokens for Edgegap API in [Dashboard - User Settings / Tokens](https://app.edgegap.com/user-settings?tab=tokens).
|
|
55
|
+
|
|
56
|
+
Add your secret token with each API request as an HTTP header (include the word `token`):
|
|
57
|
+
|
|
58
|
+
`Authorization: token xxxxxxxx-e458-4592-b607-c2c28afd8b62`
|
|
59
|
+
|
|
60
|
+
> [!CAUTION]
|
|
61
|
+
> **Do not integrate Edgegap API endpoints in game client, as your API token provides unlimited access to your account. See [Integration](https://docs.edgegap.com/docs/api/integration) for secure client-facing API endpoints and functions.**
|
|
62
|
+
|
|
63
|
+
> [!TIP]
|
|
64
|
+
> In case your secret tokens are compromised or leaked, delete and re-create them from dashboard.
|
|
65
|
+
|
|
66
|
+
The token is organization-wide and cannot be scoped to one application. Read [DESIGN.md](DESIGN.md#where-your-token-goes) before giving it to an unattended agent.
|
|
67
|
+
|
|
68
|
+
### Popular Agents
|
|
69
|
+
|
|
70
|
+
Install Edgegap MCP server in your preferred agentic IDE with the **Cursor** or **VS Code** buttons at the top of this page, then add your token to the `Authorization` header.
|
|
71
|
+
|
|
72
|
+
#### Claude Code
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
claude mcp add --transport http edgegap https://mcp.edgegap.dev/mcp \
|
|
76
|
+
-H "Authorization: token xxxxxxxx-e458-4592-b607-c2c28afd8b62" --scope user
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
#### ChatGPT Codex
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
codex mcp add edgegap --url https://mcp.edgegap.dev/mcp
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
#### claude.ai
|
|
86
|
+
|
|
87
|
+
Add `https://mcp.edgegap.dev/mcp` as a custom connector and supply the same token.
|
|
88
|
+
|
|
89
|
+
#### mcp.json
|
|
90
|
+
|
|
91
|
+
Most agentic IDEs also support integration by pasting JSON configuration:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"mcpServers": {
|
|
96
|
+
"Edgegap": {
|
|
97
|
+
"type": "http",
|
|
98
|
+
"url": "https://mcp.edgegap.dev/mcp",
|
|
99
|
+
"headers": {
|
|
100
|
+
"Authorization": "token xxxxxxxx-e458-4592-b607-c2c28afd8b62"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Custom Integration
|
|
108
|
+
|
|
109
|
+
Install remote Edgegap MCP server in your agent's virtualized environment (never in your project!):
|
|
110
|
+
|
|
111
|
+
**Node, using the `mcp-remote` npx package**
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"command": "npx",
|
|
116
|
+
"args": ["-y", "mcp-remote", "https://mcp.edgegap.dev/mcp", "--transport", "http-only"]
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Python, using the `mcp-proxy` uvx package**
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"command": "uvx",
|
|
125
|
+
"args": ["mcp-proxy", "--transport", "streamablehttp", "https://mcp.edgegap.dev/mcp"]
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Local Server
|
|
130
|
+
|
|
131
|
+
To keep your API token on your own machine, run the server locally instead. Leave the token out and your agent asks you for it on first use, holding it in memory only for that session:
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"mcpServers": {
|
|
136
|
+
"Edgegap": {
|
|
137
|
+
"command": "npx",
|
|
138
|
+
"args": ["-y", "@edgegap/mcp"],
|
|
139
|
+
"env": { "EDGEGAP_API_TOKEN": "xxxxxxxx-e458-4592-b607-c2c28afd8b62" }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Needs Node 18+. Pin a version in production (`@edgegap/mcp@0.3.0`) rather than floating on latest. Registered in the official MCP registry as `dev.edgegap/mcp`.
|
|
146
|
+
|
|
147
|
+
The local server can also limit what an agent can do. These variables have no effect on the hosted endpoint at `mcp.edgegap.dev`:
|
|
148
|
+
|
|
149
|
+
| Variable | Default | Purpose |
|
|
150
|
+
| --- | --- | --- |
|
|
151
|
+
| `EDGEGAP_API_TOKEN` | *(prompted)* | API token. Optional: omit it and you're asked at first use. The `token ` prefix is added for you. Never pass it as a command-line argument. |
|
|
152
|
+
| `EDGEGAP_READ_ONLY` | `0` | Set to `1` and the eight mutating tools are never registered, so the agent cannot be talked into calling them. |
|
|
153
|
+
| `EDGEGAP_APP_ALLOWLIST` | *(empty)* | Comma-separated application names. Limits what the agent can create and deploy into, not what it can touch once running. See [DESIGN.md](DESIGN.md#scope-of-the-allowlist). |
|
|
154
|
+
| `EDGEGAP_MAX_DURATION_MINUTES` | `60` | Ceiling on `max_duration` the agent may set on a version. |
|
|
155
|
+
| `EDGEGAP_TIMEOUT_MS` | `30000` | Per-request HTTP timeout. |
|
|
156
|
+
|
|
157
|
+
## 🧰 Tools
|
|
158
|
+
|
|
159
|
+
Your agent picks the right tool from your request. You don't need to name them, but knowing what's available helps you ask. Tools marked ● change something in your account and are hidden when `EDGEGAP_READ_ONLY=1`.
|
|
160
|
+
|
|
161
|
+
### Before Your First Deployment
|
|
162
|
+
|
|
163
|
+
| Tool | What it does |
|
|
164
|
+
| --- | --- |
|
|
165
|
+
| `edgegap_generate_dockerfile` | Writes a Dockerfile for your server build: your build folder, server binary or start script, ports, and launch arguments, with the right headless flags (Unity `-batchmode -nographics`, Godot `--headless`), a non-root user for Unreal, and matching ports. Lists anything it had to assume so your agent can confirm it. Works for Unity, Unreal Engine, Godot, and any other engine. |
|
|
166
|
+
| `edgegap_validate_server_config` | Checks an existing Dockerfile, ports, resources, and image tag before you build. Catches ARM or Windows images (Edgegap runs `linux/amd64`), Unreal servers running as root, missing Unity `-batchmode -nographics`, servers bound to `localhost`, ports that don't match your netcode transport, and the `latest` tag. |
|
|
167
|
+
| `edgegap_get_registry_credentials` ● | Returns push credentials for your private Edgegap container registry, with the exact `docker login`, build, and push commands. No Docker Hub account needed. |
|
|
168
|
+
| `edgegap_list_registry_tags` | Confirms your image push landed before you register it. |
|
|
169
|
+
|
|
170
|
+
### Dedicated Servers (Recommended)
|
|
171
|
+
|
|
172
|
+
| Tool | What it does |
|
|
173
|
+
| --- | --- |
|
|
174
|
+
| `edgegap_list_apps` | Lists your applications. |
|
|
175
|
+
| `edgegap_create_app` ● | Creates an application. |
|
|
176
|
+
| `edgegap_list_app_versions` | Lists versions with their image, resources, and ports. |
|
|
177
|
+
| `edgegap_create_app_version` ● | Registers a container image as a deployable version. |
|
|
178
|
+
| `edgegap_deploy` ● | Deploys an authoritative dedicated server close to your players. |
|
|
179
|
+
| `edgegap_wait_for_deployment` | Waits until the server is ready and returns the connection address. |
|
|
180
|
+
| `edgegap_get_deployment` | Reads a deployment's status. |
|
|
181
|
+
| `edgegap_list_deployments` | Lists running deployments, filtered by application, version, status, tags and more, and sorted by age. Finds servers left running. See [Filter Deployments](https://docs.edgegap.com/learn/orchestration/deployments#filter-deployments). |
|
|
182
|
+
| `edgegap_get_deployment_logs` | Reads container logs and crash details. |
|
|
183
|
+
| `edgegap_stop_deployment` ● | Stops one deployment. |
|
|
184
|
+
|
|
185
|
+
### Matchmaking
|
|
186
|
+
|
|
187
|
+
| Tool | What it does |
|
|
188
|
+
| --- | --- |
|
|
189
|
+
| `edgegap_build_matchmaker_config` | Generates a matchmaker configuration (teams, team size, optional latency rules and expansions) and checks that the version it deploys exists. Upload the result in the dashboard to create your matchmaker, which starts a dedicated server for each match. |
|
|
190
|
+
|
|
191
|
+
Learn more about the configuration in [Matchmaking](https://docs.edgegap.com/learn/matchmaking).
|
|
192
|
+
|
|
193
|
+
### Relays (Host-Client Games Only)
|
|
194
|
+
|
|
195
|
+
A relay is not a game server: it forwards traffic while one player's game hosts the match. See [Dedicated Servers or Relays?](#dedicated-servers-or-relays).
|
|
196
|
+
|
|
197
|
+
| Tool | What it does |
|
|
198
|
+
| --- | --- |
|
|
199
|
+
| `edgegap_create_relay_session` ● | Creates a relay session for your players and returns the relay address and each player's authorization token. |
|
|
200
|
+
| `edgegap_get_relay_session` | Reads a relay session. |
|
|
201
|
+
| `edgegap_authorize_relay_user` ● | Adds a player who joins later. |
|
|
202
|
+
| `edgegap_delete_relay_session` ● | Closes a relay session. |
|
|
203
|
+
|
|
204
|
+
> [!WARNING]
|
|
205
|
+
> Deployments and relay sessions are billed while they run. Ask your agent to stop test deployments and delete test relay sessions when it's done.
|
|
206
|
+
|
|
207
|
+
### Example Prompts
|
|
208
|
+
|
|
209
|
+
* *"Write a Dockerfile for my Unity server build, then push it and deploy a server near me."*
|
|
210
|
+
* *"Check my Dockerfile for Edgegap and fix any problems."*
|
|
211
|
+
* *"Create a matchmaker config for 2v2 matches on my latest version."*
|
|
212
|
+
* *"My deployment failed. Read the logs and tell me why."*
|
|
213
|
+
* *"My game uses host-client networking. Set up an Edgegap relay for two players."*
|
|
214
|
+
|
|
215
|
+
## 🚨 Troubleshooting
|
|
216
|
+
|
|
217
|
+
Review common error codes and learn how to unlock your integration.
|
|
218
|
+
|
|
219
|
+
### 401 Unauthorized
|
|
220
|
+
|
|
221
|
+
Your MCP integration is most likely not including the Authorization header correctly.
|
|
222
|
+
|
|
223
|
+
### 403 Forbidden
|
|
224
|
+
|
|
225
|
+
Your MCP integration is likely using the template token or a deleted token. Please validate that the token value used by your integration matches exactly the token displayed in dashboard.
|
|
226
|
+
|
|
227
|
+
### 424 Image Could Not Be Pulled
|
|
228
|
+
|
|
229
|
+
Edgegap could not pull your container image. Check the repository, image name, and tag, and that the tag was pushed (ask your agent to list registry tags). For images in the Edgegap registry, the image name must include your project, e.g. `my-project/my-game-server`.
|
|
230
|
+
|
|
231
|
+
### Registry Credentials Unavailable
|
|
232
|
+
|
|
233
|
+
If your agent can't retrieve registry credentials, request them in the [dashboard](https://app.edgegap.com) under **Container Registry**, or push to another registry Edgegap can pull from (Docker Hub, GitHub, AWS ECR, GCP, GitLab). See [External Registries](https://docs.edgegap.com/docs/tools-and-integrations/docker/external-registries).
|
|
234
|
+
|
|
235
|
+
### Server Starts Locally but Not on Edgegap
|
|
236
|
+
|
|
237
|
+
Ask your agent to validate your server configuration, or to generate a new Dockerfile. The most common causes are an image built on Apple Silicon without `docker build --platform linux/amd64`, a server listening on a different port than the version exposes, or a UDP transport configured as TCP.
|
|
238
|
+
|
|
239
|
+
### Other API Errors
|
|
240
|
+
|
|
241
|
+
Please consult our [API Reference](https://docs.edgegap.com/docs/api) for possible error responses for individual API endpoints.
|
|
242
|
+
|
|
243
|
+
> [!NOTE]
|
|
244
|
+
> If you need help, [please reach out to us over Discord](https://discord.gg/MmJf8fWjnt). For live games support see our [ticketing system](https://edgegap.atlassian.net/servicedesk/customer/portal/3).
|
|
245
|
+
|
|
246
|
+
## 🛠️ Self-Hosting
|
|
247
|
+
|
|
248
|
+
The hosted endpoint at `mcp.edgegap.dev` runs as a Cloudflare Worker (see [worker/INSTALL.md](worker/INSTALL.md)). To run the same stateless HTTP server on your own infrastructure, use the Docker image:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
docker build -t edgegap-mcp .
|
|
252
|
+
docker run --rm -p 8080:8080 edgegap-mcp
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Clients connect to `http://<host>:8080/mcp` with their own `Authorization` header, the same way they connect to the hosted endpoint. The image holds no credential, and `/health` answers without one. `PORT`, `HOST`, `EDGEGAP_READ_ONLY`, `EDGEGAP_APP_ALLOWLIST` and `EDGEGAP_MAX_DURATION_MINUTES` apply. Read [worker/DECISION.md](worker/DECISION.md) before exposing it beyond a private network.
|
|
256
|
+
|
|
257
|
+
Every push to `main` builds the image and pushes it to the Edgegap container registry as `registry.edgegap.com/<project>/edgegap-mcp`, tagged `main` and `sha-<commit>` (plus the version on `v*` tags). See [.github/workflows/docker.yml](.github/workflows/docker.yml) for the repository variables and secrets it needs.
|
|
258
|
+
|
|
259
|
+
## Development
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
npm ci
|
|
263
|
+
npm run build
|
|
264
|
+
npm test # mock-API tests; none reach Edgegap
|
|
265
|
+
npm run typecheck:worker
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
| Test | Covers |
|
|
269
|
+
| --- | --- |
|
|
270
|
+
| `test/smoke.mjs` | Handshake, tool registration, read-only mode |
|
|
271
|
+
| `test/guards.mjs` | Local validation and allowlist enforcement |
|
|
272
|
+
| `test/elicit.mjs` | Token prompt: accept, refuse acknowledgement, decline, no support |
|
|
273
|
+
| `test/newtools.mjs` | Validator, Dockerfile generator, registry, deployments, relay and matchmaker tools against a local mock API |
|
|
274
|
+
| `test/http.mjs` | Self-hosted HTTP server: discovery without a token, per-request tokens, foreign credentials |
|
|
275
|
+
| `test/live-check.mjs` | Not in `npm test`. Runs against the real API with a token from a non-production organization |
|
|
276
|
+
|
|
277
|
+
Design decisions, the security model, and what's deliberately out of scope are in [DESIGN.md](DESIGN.md).
|
package/dist/hosted.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-request token handling shared by the two hosted transports: the
|
|
3
|
+
* Cloudflare Worker (worker/worker.ts) and the Node HTTP server (src/http.ts).
|
|
4
|
+
*
|
|
5
|
+
* Neither has an ambient credential. Each request carries the developer's own
|
|
6
|
+
* Edgegap token in its Authorization header, and it is used for that request
|
|
7
|
+
* and discarded. See worker/DECISION.md.
|
|
8
|
+
*/
|
|
9
|
+
const TOKEN_URL = 'https://app.edgegap.com/user-settings?tab=tokens';
|
|
10
|
+
/**
|
|
11
|
+
* Edgegap API tokens are UUIDs. The strict form is the real test; the loose
|
|
12
|
+
* form exists so a future token format does not silently stop working here.
|
|
13
|
+
*
|
|
14
|
+
* The point of this check is NOT security — an invalid token fails upstream
|
|
15
|
+
* anyway. It is to tell a foreign credential apart from an Edgegap one BEFORE
|
|
16
|
+
* relaying it, so the developer gets "your client sent its own token" instead
|
|
17
|
+
* of Edgegap's generic 401. JWTs are the common case: they are what MCP clients
|
|
18
|
+
* mint for themselves, and they always carry dots, which a UUID never does.
|
|
19
|
+
*/
|
|
20
|
+
const STRICT_UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
21
|
+
const LOOSE_OPAQUE = /^[A-Za-z0-9_-]{16,200}$/;
|
|
22
|
+
function looksLikeEdgegapToken(value) {
|
|
23
|
+
if (STRICT_UUID.test(value))
|
|
24
|
+
return true;
|
|
25
|
+
return LOOSE_OPAQUE.test(value);
|
|
26
|
+
}
|
|
27
|
+
export function extractToken(header) {
|
|
28
|
+
if (!header)
|
|
29
|
+
return { token: undefined, problem: 'absent' };
|
|
30
|
+
const value = header.replace(/^Bearer\s+/i, '').replace(/^token\s+/i, '').trim();
|
|
31
|
+
if (!value)
|
|
32
|
+
return { token: undefined, problem: 'absent' };
|
|
33
|
+
if (!looksLikeEdgegapToken(value))
|
|
34
|
+
return { token: undefined, problem: 'foreign' };
|
|
35
|
+
return { token: value };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The message an agent sees when it calls a tool without a usable credential.
|
|
39
|
+
* It is the only place the developer is told what to do, so it says it in full
|
|
40
|
+
* rather than pointing at docs.
|
|
41
|
+
*/
|
|
42
|
+
export function unavailableMessage(problem) {
|
|
43
|
+
const common = `Get a token at ${TOKEN_URL}. It is used for the request and discarded — ` +
|
|
44
|
+
'never stored. Edgegap tokens are organization-wide and cannot be scoped, ' +
|
|
45
|
+
'so prefer the local server (npx -y @edgegap/mcp), which keeps the token ' +
|
|
46
|
+
'on your own machine and never sends it through Edgegap infrastructure.';
|
|
47
|
+
if (problem === 'foreign') {
|
|
48
|
+
return ('The Authorization header on this connection does not contain an Edgegap ' +
|
|
49
|
+
'API token — it looks like a credential your MCP client issued for ' +
|
|
50
|
+
'itself. That happens with clients that connect by URL alone and have no ' +
|
|
51
|
+
'field for a custom header. This server was not going to relay it to the ' +
|
|
52
|
+
'Edgegap API, because the only thing that produces is a confusing 401.\n\n' +
|
|
53
|
+
'If your client cannot attach your own Edgegap token to the connection, ' +
|
|
54
|
+
'it cannot use this hosted server: run the local one instead ' +
|
|
55
|
+
'(npx -y @edgegap/mcp).\n\n' +
|
|
56
|
+
common);
|
|
57
|
+
}
|
|
58
|
+
return ('No Edgegap API token on this request. Send it as an Authorization header ' +
|
|
59
|
+
'on the MCP connection.\n\n' +
|
|
60
|
+
common);
|
|
61
|
+
}
|
package/dist/http.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Edgegap MCP server over Streamable HTTP, for self-hosting (Docker, a VM).
|
|
4
|
+
*
|
|
5
|
+
* The same stateless design as the Cloudflare Worker: no ambient credential,
|
|
6
|
+
* the developer's token comes in on each request's Authorization header and is
|
|
7
|
+
* discarded with it, and discovery (initialize, tools/list) works without one.
|
|
8
|
+
* Read worker/DECISION.md before exposing this beyond a private network.
|
|
9
|
+
*
|
|
10
|
+
* Environment: PORT (default 8080), HOST (default 0.0.0.0), plus the same
|
|
11
|
+
* EDGEGAP_* variables as the local server. EDGEGAP_API_TOKEN is ignored here.
|
|
12
|
+
*/
|
|
13
|
+
import { createServer } from 'node:http';
|
|
14
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
15
|
+
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
16
|
+
import { loadConfig, ConfigError } from './config.js';
|
|
17
|
+
import { EdgegapClient } from './client.js';
|
|
18
|
+
import { registerTools, serverInstructions } from './tools.js';
|
|
19
|
+
import { StaticTokenProvider } from './auth.js';
|
|
20
|
+
import { extractToken, unavailableMessage } from './hosted.js';
|
|
21
|
+
const MAX_BODY_BYTES = 1_000_000;
|
|
22
|
+
function readBody(req) {
|
|
23
|
+
return new Promise((resolve, reject) => {
|
|
24
|
+
let size = 0;
|
|
25
|
+
const chunks = [];
|
|
26
|
+
req.on('data', (chunk) => {
|
|
27
|
+
size += chunk.length;
|
|
28
|
+
if (size > MAX_BODY_BYTES) {
|
|
29
|
+
reject(new Error('request body too large'));
|
|
30
|
+
req.destroy();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
chunks.push(chunk);
|
|
34
|
+
});
|
|
35
|
+
req.on('end', () => {
|
|
36
|
+
const raw = Buffer.concat(chunks).toString('utf8');
|
|
37
|
+
try {
|
|
38
|
+
resolve(raw ? JSON.parse(raw) : undefined);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
reject(new Error('request body is not valid JSON'));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
req.on('error', reject);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function sendJsonRpcError(res, status, message) {
|
|
48
|
+
res.writeHead(status, { 'Content-Type': 'application/json' });
|
|
49
|
+
res.end(JSON.stringify({ jsonrpc: '2.0', error: { code: -32000, message }, id: null }));
|
|
50
|
+
}
|
|
51
|
+
function main() {
|
|
52
|
+
let config;
|
|
53
|
+
try {
|
|
54
|
+
// No ambient credential, by design: every token comes from the request.
|
|
55
|
+
config = { ...loadConfig(), envToken: undefined };
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
if (err instanceof ConfigError) {
|
|
59
|
+
process.stderr.write(`[edgegap-mcp] ${err.message}\n`);
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
throw err;
|
|
63
|
+
}
|
|
64
|
+
const port = Number.parseInt(process.env.PORT ?? '8080', 10);
|
|
65
|
+
const host = process.env.HOST ?? '0.0.0.0';
|
|
66
|
+
const httpServer = createServer(async (req, res) => {
|
|
67
|
+
const { pathname } = new URL(req.url ?? '/', 'http://localhost');
|
|
68
|
+
// Token-free, so health checks need no credential.
|
|
69
|
+
if (pathname === '/health') {
|
|
70
|
+
res.writeHead(200, { 'Content-Type': 'text/plain' }).end('ok');
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
// startsWith, not strict equality: Streamable HTTP uses subpaths.
|
|
74
|
+
if (!pathname.startsWith('/mcp')) {
|
|
75
|
+
res.writeHead(404, { 'Content-Type': 'text/plain' }).end('Not found');
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
// Stateless: no sessions, so the GET stream and DELETE have nothing to attach to.
|
|
79
|
+
if (req.method !== 'POST') {
|
|
80
|
+
res.setHeader('Allow', 'POST');
|
|
81
|
+
sendJsonRpcError(res, 405, 'Method not allowed. This server is stateless; use POST.');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
let body;
|
|
85
|
+
try {
|
|
86
|
+
body = await readBody(req);
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
sendJsonRpcError(res, 400, err.message);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const { token, problem } = extractToken(req.headers.authorization);
|
|
93
|
+
const auth = new StaticTokenProvider(token, problem ? unavailableMessage(problem) : undefined);
|
|
94
|
+
const server = new McpServer({ name: 'edgegap', version: '0.3.0' }, { instructions: serverInstructions('hosted') });
|
|
95
|
+
registerTools(server, new EdgegapClient(config, auth), config, auth);
|
|
96
|
+
const transport = new StreamableHTTPServerTransport({
|
|
97
|
+
sessionIdGenerator: undefined,
|
|
98
|
+
enableJsonResponse: true,
|
|
99
|
+
});
|
|
100
|
+
res.on('close', () => {
|
|
101
|
+
void transport.close();
|
|
102
|
+
void server.close();
|
|
103
|
+
});
|
|
104
|
+
try {
|
|
105
|
+
await server.connect(transport);
|
|
106
|
+
await transport.handleRequest(req, res, body);
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
// Never echo the error: HTTP layers sometimes include request headers.
|
|
110
|
+
process.stderr.write(`[edgegap-mcp] request failed: ${err.name}\n`);
|
|
111
|
+
if (!res.headersSent)
|
|
112
|
+
sendJsonRpcError(res, 500, 'Internal server error');
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
httpServer.listen(port, host, () => {
|
|
116
|
+
process.stderr.write(`[edgegap-mcp] listening on http://${host}:${port}/mcp\n`);
|
|
117
|
+
});
|
|
118
|
+
const shutdown = () => httpServer.close(() => process.exit(0));
|
|
119
|
+
process.on('SIGTERM', shutdown);
|
|
120
|
+
process.on('SIGINT', shutdown);
|
|
121
|
+
}
|
|
122
|
+
main();
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ async function main() {
|
|
|
29
29
|
}
|
|
30
30
|
throw err;
|
|
31
31
|
}
|
|
32
|
-
const server = new McpServer({ name: 'edgegap', version: '0.
|
|
32
|
+
const server = new McpServer({ name: 'edgegap', version: '0.3.0' }, { instructions: serverInstructions('local') });
|
|
33
33
|
warnIfTokenInArgv();
|
|
34
34
|
const auth = new TokenProvider(config);
|
|
35
35
|
auth.attach(server.server);
|
package/dist/tools.js
CHANGED
|
@@ -493,18 +493,47 @@ export function registerTools(server, client, config, auth) {
|
|
|
493
493
|
// ---------------------------------------------------------------- 8 ----
|
|
494
494
|
server.registerTool('edgegap_list_deployments', {
|
|
495
495
|
title: 'List running deployments',
|
|
496
|
-
description: 'List active deployments, optionally filtered. Use this to find deployments left running ' +
|
|
497
|
-
'from earlier sessions before starting new ones — orphaned servers cost money.'
|
|
496
|
+
description: 'List active deployments, optionally filtered and sorted. Use this to find deployments left running ' +
|
|
497
|
+
'from earlier sessions before starting new ones — orphaned servers cost money. ' +
|
|
498
|
+
'Filter by status, application, version, tags, request_id, created_at, fleet_name or host_name, ' +
|
|
499
|
+
'e.g. [{field:"application",operator:"eq",value:"my-game"},{field:"status",operator:"eq",value:"ready"}]. ' +
|
|
500
|
+
'Operators: eq and neq on every field except created_at (eq, gte, lte); in and nin with an array value ' +
|
|
501
|
+
'on request_id, tags, application, version, fleet_name, host_name; ilike with % wildcards on fleet_name ' +
|
|
502
|
+
'and host_name. At most one filter per field. Sort by created_at or available_session_sockets.',
|
|
498
503
|
inputSchema: {
|
|
499
|
-
|
|
500
|
-
.
|
|
504
|
+
filters: z
|
|
505
|
+
.array(z.object({
|
|
506
|
+
field: z.enum([
|
|
507
|
+
'status', 'request_id', 'tags', 'created_at', 'application',
|
|
508
|
+
'version', 'fleet_name', 'host_name',
|
|
509
|
+
]),
|
|
510
|
+
operator: z.enum(['eq', 'neq', 'in', 'nin', 'gte', 'lte', 'ilike']),
|
|
511
|
+
value: z
|
|
512
|
+
.union([z.string(), z.array(z.string())])
|
|
513
|
+
.describe('A string, or an array of strings for in/nin. created_at is ISO 8601, e.g. "2026-09-30T00:00:00Z".'),
|
|
514
|
+
}))
|
|
515
|
+
.optional()
|
|
516
|
+
.describe('Omit for all deployments.'),
|
|
517
|
+
order_by: z
|
|
518
|
+
.array(z.object({
|
|
519
|
+
field: z.enum(['created_at', 'available_session_sockets']),
|
|
520
|
+
order: z.enum(['asc', 'desc']),
|
|
521
|
+
}))
|
|
501
522
|
.optional()
|
|
502
|
-
.describe('
|
|
523
|
+
.describe('e.g. [{field:"created_at",order:"asc"}] for oldest first.'),
|
|
503
524
|
limit: z.number().int().min(1).max(100).optional().describe('Default 50.'),
|
|
504
525
|
},
|
|
505
526
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
506
|
-
}, async ({
|
|
507
|
-
const
|
|
527
|
+
}, async ({ filters, order_by, limit }) => guard(auth, async () => {
|
|
528
|
+
const fields = (filters ?? []).map((f) => f.field);
|
|
529
|
+
const repeated = fields.find((f, i) => fields.indexOf(f) !== i);
|
|
530
|
+
if (repeated) {
|
|
531
|
+
return fail(`Only one filter per field is allowed, and "${repeated}" has more than one. Combine them with "in" or "nin".`);
|
|
532
|
+
}
|
|
533
|
+
const query = filters?.length || order_by?.length
|
|
534
|
+
? JSON.stringify({ filters: filters ?? [], ...(order_by?.length ? { order_by } : {}) })
|
|
535
|
+
: undefined;
|
|
536
|
+
const res = await client.listDeployments({ query, limit: limit ?? 50 });
|
|
508
537
|
const rows = (res.data ?? []).map((d) => ({
|
|
509
538
|
request_id: d.request_id,
|
|
510
539
|
ready: d.ready,
|
|
@@ -643,7 +672,8 @@ export function registerTools(server, client, config, auth) {
|
|
|
643
672
|
ports_for_create_app_version: generated.ports,
|
|
644
673
|
commands: {
|
|
645
674
|
build: `docker build --platform linux/amd64 -t ${ref} .`,
|
|
646
|
-
|
|
675
|
+
// --platform belongs on build only: the image is already linux/amd64.
|
|
676
|
+
test_locally: `docker run --rm ${portFlags} ${ref}`,
|
|
647
677
|
},
|
|
648
678
|
next_step: 'Confirm every assumption, write this to Dockerfile, build it, and run it locally to check ' +
|
|
649
679
|
'the server starts and stays up. Then push it (edgegap_get_registry_credentials) and ' +
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgegap/mcp",
|
|
3
3
|
"mcpName": "dev.edgegap/mcp",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "Check, push, and deploy game servers on Edgegap from your coding agent, with relays for P2P games. Runs locally; your API token never leaves your machine.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prebuild": "rm -rf dist",
|
|
8
|
-
"build": "tsc && chmod +x dist/index.js",
|
|
8
|
+
"build": "tsc && chmod +x dist/index.js dist/http.js",
|
|
9
9
|
"typecheck": "tsc --noEmit",
|
|
10
10
|
"typecheck:worker": "tsc -p worker/tsconfig.json --noEmit",
|
|
11
|
-
"test": "node smoke.mjs && node guards.mjs && node elicit.mjs && node newtools.mjs",
|
|
11
|
+
"test": "node test/smoke.mjs && node test/guards.mjs && node test/elicit.mjs && node test/newtools.mjs && node test/http.mjs",
|
|
12
|
+
"start:http": "node dist/http.js",
|
|
12
13
|
"worker:dev": "wrangler dev --config worker/wrangler.jsonc --local --port 8787",
|
|
13
14
|
"worker:check": "wrangler deploy --config worker/wrangler.jsonc --dry-run --outdir=.wrangler/dryrun",
|
|
14
15
|
"worker:deploy": "wrangler deploy --config worker/wrangler.jsonc",
|
|
@@ -38,7 +39,8 @@
|
|
|
38
39
|
},
|
|
39
40
|
"type": "module",
|
|
40
41
|
"bin": {
|
|
41
|
-
"edgegap-mcp": "dist/index.js"
|
|
42
|
+
"edgegap-mcp": "dist/index.js",
|
|
43
|
+
"edgegap-mcp-http": "dist/http.js"
|
|
42
44
|
},
|
|
43
45
|
"files": [
|
|
44
46
|
"dist",
|