@clipy/mcp 0.5.1 → 0.5.2
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/dist/index.js +11 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,14 +26,20 @@ import { Readable } from "node:stream";
|
|
|
26
26
|
import { pipeline } from "node:stream/promises";
|
|
27
27
|
const API_URL = (process.env.CLIPY_API_URL || "https://clipy.online").replace(/\/+$/, "");
|
|
28
28
|
const API_KEY = process.env.CLIPY_API_KEY;
|
|
29
|
+
// The key is checked lazily (per tool call, not at startup) so the server can
|
|
30
|
+
// start and answer introspection (initialize / tools/list) in keyless
|
|
31
|
+
// environments like directory health checks.
|
|
29
32
|
if (!API_KEY) {
|
|
30
|
-
process.stderr.write("[clipy-mcp]
|
|
31
|
-
|
|
32
|
-
process.exit(1);
|
|
33
|
+
process.stderr.write("[clipy-mcp] CLIPY_API_KEY is not set — tools will error until it is. " +
|
|
34
|
+
`Create one at ${API_URL}/settings/api-keys and set it in your MCP client config.\n`);
|
|
33
35
|
}
|
|
34
36
|
const FETCH_TIMEOUT_MS = 20_000;
|
|
35
37
|
/** Calls the Clipy v1 API with the API key. Throws on non-2xx or timeout. */
|
|
36
38
|
async function api(path) {
|
|
39
|
+
if (!API_KEY) {
|
|
40
|
+
throw new Error(`Missing CLIPY_API_KEY. Create a free API key at ${API_URL}/settings/api-keys ` +
|
|
41
|
+
"and set it in your MCP client config, then try again.");
|
|
42
|
+
}
|
|
37
43
|
const controller = new AbortController();
|
|
38
44
|
const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
|
|
39
45
|
let res;
|
|
@@ -42,7 +48,7 @@ async function api(path) {
|
|
|
42
48
|
headers: {
|
|
43
49
|
Authorization: `Bearer ${API_KEY}`,
|
|
44
50
|
Accept: "application/json",
|
|
45
|
-
"User-Agent": "clipy-mcp/0.5.
|
|
51
|
+
"User-Agent": "clipy-mcp/0.5.2",
|
|
46
52
|
},
|
|
47
53
|
signal: controller.signal,
|
|
48
54
|
});
|
|
@@ -81,7 +87,7 @@ function fail(message) {
|
|
|
81
87
|
};
|
|
82
88
|
}
|
|
83
89
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
84
|
-
const server = new McpServer({ name: "clipy", version: "0.5.
|
|
90
|
+
const server = new McpServer({ name: "clipy", version: "0.5.2" });
|
|
85
91
|
const recordingIdSchema = z
|
|
86
92
|
.string()
|
|
87
93
|
.describe("The recording's public id (the slug in its share URL, e.g. 'a1b2c3d4e5f6') or the full https://clipy.online/video/<id> URL.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipy/mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"mcpName": "online.clipy/mcp",
|
|
5
5
|
"description": "Model Context Protocol (MCP) server for Clipy — give Claude, Cursor, and other AI agents read access to your screen recordings' transcripts, AI summaries, and key moments with frames.",
|
|
6
6
|
"license": "MIT",
|