@edgegap/mcp 0.3.0 → 0.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/README.md CHANGED
@@ -142,7 +142,7 @@ To keep your API token on your own machine, run the server locally instead. Leav
142
142
  }
143
143
  ```
144
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`.
145
+ Needs Node 18+. Pin a version in production (`@edgegap/mcp@0.3.1`) rather than floating on latest. Registered in the official MCP registry as `dev.edgegap/mcp`.
146
146
 
147
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
148
 
@@ -254,7 +254,11 @@ docker run --rm -p 8080:8080 edgegap-mcp
254
254
 
255
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
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.
257
+ Prebuilt images are published to `ghcr.io/edgegap/edgegap-mcp`, tagged `main` and `sha-<commit>` on every push to `main`, plus the version on `v*` tags:
258
+
259
+ ```bash
260
+ docker run --rm -p 8080:8080 ghcr.io/edgegap/edgegap-mcp:main
261
+ ```
258
262
 
259
263
  ## Development
260
264
 
package/dist/http.js CHANGED
@@ -91,7 +91,7 @@ function main() {
91
91
  }
92
92
  const { token, problem } = extractToken(req.headers.authorization);
93
93
  const auth = new StaticTokenProvider(token, problem ? unavailableMessage(problem) : undefined);
94
- const server = new McpServer({ name: 'edgegap', version: '0.3.0' }, { instructions: serverInstructions('hosted') });
94
+ const server = new McpServer({ name: 'edgegap', version: '0.3.1' }, { instructions: serverInstructions('hosted') });
95
95
  registerTools(server, new EdgegapClient(config, auth), config, auth);
96
96
  const transport = new StreamableHTTPServerTransport({
97
97
  sessionIdGenerator: undefined,
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.3.0' }, { instructions: serverInstructions('local') });
32
+ const server = new McpServer({ name: 'edgegap', version: '0.3.1' }, { instructions: serverInstructions('local') });
33
33
  warnIfTokenInArgv();
34
34
  const auth = new TokenProvider(config);
35
35
  auth.attach(server.server);
@@ -45,7 +45,19 @@ async function main() {
45
45
  }
46
46
  await server.connect(new StdioServerTransport());
47
47
  }
48
- main().catch((err) => {
49
- process.stderr.write(`[edgegap-mcp] fatal: ${err.message}\n`);
50
- process.exit(1);
51
- });
48
+ // `--http` runs the self-hosted Streamable HTTP server (src/http.ts) instead of
49
+ // stdio. It is a flag rather than a second `bin` entry on purpose: with two
50
+ // commands and neither named `mcp`, `npx @edgegap/mcp` cannot pick one and
51
+ // fails outright, which is what broke 0.3.0. Keep `bin` to one command.
52
+ if (process.argv.slice(2).includes('--http')) {
53
+ import('./http.js').catch((err) => {
54
+ process.stderr.write(`[edgegap-mcp] fatal: ${err.message}\n`);
55
+ process.exit(1);
56
+ });
57
+ }
58
+ else {
59
+ main().catch((err) => {
60
+ process.stderr.write(`[edgegap-mcp] fatal: ${err.message}\n`);
61
+ process.exit(1);
62
+ });
63
+ }
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@edgegap/mcp",
3
3
  "mcpName": "dev.edgegap/mcp",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
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
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 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",
11
+ "test": "node test/package.mjs && 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/index.js --http",
13
13
  "worker:dev": "wrangler dev --config worker/wrangler.jsonc --local --port 8787",
14
14
  "worker:check": "wrangler deploy --config worker/wrangler.jsonc --dry-run --outdir=.wrangler/dryrun",
15
15
  "worker:deploy": "wrangler deploy --config worker/wrangler.jsonc",
@@ -25,6 +25,14 @@
25
25
  ],
26
26
  "author": "Mathieu Duperre",
27
27
  "license": "Apache-2.0",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/edgegap/edgegap-mcp.git"
31
+ },
32
+ "homepage": "https://github.com/edgegap/edgegap-mcp#readme",
33
+ "bugs": {
34
+ "url": "https://github.com/edgegap/edgegap-mcp/issues"
35
+ },
28
36
  "dependencies": {
29
37
  "@modelcontextprotocol/sdk": "^1.30.0",
30
38
  "@modelcontextprotocol/server": "^2.0.0",
@@ -39,8 +47,7 @@
39
47
  },
40
48
  "type": "module",
41
49
  "bin": {
42
- "edgegap-mcp": "dist/index.js",
43
- "edgegap-mcp-http": "dist/http.js"
50
+ "edgegap-mcp": "dist/index.js"
44
51
  },
45
52
  "files": [
46
53
  "dist",