@edgegap/mcp 0.7.2 → 0.10.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 CHANGED
@@ -141,6 +141,10 @@ Install remote Edgegap MCP server in your agent's virtualized environment (never
141
141
  }
142
142
  ```
143
143
 
144
+ ### One-Click Install (Claude Desktop)
145
+
146
+ Download [edgegap-mcp.mcpb](https://github.com/edgegap/llm-mcp-server/releases/latest/download/edgegap-mcp.mcpb) and open it: Claude Desktop installs the local server as an extension and asks for your API token, which it keeps in the operating system's secure storage. The extension's settings also hold read-only mode, the application allowlist, the max duration ceiling and the deployment cap (the variables below). Each [release](https://github.com/edgegap/llm-mcp-server/releases) attaches the bundle, built from that release's code. Any other app that installs MCPB bundles works the same way.
147
+
144
148
  ### Local Server
145
149
 
146
150
  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:
@@ -157,7 +161,7 @@ To keep your API token on your own machine, run the server locally instead. Leav
157
161
  }
158
162
  ```
159
163
 
160
- Needs Node 18+. Pin a version in production (`@edgegap/mcp@0.7.2`) rather than floating on latest. Registered in the official MCP registry as `dev.edgegap/mcp`.
164
+ Needs Node 18+. Pin a version in production (`@edgegap/mcp@0.10.0`) rather than floating on latest. Registered in the official MCP registry as `dev.edgegap/mcp`.
161
165
 
162
166
  The local server can also limit what an agent can do. These variables have no effect on the hosted endpoint at `mcp.edgegap.dev`:
163
167
 
@@ -169,6 +173,7 @@ The local server can also limit what an agent can do. These variables have no ef
169
173
  | `EDGEGAP_MAX_DURATION_MINUTES` | `60` | Ceiling on `max_duration` the agent may set on a version. |
170
174
  | `EDGEGAP_MAX_AGENT_DEPLOYMENTS` | `5` | `edgegap_deploy` refuses while this many deployments tagged `edgegap-mcp` are running. `0` turns the cap off. |
171
175
  | `EDGEGAP_TIMEOUT_MS` | `30000` | Per-request HTTP timeout. |
176
+ | `EDGEGAP_SKILLS_CHECK` | `on` | Set to `off` and the skill tools never read the latest skills version from GitHub. |
172
177
 
173
178
  ## 📚 Skills
174
179
 
@@ -198,7 +203,9 @@ They're served three ways, so every MCP client can reach them:
198
203
  - **Prompts:** one per skill, named after it. In Claude Code they show up as slash commands, e.g. `/mcp__edgegap__edgegap-unity`.
199
204
  - **Resources:** one per file, at `edgegap-skill://<skill>/<path>`, e.g. `edgegap-skill://edgegap-unity/references/deploy.md`.
200
205
 
201
- Each release bundles the skills at the commit pinned in `scripts/skills-pin.txt`; `edgegap_context` reports which pack is loaded. If you also installed the skills locally (the Claude Code plugin or `npx skills add`), they're the same pack.
206
+ Each release bundles the skills at the commit pinned in `scripts/skills-pin.txt`; `edgegap_context` reports which pack is loaded. `edgegap_list_skills` also reads the latest pack version from GitHub (one version number, cached for an hour; `EDGEGAP_SKILLS_CHECK=off` turns it off) and says when a newer one is out, and `edgegap_get_skill` adds the same note under a skill's header.
207
+
208
+ **Keeping installed skills current.** If you also installed the skills in your agent (the Claude Code plugin `edgegap@edgegap`, `npx skills add edgegap/llm-agent-skills`, or folders copied into `~/.claude/skills`), `edgegap_update_skills` compares each one with the latest on GitHub. On the local server it finds those installs itself; with `apply: true` it runs `npx skills update` (Edgegap skills only) or `claude plugin update`, and rewrites hand-copied skills from the files bundled in this release, keeping files you added and leaving symlinks and git checkouts alone. It never downloads skill text. The hosted server cannot see your disk: pass the versions you have loaded in `installed_versions` and it says which are behind and how to update them.
202
209
 
203
210
  ## 🧰 Tools
204
211
 
package/dist/config.js CHANGED
@@ -57,6 +57,9 @@ function parseIntEnv(raw, fallback) {
57
57
  return Number.isFinite(n) ? n : fallback;
58
58
  }
59
59
  export function loadConfig(env = process.env) {
60
+ // The one-click install (manifest.json) fills these from its settings; a
61
+ // value left as an unexpanded "${user_config.x}" placeholder means not set.
62
+ env = Object.fromEntries(Object.entries(env).filter(([, v]) => !/^\$\{user_config\.[a-z_]+\}$/.test(v ?? '')));
60
63
  // A token in the environment is optional. When it is absent the server asks
61
64
  // the developer for one at first use, which removes the "configure before
62
65
  // anything works" step that loses people during onboarding.
package/dist/index.js CHANGED
@@ -17,6 +17,8 @@ import { EdgegapClient } from './client.js';
17
17
  import { registerTools, serverInstructions } from './tools.js';
18
18
  import { VERSION } from './version.js';
19
19
  import { TokenProvider, warnIfTokenInArgv } from './auth.js';
20
+ import { skillsCheckFromEnv } from './skillsversion.js';
21
+ import { defaultSkillsEnv, findSkillsInstalls, replaceFromBundle, updateCommands } from './skillsinstall.js';
20
22
  async function main() {
21
23
  let config;
22
24
  try {
@@ -38,7 +40,11 @@ async function main() {
38
40
  const client = new EdgegapClient(config, auth, {
39
41
  clientName: () => server.server.getClientVersion()?.name,
40
42
  });
41
- registerTools(server, client, config, auth);
43
+ registerTools(server, client, config, auth, {
44
+ skillsCheck: skillsCheckFromEnv(process.env),
45
+ // Only this local server looks at the developer's installed skills.
46
+ localSkills: { env: defaultSkillsEnv(), findSkillsInstalls, updateCommands, replaceFromBundle },
47
+ });
42
48
  if (!config.envToken) {
43
49
  process.stderr.write('[edgegap-mcp] no token configured: you will be asked for one at first ' +
44
50
  'use. It stays in memory on this machine and is never written to disk ' +
@@ -28,13 +28,15 @@ export function buildMatchmakerConfig(input) {
28
28
  if (!/^[a-z0-9][a-z0-9-_]*$/i.test(input.profile_name)) {
29
29
  problems.push(`profile_name "${input.profile_name}" should be letters, digits, "-" or "_". Game clients send it on every ticket.`);
30
30
  }
31
- const expiration = input.ticket_expiration ?? '5m';
31
+ // 30s by default: a lone or partial ticket may only be matched when it nears
32
+ // expiry, so with minutes a developer testing alone gives up before a server comes.
33
+ const expiration = input.ticket_expiration ?? '30s';
32
34
  const removal = input.ticket_removal ?? '1m';
33
35
  for (const [field, value] of [['ticket_expiration', expiration], ['ticket_removal', removal]]) {
34
36
  if (!DURATION.test(value))
35
37
  problems.push(`${field} "${value}" is not a duration like "30s", "5m" or "1h".`);
36
38
  }
37
- if (seconds(expiration) < 60) {
39
+ if (seconds(expiration) < 20) {
38
40
  cautions.push(`ticket_expiration ${expiration} is short. Tickets must outlive the queue wait plus server start-up, or players are dropped before the match is ready.`);
39
41
  }
40
42
  const rules = {
@@ -75,6 +77,9 @@ export function buildMatchmakerConfig(input) {
75
77
  }
76
78
  if (Object.keys(step).length === 0)
77
79
  continue;
80
+ if (e.after_seconds >= seconds(expiration)) {
81
+ cautions.push(`expansion at ${e.after_seconds}s never applies: tickets expire after ${expiration}. Use an after_seconds below it (e.g. 15 or 20).`);
82
+ }
78
83
  if (e.after_seconds === lastAfter)
79
84
  problems.push(`two expansions share after_seconds ${e.after_seconds}.`);
80
85
  lastAfter = e.after_seconds;