@cloudgrid-io/mcp 0.9.1 → 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
@@ -66,44 +66,44 @@ It speaks MCP over stdio. Point any MCP client at the `cloudgrid-mcp` command.
66
66
  | `gridctl_claim` | `POST /api/v2/entities/:id/pickup` | Claim an anonymous drop into the signed-in account (the claim token IS the drop's owner token). Direct API. |
67
67
  | `gridctl_fork` | `POST /api/v2/runtimes/:id/fork` | Start a new entity from an existing runtime (lineage recorded). Needs sign-in. |
68
68
  | `gridctl_download` | `GET /api/v2/runtimes/:id/source` | Signed 15-minute source-bundle URLs. Needs sign-in. |
69
- | `cloudgrid_login` | `GET /auth/login` | Start a CLI-free sign-in; returns a URL to open. Direct API. |
70
- | `cloudgrid_login_status` | `GET /auth/status` | Finish the sign-in; saves the token to the shared CLI credentials. |
71
- | `cloudgrid_visibility` | `PATCH /api/v2/inspirations/<id>` | Change who can see a drop (private, space, authenticated, org, link). Needs sign-in. Direct API; also in the web edition. |
69
+ | `gridctl_login` | `GET /auth/login` | Start a CLI-free sign-in; returns a URL to open. Direct API. |
70
+ | `gridctl_login_status` | `GET /auth/status` | Finish the sign-in; saves the token to the shared CLI credentials. |
71
+ | `gridctl_visibility` | `PATCH /api/v2/inspirations/<id>` | Change who can see a drop (private, space, authenticated, org, link). Needs sign-in. Direct API; also in the web edition. |
72
72
 
73
- `cloudgrid_drop`, `cloudgrid_claim`, `cloudgrid_visibility`, and the two
74
- `cloudgrid_login` tools do not wrap the CLI -- they call the API directly, so they
75
- also work in the web edition where no CLI exists. `cloudgrid_login` writes the same
73
+ `gridctl_drop`, `gridctl_claim`, `gridctl_visibility`, and the two
74
+ `gridctl_login` tools do not wrap the CLI -- they call the API directly, so they
75
+ also work in the web edition where no CLI exists. `gridctl_login` writes the same
76
76
  `~/.cloudgrid/credentials` the CLI uses, so the two share one identity.
77
77
 
78
78
  ### CLI-wrapping tools (local edition only)
79
79
 
80
80
  | Tool | Wraps | Notes |
81
81
  |---|---|---|
82
- | `cloudgrid_init` | `cloudgrid init` | Register an app or agent; optionally seed a web service. |
83
- | `cloudgrid_logs` | `cloudgrid logs` | Snapshot of recent logs. Does not stream. Read-only. |
84
- | `cloudgrid_share` | `cloudgrid visibility set` | Set visibility, default link. |
85
- | `cloudgrid_feedback` | `cloudgrid feedback list` | Read the org feedback feed. Read-only. |
86
- | `cloudgrid_whoami` | `cloudgrid whoami` | Show the signed-in user and active org. Read-only. |
87
- | `cloudgrid_use` | `cloudgrid use` | Switch the active org. |
88
- | `cloudgrid_logout` | `cloudgrid logout` | Sign out and clear local credentials. Destructive. |
89
- | `cloudgrid_status` | `cloudgrid status` | Org dashboard or entity detail. Read-only. |
90
- | `cloudgrid_info` | `cloudgrid info` | Entity metadata. Read-only. |
91
- | `cloudgrid_get` | `cloudgrid get grids\|entities\|spaces` | List grids, entities, or spaces. Read-only. |
92
- | `cloudgrid_describe_grid` | `cloudgrid describe grid <slug>` | Grid detail. Read-only. |
93
- | `cloudgrid_pickup` | `cloudgrid pickup <name>` | Download an entity's source and bind the folder. |
94
- | `cloudgrid_rename` | `cloudgrid rename` | Rename an entity's display name. |
95
- | `cloudgrid_unplug` | `cloudgrid unplug` | Take an entity off the grid. Destructive; requires confirm. |
96
- | `cloudgrid_delete` | `cloudgrid delete entity` | Archive an inspiration. Destructive; requires confirm. |
97
- | `cloudgrid_rollback` | `cloudgrid rollback` | Rollback to a previous version. |
98
- | `cloudgrid_versions` | `cloudgrid versions` | List published versions. Read-only. |
99
- | `cloudgrid_env` | `cloudgrid env` | Get, set, or list environment variables. |
100
- | `cloudgrid_secrets` | `cloudgrid secrets` | Set or list secret names. Never returns secret values. |
101
- | `cloudgrid_scaffold` | `cloudgrid scaffold` | Generate starter files. |
102
- | `cloudgrid_doctor` | `cloudgrid doctor` | Run local diagnostics. Read-only. |
103
- | `cloudgrid_open` | `cloudgrid open --print` | Return the public URL. Does not open a browser. Read-only. |
104
-
105
- `cloudgrid_share` and `cloudgrid_visibility` overlap on purpose: `cloudgrid_share`
106
- wraps the CLI and defaults to `link`; `cloudgrid_visibility` is direct API, takes an
82
+ | `gridctl_init` | `cloudgrid init` | Register an app or agent; optionally seed a web service. |
83
+ | `gridctl_logs` | `cloudgrid logs` | Snapshot of recent logs. Does not stream. Read-only. |
84
+ | `gridctl_share` | `cloudgrid visibility set` | Set visibility, default link. |
85
+ | `gridctl_feedback` | `cloudgrid feedback list` | Read the org feedback feed. Read-only. |
86
+ | `gridctl_whoami` | `cloudgrid whoami` | Show the signed-in user and active org. Read-only. |
87
+ | `gridctl_use` | `cloudgrid use` | Switch the active org. |
88
+ | `gridctl_logout` | `cloudgrid logout` | Sign out and clear local credentials. Destructive. |
89
+ | `gridctl_status` | `cloudgrid status` | Org dashboard or entity detail. Read-only. |
90
+ | `gridctl_info` | `cloudgrid info` | Entity metadata. Read-only. |
91
+ | `gridctl_get` | `cloudgrid get grids\|entities\|spaces` | List grids, entities, or spaces. Read-only. |
92
+ | `gridctl_describe_grid` | `cloudgrid describe grid <slug>` | Grid detail. Read-only. |
93
+ | `gridctl_pickup` | `cloudgrid pickup <name>` | Download an entity's source and bind the folder. |
94
+ | `gridctl_rename` | `cloudgrid rename` | Rename an entity's display name. |
95
+ | `gridctl_unplug` | `cloudgrid unplug` | Take an entity off the grid. Destructive; requires confirm. |
96
+ | `gridctl_delete` | `cloudgrid delete entity` | Archive an inspiration. Destructive; requires confirm. |
97
+ | `gridctl_rollback` | `cloudgrid rollback` | Rollback to a previous version. |
98
+ | `gridctl_versions` | `cloudgrid versions` | List published versions. Read-only. |
99
+ | `gridctl_env` | `cloudgrid env` | Get, set, or list environment variables. |
100
+ | `gridctl_secrets` | `cloudgrid secrets` | Set or list secret names. Never returns secret values. |
101
+ | `gridctl_scaffold` | `cloudgrid scaffold` | Generate starter files. |
102
+ | `gridctl_doctor` | `cloudgrid doctor` | Run local diagnostics. Read-only. |
103
+ | `gridctl_open` | `cloudgrid open --print` | Return the public URL. Does not open a browser. Read-only. |
104
+
105
+ `gridctl_share` and `gridctl_visibility` overlap on purpose: `gridctl_share`
106
+ wraps the CLI and defaults to `link`; `gridctl_visibility` is direct API, takes an
107
107
  explicit scope, and defaults its target to the session's last drop -- it is the one
108
108
  the web edition gets.
109
109
 
@@ -113,7 +113,7 @@ All tools carry MCP annotations (`readOnlyHint`, `destructiveHint`,
113
113
  ## Test
114
114
 
115
115
  A smoke test spawns the server with a real MCP client, lists the tools, and calls
116
- the read-only `cloudgrid_feedback` tool end to end:
116
+ the read-only `gridctl_feedback` tool end to end:
117
117
 
118
118
  ```
119
119
  cd mcp-server
@@ -127,5 +127,5 @@ It needs a logged-in CLI on `$PATH`.
127
127
 
128
128
  - Shells out with `execFile` and an argument array, so there is no shell and no
129
129
  injection surface.
130
- - `cloudgrid_logs` never uses `--follow`; a streaming call would never return.
130
+ - `gridctl_logs` never uses `--follow`; a streaming call would never return.
131
131
  - Stateless. Each call is one CLI invocation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudgrid-io/mcp",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "MCP server for CloudGrid. Three editions: a local stdio server (full toolset), a hosted web server (light, CLI-free toolset), and a public docs server (search_cloudgrid_documentation) over MCP Streamable HTTP.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -74,7 +74,7 @@ curl -sS -X POST https://api.cloudgrid.io/api/v2/plug \
74
74
  The response includes `url` (the live link — use it verbatim), `entity_id`,
75
75
  `owner_token` (keep both to update the drop later), and `claim_url` (sign in
76
76
  before it expires to keep it). This is what the `cloudgrid-drop` skill and the
77
- `cloudgrid_drop` MCP tool do for you. It is anonymous and serves inspirations
77
+ `gridctl_drop` MCP tool do for you. It is anonymous and serves inspirations
78
78
  only; a full app needs the signed-in `plug` flow above.
79
79
 
80
80
  ## Update your drop in place
@@ -113,7 +113,7 @@ https://github.com/cloudgrid-io/mcp/releases/latest/download/cloudgrid.mcpb
113
113
 
114
114
  The bundle carries the full local toolset (including the `cloudgrid` CLI), so deploy
115
115
  and secrets tools work without a separate install. Sign in from chat with the
116
- `cloudgrid_login` tool on first use.
116
+ `gridctl_login` tool on first use.
117
117
 
118
118
  ## For agents
119
119
 
@@ -69,5 +69,5 @@ new_expires_at, role_granted: "owner", ... }`.
69
69
  ## Notes
70
70
 
71
71
  - One pickup claims one entity. To claim several, repeat with each entity id + token.
72
- - The MCP `cloudgrid_claim` tool does this for you, and remembers the entity id +
72
+ - The MCP `gridctl_claim` tool does this for you, and remembers the entity id +
73
73
  token from the last anonymous drop so you can claim with no arguments.
@@ -78,7 +78,7 @@ A signed-in drop returns HTTP 202 with `entity_id`, `url`, `slug` + `grid` and n
78
78
  not compose it. The org is taken from the `X-CloudGrid-Org` header — there is no
79
79
  `org_slug` form field. If the user is a member of several orgs and the header is
80
80
  missing, the API replies with the list of orgs to choose from. The MCP
81
- `cloudgrid_drop` tool does this automatically when credentials are present.
81
+ `gridctl_drop` tool does this automatically when credentials are present.
82
82
 
83
83
  ## Re-plug: update the same URL in place
84
84
 
@@ -120,7 +120,7 @@ Rules that matter:
120
120
  - An anonymous edit without a valid `owner_token` returns **401**.
121
121
  - Anonymous edits count against the same daily anonymous cap as creates.
122
122
  - Only re-plug when the user is iterating on an existing artifact. If they want a
123
- separate new link, omit `target_entity_id` (the MCP `cloudgrid_drop` tool's
123
+ separate new link, omit `target_entity_id` (the MCP `gridctl_drop` tool's
124
124
  `fresh` flag does the same: it forces a new entity instead of updating).
125
125
 
126
126
  ## After the drop
@@ -81,6 +81,6 @@ made an anonymous drop earlier, this is the moment to offer to claim it.
81
81
 
82
82
  - Enterprise single sign-on is not supported in this flow yet; those users sign in
83
83
  through the Console for now.
84
- - The MCP server exposes the same flow as `cloudgrid_login` and
85
- `cloudgrid_login_status`, which handle the polling and the credentials write for
84
+ - The MCP server exposes the same flow as `gridctl_login` and
85
+ `gridctl_login_status`, which handle the polling and the credentials write for
86
86
  you.
@@ -16,7 +16,7 @@ Which one you use depends on the client. Pick your client below.
16
16
  - **Node 18+** (for `npx`).
17
17
  - **No login needed to try it** — anonymous drop works out of the box. For owned
18
18
  drops (into your org), run `cloudgrid login` once, or use the `login` skill / the
19
- `cloudgrid_login` MCP tool.
19
+ `gridctl_login` MCP tool.
20
20
 
21
21
  ---
22
22
 
@@ -45,7 +45,7 @@ npx skills add cloudgrid-io/skills
45
45
  ```
46
46
  claude mcp add cloudgrid -- npx -y @cloudgrid-io/mcp
47
47
  ```
48
- - **Find it under `/mcp`.** Exposes tools `cloudgrid_drop`, `cloudgrid_login`, …
48
+ - **Find it under `/mcp`.** Exposes tools `gridctl_drop`, `gridctl_login`, …
49
49
  - Invoke by describing the task; the model calls the tool.
50
50
 
51
51
  > Where did my install go? `/skills` (skills), `/plugin` (plugin), `/mcp` (MCP).
package/src/tools.js CHANGED
@@ -226,30 +226,30 @@ const MIN_CLI_VERSION = "0.12.0";
226
226
  // Verb map for the drift guard: each CLI-wrapping tool's top-level verb(s).
227
227
  // The drift-guard test imports this and asserts every verb exists in `cloudgrid --help`.
228
228
  export const CLI_TOOL_VERBS = {
229
- cloudgrid_init: ["init"],
230
- // cloudgrid_plug is NOT here: gridctl_plug is now a direct-API tool
229
+ gridctl_init: ["init"],
230
+ // gridctl_plug is NOT here: gridctl_plug is now a direct-API tool
231
231
  // (POST /api/v2/plug, spec v2 §3), not a CLI wrapper.
232
- cloudgrid_logs: ["logs"],
233
- cloudgrid_share: ["visibility"],
234
- cloudgrid_feedback: ["feedback"],
235
- cloudgrid_whoami: ["whoami"],
236
- cloudgrid_use: ["use"],
237
- cloudgrid_logout: ["logout"],
238
- cloudgrid_status: ["status"],
239
- cloudgrid_info: ["info"],
240
- cloudgrid_get: ["get"],
241
- cloudgrid_describe_grid: ["describe"],
242
- cloudgrid_pickup: ["pickup"],
243
- cloudgrid_rename: ["rename"],
244
- cloudgrid_unplug: ["unplug"],
245
- cloudgrid_delete: ["delete"],
246
- cloudgrid_rollback: ["rollback"],
247
- cloudgrid_versions: ["versions"],
248
- cloudgrid_env: ["env"],
249
- cloudgrid_secrets: ["secrets"],
250
- cloudgrid_scaffold: ["scaffold"],
251
- cloudgrid_doctor: ["doctor"],
252
- cloudgrid_open: ["open"],
232
+ gridctl_logs: ["logs"],
233
+ gridctl_share: ["visibility"],
234
+ gridctl_feedback: ["feedback"],
235
+ gridctl_whoami: ["whoami"],
236
+ gridctl_use: ["use"],
237
+ gridctl_logout: ["logout"],
238
+ gridctl_status: ["status"],
239
+ gridctl_info: ["info"],
240
+ gridctl_get: ["get"],
241
+ gridctl_describe_grid: ["describe"],
242
+ gridctl_pickup: ["pickup"],
243
+ gridctl_rename: ["rename"],
244
+ gridctl_unplug: ["unplug"],
245
+ gridctl_delete: ["delete"],
246
+ gridctl_rollback: ["rollback"],
247
+ gridctl_versions: ["versions"],
248
+ gridctl_env: ["env"],
249
+ gridctl_secrets: ["secrets"],
250
+ gridctl_scaffold: ["scaffold"],
251
+ gridctl_doctor: ["doctor"],
252
+ gridctl_open: ["open"],
253
253
  };
254
254
 
255
255
  // Simple semver comparison: true when `version` >= MIN_CLI_VERSION.
@@ -2356,34 +2356,19 @@ export async function runSource(ctx, { entity_id, url, grid, slug } = {}) {
2356
2356
  // Registers the tools onto `server`. ctx.edition decides whether the CLI-wrapping
2357
2357
  // tools are included (they need a local machine).
2358
2358
  export function registerTools(server, ctx) {
2359
- // ── Tool naming: gridctl_* with deprecated cloudgrid_* aliases ────────────
2360
- // Every tool is registered under its new `gridctl_*` name AND its legacy
2361
- // `cloudgrid_*` alias (same handler), so nothing breaks mid-migration. The
2362
- // alias is marked deprecated in its description; both names resolve to the
2363
- // same handler. Aliases are removed in a later major. `reg` wraps the
2359
+ // ── Tool naming: gridctl_* only ───────────────────────────────────────────
2360
+ // Every tool is registered under its `gridctl_*` name only. The legacy
2361
+ // deprecated `cloudgrid_*` aliases were removed in 0.10.0 — they doubled the
2362
+ // connector tool list and de-duplicated poorly in permission UIs. Clients
2363
+ // enumerate tools dynamically, so discovery is unaffected. `reg` wraps the
2364
2364
  // object-config `server.registerTool`; `regTool` wraps the positional
2365
- // `server.tool` shorthand. Both take the new gridctl_* name and derive the
2366
- // alias by swapping the prefix.
2367
- const aliasOf = (name) => name.replace(/^gridctl_/, "cloudgrid_");
2368
-
2365
+ // `server.tool` shorthand.
2369
2366
  const reg = (name, config, handler) => {
2370
2367
  server.registerTool(name, config, handler);
2371
- const alias = aliasOf(name);
2372
- if (alias !== name) {
2373
- server.registerTool(
2374
- alias,
2375
- { ...config, description: `(deprecated: use ${name}) ${config.description}` },
2376
- handler,
2377
- );
2378
- }
2379
2368
  };
2380
2369
 
2381
2370
  const regTool = (name, description, schema, annotations, handler) => {
2382
2371
  server.tool(name, description, schema, annotations, handler);
2383
- const alias = aliasOf(name);
2384
- if (alias !== name) {
2385
- server.tool(alias, `(deprecated: use ${name}) ${description}`, schema, annotations, handler);
2386
- }
2387
2372
  };
2388
2373
 
2389
2374
  // ── Widget resources (web edition, ChatGPT Apps SDK) ──────────────────────
@@ -124,7 +124,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;b
124
124
  var statusEl = document.getElementById("vis-status");
125
125
  if (statusEl) statusEl.textContent = "Updating\u2026";
126
126
  if (!window.openai || !window.openai.callTool) return;
127
- window.openai.callTool("cloudgrid_visibility", { visibility: vis }).then(function (res) {
127
+ window.openai.callTool("gridctl_visibility", { visibility: vis }).then(function (res) {
128
128
  var newVis = res && res.structuredContent && res.structuredContent.visibility;
129
129
  if (newVis) {
130
130
  data.current_visibility = newVis;
@@ -75,7 +75,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;b
75
75
  if (input.fresh !== undefined) args.fresh = input.fresh;
76
76
  args.grid = slug;
77
77
  args.org = slug; // alias kept for compatibility
78
- window.openai.callTool("cloudgrid_drop", args).then(function () {
78
+ window.openai.callTool("gridctl_drop", args).then(function () {
79
79
  // The host will render the new result with the live-result card.
80
80
  }).catch(function () {
81
81
  for (var m = 0; m < all.length; m++) all[m].classList.remove("loading");