@cutoutlabs/mcp 0.2.2 → 0.2.3

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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/index.js +8 -4
  3. package/package.json +4 -1
package/README.md CHANGED
@@ -24,11 +24,11 @@ No local install? Use the hosted server instead: `https://api.cutoutlabs.com/mcp
24
24
  ## Tools
25
25
 
26
26
  - `remove_background`: `input_path` or `image_url`, plus optional `output_path`, `size` (`preview`, `medium`, `hd`, `full`), `format` (`png`, `webp`, `jpg`), `bg_color`, `crop`, `roi` (keep only the subject inside `x1 y1 x2 y2`), `clean_edges` (remove coloured fringes), `overwrite`. Saves the result and returns its path.
27
- - `get_quota`: free calls left today. The quota resets at 00:00 UTC.
27
+ - `get_quota`: free calls left this month. The quota resets on the 1st of each month at 00:00 UTC.
28
28
 
29
29
  ## Limits
30
30
 
31
- Inputs up to 12 MB. Free daily quota per key during launch.
31
+ Inputs up to 12 MB. 150 free images per calendar month per key during launch, and 10 requests per minute.
32
32
 
33
33
  ## License
34
34
 
package/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { access, readFile, stat, writeFile } from "node:fs/promises";
3
+ import { createRequire } from "node:module";
3
4
  import path from "node:path";
4
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -38,10 +39,12 @@ async function exists(file) {
38
39
  );
39
40
  }
40
41
 
42
+ const { version } = createRequire(import.meta.url)("./package.json");
43
+
41
44
  const server = new McpServer({
42
45
  name: "cutoutlabs",
43
46
  title: "Cutout Labs",
44
- version: "0.2.1",
47
+ version,
45
48
  });
46
49
 
47
50
  server.registerTool(
@@ -168,7 +171,7 @@ server.registerTool(
168
171
  const height = response.headers.get("x-height");
169
172
  const remaining = response.headers.get("x-quota-remaining");
170
173
  return text(
171
- `Saved ${target}${width && height ? ` (${width}×${height})` : ""}. ${remaining ?? "?"} free calls left today.`,
174
+ `Saved ${target}${width && height ? ` (${width}×${height})` : ""}. ${remaining ?? "?"} free calls left this month.`,
172
175
  );
173
176
  },
174
177
  );
@@ -177,7 +180,8 @@ server.registerTool(
177
180
  "get_quota",
178
181
  {
179
182
  title: "Check remaining free calls",
180
- description: "Return how many free remove_background calls remain today.",
183
+ description:
184
+ "Return how many free remove_background calls remain this month for the API key. The quota resets on the 1st of each month at 00:00 UTC.",
181
185
  annotations: { readOnlyHint: true },
182
186
  },
183
187
  async () => {
@@ -189,7 +193,7 @@ server.registerTool(
189
193
  if (!response.ok) return failure(await errorMessage(response));
190
194
  const body = await response.json();
191
195
  return text(
192
- `${body.data.attributes.api.free_calls} free calls left today. Resets at 00:00 UTC.`,
196
+ `${body.data.attributes.api.free_calls} free calls left this month. Resets on the 1st at 00:00 UTC.`,
193
197
  );
194
198
  },
195
199
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cutoutlabs/mcp",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "MCP server for Cutout Labs: remove image backgrounds from local files or URLs and save transparent PNGs.",
5
5
  "mcpName": "com.cutoutlabs/mcp",
6
6
  "type": "module",
@@ -14,6 +14,9 @@
14
14
  "engines": {
15
15
  "node": ">=20"
16
16
  },
17
+ "scripts": {
18
+ "test": "node scripts/smoke-test.mjs"
19
+ },
17
20
  "keywords": [
18
21
  "mcp",
19
22
  "model-context-protocol",