@edgegap/mcp 0.13.3 β†’ 0.14.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/README.md CHANGED
@@ -213,7 +213,7 @@ To keep your API token on your own machine, run the server locally instead. Leav
213
213
  }
214
214
  ```
215
215
 
216
- Needs Node 18+. Pin a version in production (`@edgegap/mcp@0.13.3`) rather than floating on latest. Registered in the official MCP registry as `dev.edgegap/mcp`.
216
+ Needs Node 18+. Pin a version in production (`@edgegap/mcp@0.14.1`) rather than floating on latest. Registered in the official MCP registry as `dev.edgegap/mcp`.
217
217
 
218
218
  The local server can also limit what an agent can do. These variables have no effect on the hosted endpoint at `mcp.edgegap.dev`:
219
219
 
@@ -222,11 +222,23 @@ The local server can also limit what an agent can do. These variables have no ef
222
222
  | `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. |
223
223
  | `EDGEGAP_READ_ONLY` | `0` | Set to `1` and the tools that change something (marked ● in [Tools](#-tools)) are never registered, so the agent cannot be talked into calling them. |
224
224
  | `EDGEGAP_APP_ALLOWLIST` | *(empty)* | Comma-separated application names. Limits what the agent can create and deploy into. Reading (listing apps and versions) is not limited, and neither is touching deployments once running. See [DESIGN.md](DESIGN.md#scope-of-the-allowlist). |
225
- | `EDGEGAP_MAX_DURATION_MINUTES` | `60` | Ceiling on `max_duration` the agent may set on a version. |
225
+ | `EDGEGAP_MAX_DURATION_MINUTES` | `60` | Ceiling on `max_duration` the agent may set on a version. `edgegap_deploy` also refuses a version whose `max_duration` is above it, or unlimited, unless the agent passes `allow_long_running: true` after asking you. |
226
226
  | `EDGEGAP_MAX_AGENT_DEPLOYMENTS` | `5` | `edgegap_deploy` refuses while this many deployments tagged `edgegap-mcp` are running. `0` turns the cap off. |
227
+ | `EDGEGAP_MAX_DEPLOYS_PER_RUN` | `20` | Deploys one server process may send, failed ones included. Restart the server to reset it. `0` turns it off. |
228
+ | `EDGEGAP_STOP_OWN_ONLY` | `0` | Set to `1` and `edgegap_stop_deployment` only stops deployments tagged `edgegap-mcp`, so an agent cannot stop servers it did not start. |
229
+ | `EDGEGAP_ENABLE_SKILLS_UPDATE` | `0` | Set to `1` to let `edgegap_update_skills` run `npx skills@1.7.4 update` or `claude plugin update` with `apply: true`. Without it, it lists those commands for you to run. Hand-copied skills are rewritten from the bundle either way. The updaters get only path, home, temp, locale, proxy and npm settings, never `EDGEGAP_*` variables or anything named like a token, secret, password or key. |
227
230
  | `EDGEGAP_TIMEOUT_MS` | `30000` | Per-request HTTP timeout. |
228
231
  | `EDGEGAP_SKILLS_CHECK` | `on` | Set to `off` and the skill tools never read the latest skills version from GitHub. |
229
232
 
233
+ #### Windows
234
+
235
+ The local server runs on Windows with Node.js 18 or newer, and CI runs the build and the stdio tests on Windows.
236
+
237
+ - Many Windows MCP clients cannot start `npx` directly, because it is a `.cmd` script. Start it through `cmd /c`: `"command": "cmd", "args": ["/c", "npx", "-y", "@edgegap/mcp"]`. In Claude Code: `claude mcp add Edgegap --env EDGEGAP_API_TOKEN=<token> -- cmd /c npx -y @edgegap/mcp`.
238
+ - In PowerShell, type `npx.cmd` instead of `npx` to run it by hand: a new Windows install blocks the `npx` PowerShell script ("running scripts is disabled on this system").
239
+ - The first start downloads the package and can take a while; later starts are fast.
240
+ - `edgegap_update_skills` finds skills installed in `%USERPROFILE%`, the same way as on macOS and Linux.
241
+
230
242
  ## πŸ“š Skills
231
243
 
232
244
  The server includes the [Edgegap agent skills](https://github.com/edgegap/llm-agent-skills): tested, step-by-step workflows for getting a multiplayer game online, with templates (Dockerfiles, matchmaker configs, Unity C# and Unreal C++ drop-ins) and known pitfalls. Any agent connected to Edgegap MCP gets them, with no separate install and no token needed, and is told to load the matching skill before working on a game project.
@@ -294,16 +306,32 @@ Your agent picks the right tool from your request. You don't need to name them,
294
306
  | `edgegap_list_app_versions` | Lists versions with their image, resources, ports (with TLS Upgrade), and whether a registry login is set. |
295
307
  | `edgegap_get_app_version` | Reads one version in full: image, resources, ports, max duration, image caching, restart policy, and env var names (never values). |
296
308
  | `edgegap_create_app_version` ● | Registers a container image as a deployable version. Supports TLS Upgrade on WS and HTTP ports, which browser (WebGL) clients need for `wss://`. |
297
- | `edgegap_update_app_version` ● | Changes an existing version: a new image tag, on/off, max duration, registry login, image caching (`force_cache`), shutdown grace period, ports, env vars. Only the fields passed change, but `ports` and `env` replace the whole list. Running deployments keep the old settings. |
309
+ | `edgegap_update_app_version` ● | Changes an existing version: a new image tag, on/off, CPU and memory (both together), max duration, registry login, image caching (`force_cache`), shutdown grace period, ports, env vars, and the Endpoint Storage its logs go to. Only the fields passed change, but `ports` and `env` replace the whole list. Running deployments keep the old settings. |
310
+ | `edgegap_delete_app_version` ● | Deletes one version, to clean up test versions. Refused while a deployment of it runs. The registry image is kept. |
311
+ | `edgegap_delete_app` ● | Deletes an application and its versions. Refused while any of its deployments runs, and while it has more versions than `max_versions` (default 0). |
298
312
  | `edgegap_list_locations` | Lists the cities Edgegap deploys to, or, for one version, only those with capacity right now. |
299
313
  | `edgegap_list_ping_beacons` | Lists the ping beacons game clients measure their latency to each region against. |
300
- | `edgegap_deploy` ● | Deploys an authoritative dedicated server close to your players. Always tagged `edgegap-mcp`, and reports when Edgegap will stop it. |
314
+ | `edgegap_deploy` ● | Deploys an authoritative dedicated server close to your players. Always tagged `edgegap-mcp`, and reports when Edgegap will stop it. Optional: CPU and memory for this deployment only, webhooks Edgegap calls when the server is ready, fails or ends, `require_cached_locations` for faster starts, and `private_host_ids` to place it on your private fleet first. |
315
+ | `edgegap_list_fleet_hosts` | Lists the hosts of one of your private fleets, with status and location, to deploy onto them. |
301
316
  | `edgegap_wait_for_deployment` | Waits until the server is ready and returns the connection address. |
302
317
  | `edgegap_get_deployment` | Reads a deployment's status. |
303
318
  | `edgegap_list_deployments` | Lists running deployments, filtered by application, version, status, tags and more, and sorted by age. Finds servers left running; `only_agent_deployments: true` lists every one an agent started. See [Filter Deployments](https://docs.edgegap.com/learn/orchestration/deployments#filter-deployments). |
304
319
  | `edgegap_get_deployment_logs` | Reads container logs and crash details while the deployment runs. After it stops, logs are only kept if Endpoint Storage was set up. |
305
320
  | `edgegap_get_deployment_metrics` | Summarises CPU, CPU throttling, memory and network use (latest, average, peak), to size a version or check a crash. |
306
321
  | `edgegap_stop_deployment` ● | Stops one deployment, by its exact request ID. No bulk stop. |
322
+ | `edgegap_tag_deployment` ● | Adds or removes tags on a running deployment, e.g. to mark a match. The `edgegap-mcp` tag stays. |
323
+ | `edgegap_report_deployment` ● | Reports a deployment to Edgegap with a reason, for a studio's moderation backend. It keeps running. |
324
+
325
+ ### Logs and Files (Endpoint Storage)
326
+
327
+ Container logs disappear with the deployment unless they are exported to your own S3-compatible bucket.
328
+
329
+ | Tool | What it does |
330
+ | --- | --- |
331
+ | `edgegap_list_endpoint_storage` | Lists your Endpoint Storage buckets and their pull profiles. Secret keys are never returned. |
332
+ | `edgegap_create_endpoint_storage` ● | Registers a bucket (AWS S3, Cloudflare R2, DigitalOcean Spaces…) for log export. Set `endpoint_storage` on a version to turn export on. The secret key is never echoed back. |
333
+ | `edgegap_create_pull_profile` ● | Copies a file or folder from the bucket into the container at boot (maps, configs, large assets). |
334
+ | `edgegap_link_pull_profile` ● | Links a pull profile to a version, or unlinks it. |
307
335
 
308
336
  ### Relays (Host-Client Games Only)
309
337
 
@@ -338,12 +366,15 @@ Your API token can do anything in your organization, so the server adds its own
338
366
  | Dry run | Every tool that changes something takes `dry_run: true`: it returns the exact method, host, path and body, with the token, registry tokens and env values masked, and sends nothing. Local checks still run. |
339
367
  | No token in containers | A deploy or version is refused, with nothing sent, if your API token appears in an env var name or value, a tag, or a webhook URL. Env values are never echoed back. |
340
368
  | Agent tag | Every deployment gets the `edgegap-mcp` tag, even when the agent passes its own tags. `edgegap_list_deployments` with `only_agent_deployments: true` finds them all. |
341
- | Auto-stop | Every deploy reports when Edgegap will stop it: the version's `max_duration`, capped at `EDGEGAP_MAX_DURATION_MINUTES` (default 60) for versions the agent creates. Edgegap has no per-deployment time limit, so a version made elsewhere can run up to its own limit (1440 minutes by default); the result warns when it is over an hour or unlimited. |
369
+ | Auto-stop | Every deploy reports when Edgegap will stop it: the version's `max_duration`, capped at `EDGEGAP_MAX_DURATION_MINUTES` (default 60) for versions the agent creates. Edgegap has no per-deployment time limit, so deploying a version whose `max_duration` is above that ceiling or unlimited (a version made elsewhere defaults to 1440 minutes) is refused unless the agent passes `allow_long_running: true`, which it is told to do only after asking you. |
370
+ | Deploys per run | The local server sends at most `EDGEGAP_MAX_DEPLOYS_PER_RUN` (default 20) deploys per process, failed ones included, since a refused deploy can still create a deployment. When the API refuses a deploy but created one anyway, the error names it so the agent can stop it. |
342
371
  | No moving image tags | `edgegap_create_app_version` refuses `latest` (any case), an empty tag, or a tag Docker would reject, with nothing sent: Edgegap caches images by tag, so a re-pushed tag can deploy a stale build. Deploying an existing version on `latest` is refused too, and so is asking for registry push commands for `latest`. |
343
372
  | Image reference check | A `docker_image` that also holds a registry host, tag or digest (e.g. `registry.edgegap.com/proj/server:v2`) is refused, and the error gives the right `docker_repository` / `docker_image` / `docker_tag` split. `edgegap_validate_server_config` flags the same things. |
344
373
  | Deployment cap | `edgegap_deploy` is refused while `EDGEGAP_MAX_AGENT_DEPLOYMENTS` (default 5) deployments tagged `edgegap-mcp` are already running, so a looping agent cannot pile up billing servers. The refusal says how to list and stop them. |
345
374
  | Hidden secret env vars | Env vars whose names look like secrets (`TOKEN`, `SECRET`, `PASSWORD`, `API_KEY`, `CREDENTIAL`, `AUTH`…) are sent with `is_hidden`, so the dashboard does not show their values in plain text. |
346
- | Strict stop | `edgegap_stop_deployment` stops one deployment by its exact request ID. Empty IDs, wildcards and lists are refused. There is no bulk stop. |
375
+ | Strict stop | `edgegap_stop_deployment` stops one deployment by its exact request ID. Empty IDs, wildcards and lists are refused. There is no bulk stop. With `EDGEGAP_STOP_OWN_ONLY=1`, it only stops deployments tagged `edgegap-mcp`. |
376
+ | Careful deletes | `edgegap_delete_app_version` and `edgegap_delete_app` take one exact name, and are refused while a deployment of it is running. An application with versions is only deleted when `max_versions` covers them. |
377
+ | Webhook and bucket URLs | Deploy webhooks and Endpoint Storage endpoints must be `https` URLs without credentials, and are refused if they contain your API token. |
347
378
  | Host on every result | Every result starts with the API host, e.g. `[api.edgegap.com]`, or `[custom Β· host]` when `EDGEGAP_BASE_URL` points elsewhere. A base URL naming `api.edgegap.com` must be exactly `https://api.edgegap.com`, or the server refuses to start. |
348
379
  | Redaction | The token is stripped from every error before it reaches the agent. |
349
380
 
@@ -406,7 +437,7 @@ docker build -t edgegap-mcp .
406
437
  docker run --rm -p 8080:8080 edgegap-mcp
407
438
  ```
408
439
 
409
- 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`, `EDGEGAP_MAX_DURATION_MINUTES` and `EDGEGAP_MAX_AGENT_DEPLOYMENTS` apply. Read [worker/DECISION.md](worker/DECISION.md) before exposing it beyond a private network.
440
+ 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`, `EDGEGAP_MAX_DURATION_MINUTES`, `EDGEGAP_MAX_AGENT_DEPLOYMENTS` and `EDGEGAP_STOP_OWN_ONLY` apply; pass each with `-e NAME=value`. Never pass an API token to the container: each client sends its own on every request. Read [worker/DECISION.md](worker/DECISION.md) before exposing it beyond a private network.
410
441
 
411
442
  Prebuilt images for `linux/amd64` and `linux/arm64` are published to `ghcr.io/edgegap/llm-mcp-server` (and, for existing setups, the old name `ghcr.io/edgegap/edgegap-mcp`), tagged `main` and `sha-<commit>` on every push to `main`, plus the version on `v*` tags:
412
443
 
package/dist/client.js CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { redact } from './config.js';
9
9
  import { VERSION } from './version.js';
10
- const SECRET_KEYS = /^(private_token|registry_token|token|password|secret|api_key)$/i;
10
+ const SECRET_KEYS = /^(private_token|registry_token|token|password|secret|api_key|secret_access_key)$/i;
11
11
  /**
12
12
  * Deep copy of a request body with secrets masked: registry tokens and the
13
13
  * like by key name, every environment variable value (we never echo those),
@@ -169,11 +169,60 @@ export class EdgegapClient {
169
169
  createAppVersion(appName, body) {
170
170
  return this.request('POST', 'v1', `/v1/app/${encodeURIComponent(appName)}/version`, { body });
171
171
  }
172
+ /** Deletes one version. The API refuses nothing here, so callers check first. */
173
+ deleteAppVersion(appName, versionName) {
174
+ return this.request('DELETE', 'v1', `/v1/app/${encodeURIComponent(appName)}/version/${encodeURIComponent(versionName)}`);
175
+ }
176
+ /** Deletes an application and every version under it. */
177
+ deleteApp(appName) {
178
+ return this.request('DELETE', 'v1', `/v1/app/${encodeURIComponent(appName)}`);
179
+ }
172
180
  // --- Deployments --------------------------------------------------------
173
181
  /** v2 deploy. Returns only a request_id; the deployment is still starting. */
174
182
  deploy(body) {
175
183
  return this.request('POST', 'v2', '/deployments', { body });
176
184
  }
185
+ /** v2 deploy onto a private fleet: the same body plus private_host_ids. */
186
+ deployToFleet(body) {
187
+ return this.request('POST', 'v2', '/private-fleets/deployments', { body });
188
+ }
189
+ listFleetHosts(fleetName) {
190
+ return this.request('GET', 'v2', `/private-fleets/${encodeURIComponent(fleetName)}/hosts`);
191
+ }
192
+ listDeploymentTags(requestId) {
193
+ return this.request('GET', 'v1', `/v1/deployments/${encodeURIComponent(requestId)}/tags`, { query: { limit: 100 } });
194
+ }
195
+ addDeploymentTag(requestId, name) {
196
+ return this.request('POST', 'v1', `/v1/deployments/${encodeURIComponent(requestId)}/tags`, {
197
+ body: { name },
198
+ });
199
+ }
200
+ removeDeploymentTag(requestId, name) {
201
+ return this.request('DELETE', 'v1', `/v1/deployments/${encodeURIComponent(requestId)}/tags/${encodeURIComponent(name)}`);
202
+ }
203
+ reportDeployment(requestId, body) {
204
+ return this.request('POST', 'v1', `/v1/deployments/${encodeURIComponent(requestId)}:report`, { body });
205
+ }
206
+ // --- Endpoint storage (S3 log export and pull profiles, v1) -------------
207
+ listEndpointStorage() {
208
+ return this.request('GET', 'v1', '/v1/storage/endpoints', {
209
+ query: { limit: 100 },
210
+ });
211
+ }
212
+ createEndpointStorage(body) {
213
+ return this.request('POST', 'v1', '/v1/storage/endpoint', { body });
214
+ }
215
+ listPullProfiles(endpointName) {
216
+ return this.request('GET', 'v1', `/v1/storage/endpoint/${encodeURIComponent(endpointName)}/pull-profiles`, { query: { limit: 100 } });
217
+ }
218
+ createPullProfile(endpointName, body) {
219
+ return this.request('POST', 'v1', `/v1/storage/endpoint/${encodeURIComponent(endpointName)}/pull-profile`, { body });
220
+ }
221
+ /** PUT links, DELETE unlinks; the path is the same. */
222
+ linkPullProfile(method, endpointName, profileName, appName, versionName) {
223
+ return this.request(method, 'v1', `/v1/storage/endpoint/${encodeURIComponent(endpointName)}/pull-profile/${encodeURIComponent(profileName)}` +
224
+ `/app/${encodeURIComponent(appName)}/version/${encodeURIComponent(versionName)}`);
225
+ }
177
226
  getDeployment(requestId) {
178
227
  return this.request('GET', 'v1', `/v1/status/${encodeURIComponent(requestId)}`);
179
228
  }
package/dist/config.js CHANGED
@@ -76,6 +76,9 @@ export function loadConfig(env = process.env) {
76
76
  appAllowlist: parseList(env.EDGEGAP_APP_ALLOWLIST),
77
77
  maxDurationCeiling: parseIntEnv(env.EDGEGAP_MAX_DURATION_MINUTES, 60),
78
78
  maxAgentDeployments: parseIntEnv(env.EDGEGAP_MAX_AGENT_DEPLOYMENTS, 5),
79
+ maxDeploysPerRun: parseIntEnv(env.EDGEGAP_MAX_DEPLOYS_PER_RUN, 20),
80
+ stopOwnOnly: env.EDGEGAP_STOP_OWN_ONLY === '1' || env.EDGEGAP_STOP_OWN_ONLY === 'true',
81
+ enableSkillsUpdate: env.EDGEGAP_ENABLE_SKILLS_UPDATE === '1' || env.EDGEGAP_ENABLE_SKILLS_UPDATE === 'true',
79
82
  requestTimeoutMs: parseIntEnv(env.EDGEGAP_TIMEOUT_MS, 30_000),
80
83
  };
81
84
  }
@@ -115,7 +115,8 @@ export function buildMatchmakerConfig(input) {
115
115
  ticket_removal_period: removal,
116
116
  group_inactivity_removal_period: '5m',
117
117
  application: { name: input.application, version: input.version },
118
- rules: { initial: rules, expansions },
118
+ // The key is optional; an empty object only reads as a slot to fill in.
119
+ rules: { initial: rules, ...(Object.keys(expansions).length ? { expansions } : {}) },
119
120
  },
120
121
  },
121
122
  };