@quiki/mcp 0.4.2 → 0.5.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 +29 -10
- package/dist/index.d.ts +20 -0
- package/dist/index.js +37 -95
- package/dist/tools/bulkImport.d.ts +7 -0
- package/dist/tools/bulkImport.js +9 -0
- package/dist/tools/bulkImportEstimate.d.ts +7 -0
- package/dist/tools/bulkImportEstimate.js +8 -0
- package/dist/tools/getBulkImportStatus.d.ts +7 -0
- package/dist/tools/getBulkImportStatus.js +8 -0
- package/dist/tools/getScan.d.ts +7 -0
- package/dist/tools/getScan.js +8 -0
- package/dist/tools/getVideo.d.ts +7 -0
- package/dist/tools/getVideo.js +8 -0
- package/dist/tools/listRecentVideos.d.ts +7 -0
- package/dist/tools/listRecentVideos.js +8 -0
- package/dist/tools/scanUrl.d.ts +7 -0
- package/dist/tools/scanUrl.js +9 -0
- package/dist/tools/whoami.d.ts +7 -0
- package/dist/tools/whoami.js +18 -1
- package/dist/types.d.ts +13 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
# @quiki/mcp
|
|
2
2
|
|
|
3
|
-
MCP stdio server for [Quiki.io](https://quiki.io). Exposes the full Quiki toolkit to Claude Desktop
|
|
3
|
+
MCP stdio server for [Quiki.io](https://quiki.io). Exposes the full Quiki toolkit to Claude Desktop, Claude Code, ChatGPT, Gemini and any MCP-capable agent:
|
|
4
4
|
|
|
5
|
-
- `whoami
|
|
6
|
-
- `scan_url
|
|
7
|
-
- `get_scan
|
|
8
|
-
- `list_recent_videos
|
|
9
|
-
- `get_video
|
|
10
|
-
- `bulk_import
|
|
11
|
-
- `bulk_import_estimate
|
|
12
|
-
- `get_bulk_import_status
|
|
5
|
+
- `whoami`: verify the token and see your tier and credit balance (plus today's scan allowance on the free plan)
|
|
6
|
+
- `scan_url`: submit a TikTok, YouTube, or Instagram URL for scanning
|
|
7
|
+
- `get_scan`: poll a previously submitted scan
|
|
8
|
+
- `list_recent_videos`: list the most recently scanned videos in your library
|
|
9
|
+
- `get_video`: fetch the full record (metadata, transcript, AI analysis) for one video
|
|
10
|
+
- `bulk_import`: submit up to 500 TikTok, YouTube, or Instagram URLs in one call
|
|
11
|
+
- `bulk_import_estimate`: preview the credit cost of a bulk import before committing
|
|
12
|
+
- `get_bulk_import_status`: poll a running bulk import
|
|
13
13
|
|
|
14
14
|
Requires a Quiki API token from a **PRO (credit)** plan or higher. Generate one in your account under **Account > API keys**.
|
|
15
15
|
|
|
16
|
+
## Credit balance
|
|
17
|
+
|
|
18
|
+
`whoami` returns `credits.balance`, so an agent can check what it can spend before calling `scan_url` or `bulk_import`. On the free plan it also returns `dailyScans` (`limit`, `used`, `remaining`, `resetsAt`), the daily allowance `scan_url` enforces; it is `null` on paid plans. Older Quiki servers return only `id`, `email` and `tier`, so treat the new fields as optional.
|
|
19
|
+
|
|
20
|
+
## Tool hints
|
|
21
|
+
|
|
22
|
+
Every tool declares MCP tool annotations, so clients that support them can auto-approve safe calls:
|
|
23
|
+
|
|
24
|
+
| Tool | Read-only | Idempotent | Reaches outside Quiki |
|
|
25
|
+
|------|-----------|------------|-----------------------|
|
|
26
|
+
| `whoami`, `get_scan`, `list_recent_videos`, `get_video`, `bulk_import_estimate`, `get_bulk_import_status` | yes | yes | no |
|
|
27
|
+
| `scan_url`, `bulk_import` | no (spends credits) | no | yes (fetches the video from its platform) |
|
|
28
|
+
|
|
29
|
+
No tool deletes anything (`destructiveHint: false` throughout). Hints are advisory: the Quiki API still enforces token scope, tier and credits on every call.
|
|
30
|
+
|
|
16
31
|
## Claude Desktop / Claude Code configuration
|
|
17
32
|
|
|
18
33
|
Add the following to your `mcpServers` config (e.g. `~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
@@ -33,9 +48,13 @@ Add the following to your `mcpServers` config (e.g. `~/Library/Application Suppo
|
|
|
33
48
|
|
|
34
49
|
| Variable | Default | Description |
|
|
35
50
|
|----------|---------|-------------|
|
|
36
|
-
| `QUIKI_API_TOKEN` |
|
|
51
|
+
| `QUIKI_API_TOKEN` | (none) | **Required.** Raw PAT (`qk_live_...`). |
|
|
37
52
|
| `QUIKI_API_BASE_URL` | `https://api.quiki.io/api/v1` | Override for staging / local dev (e.g. `http://localhost:3000/api/v1`). |
|
|
38
53
|
|
|
54
|
+
## Changes
|
|
55
|
+
|
|
56
|
+
- **0.5.0**: `whoami` reports the credit balance and, on the free plan, the daily scan allowance (needs Quiki server 1.2.71 or later). Every tool declares read-only, idempotent and open-world hints. No breaking changes: tool names, inputs and outputs are as before.
|
|
57
|
+
|
|
39
58
|
## Development
|
|
40
59
|
|
|
41
60
|
```bash
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import type { ToolAnnotations } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
+
import type { ZodRawShape } from 'zod';
|
|
5
|
+
import { type ApiClient } from './apiClient';
|
|
6
|
+
/**
|
|
7
|
+
* The shape every tool in src/tools/* exports. `Args` is the tool's own input
|
|
8
|
+
* type, so each handler keeps its precise argument type.
|
|
9
|
+
*/
|
|
10
|
+
export interface QuikiTool<Args, Result> {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
annotations: ToolAnnotations;
|
|
14
|
+
handler(client: ApiClient, args: Args): Promise<Result>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Registers one tool. Every Quiki tool behaves the same way around its
|
|
18
|
+
* handler: build the API client at call time, return the result as
|
|
19
|
+
* pretty-printed JSON text, and turn any thrown error into
|
|
20
|
+
* toolErrorResponse (which carries the RFC 7807 body as a second block).
|
|
21
|
+
*/
|
|
22
|
+
export declare function registerQuikiTool<Args, Result, Shape extends ZodRawShape>(server: McpServer, tool: QuikiTool<Args, Result>, inputShape: Shape): void;
|
|
3
23
|
export declare function buildServer(): McpServer;
|
|
4
24
|
export declare function main(): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,12 @@
|
|
|
5
5
|
// get_bulk_import_status against an McpServer and connects a
|
|
6
6
|
// StdioServerTransport. Each tool's handler runs through getApiClient() so
|
|
7
7
|
// env vars are read at call time, surfacing token/config errors to the agent
|
|
8
|
-
// rather than crashing the process on startup.
|
|
8
|
+
// rather than crashing the process on startup. Every tool is registered
|
|
9
|
+
// through registerQuikiTool, which also publishes its annotations
|
|
10
|
+
// (read-only / idempotent / open-world hints) so clients can auto-approve the
|
|
11
|
+
// safe calls.
|
|
9
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.registerQuikiTool = registerQuikiTool;
|
|
10
14
|
exports.buildServer = buildServer;
|
|
11
15
|
exports.main = main;
|
|
12
16
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
@@ -22,107 +26,45 @@ const bulkImport_1 = require("./tools/bulkImport");
|
|
|
22
26
|
const bulkImportEstimate_1 = require("./tools/bulkImportEstimate");
|
|
23
27
|
const getBulkImportStatus_1 = require("./tools/getBulkImportStatus");
|
|
24
28
|
const version_1 = require("./version");
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
server.registerTool(scanUrl_1.scanUrlTool.name, {
|
|
43
|
-
description: scanUrl_1.scanUrlTool.description,
|
|
44
|
-
inputSchema: scanUrl_1.scanUrlInputShape,
|
|
45
|
-
}, async (args) => {
|
|
46
|
-
try {
|
|
47
|
-
const result = await scanUrl_1.scanUrlTool.handler((0, apiClient_1.getApiClient)(), args);
|
|
48
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
49
|
-
}
|
|
50
|
-
catch (err) {
|
|
51
|
-
return (0, errorResponse_1.toolErrorResponse)(err);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
server.registerTool(getScan_1.getScanTool.name, {
|
|
55
|
-
description: getScan_1.getScanTool.description,
|
|
56
|
-
inputSchema: getScan_1.getScanInputShape,
|
|
57
|
-
}, async (args) => {
|
|
29
|
+
/**
|
|
30
|
+
* Registers one tool. Every Quiki tool behaves the same way around its
|
|
31
|
+
* handler: build the API client at call time, return the result as
|
|
32
|
+
* pretty-printed JSON text, and turn any thrown error into
|
|
33
|
+
* toolErrorResponse (which carries the RFC 7807 body as a second block).
|
|
34
|
+
*/
|
|
35
|
+
function registerQuikiTool(server, tool, inputShape) {
|
|
36
|
+
server.registerTool(tool.name, {
|
|
37
|
+
title: tool.annotations.title,
|
|
38
|
+
description: tool.description,
|
|
39
|
+
inputSchema: inputShape,
|
|
40
|
+
annotations: tool.annotations,
|
|
41
|
+
},
|
|
42
|
+
// The SDK has already validated `args` against `inputShape`; each handler
|
|
43
|
+
// re-parses with its own schema, so the cast only bridges the two types.
|
|
44
|
+
(async (args) => {
|
|
58
45
|
try {
|
|
59
|
-
const result = await
|
|
60
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
61
|
-
}
|
|
62
|
-
catch (err) {
|
|
63
|
-
return (0, errorResponse_1.toolErrorResponse)(err);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
server.registerTool(listRecentVideos_1.listRecentVideosTool.name, {
|
|
67
|
-
description: listRecentVideos_1.listRecentVideosTool.description,
|
|
68
|
-
inputSchema: listRecentVideos_1.listRecentVideosInputShape,
|
|
69
|
-
}, async (args) => {
|
|
70
|
-
try {
|
|
71
|
-
const result = await listRecentVideos_1.listRecentVideosTool.handler((0, apiClient_1.getApiClient)(), args);
|
|
72
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
73
|
-
}
|
|
74
|
-
catch (err) {
|
|
75
|
-
return (0, errorResponse_1.toolErrorResponse)(err);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
server.registerTool(getVideo_1.getVideoTool.name, {
|
|
79
|
-
description: getVideo_1.getVideoTool.description,
|
|
80
|
-
inputSchema: getVideo_1.getVideoInputShape,
|
|
81
|
-
}, async (args) => {
|
|
82
|
-
try {
|
|
83
|
-
const result = await getVideo_1.getVideoTool.handler((0, apiClient_1.getApiClient)(), args);
|
|
84
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
85
|
-
}
|
|
86
|
-
catch (err) {
|
|
87
|
-
return (0, errorResponse_1.toolErrorResponse)(err);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
server.registerTool(bulkImport_1.bulkImportTool.name, {
|
|
91
|
-
description: bulkImport_1.bulkImportTool.description,
|
|
92
|
-
inputSchema: bulkImport_1.bulkImportInputShape,
|
|
93
|
-
}, async (args) => {
|
|
94
|
-
try {
|
|
95
|
-
const result = await bulkImport_1.bulkImportTool.handler((0, apiClient_1.getApiClient)(), args);
|
|
96
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
97
|
-
}
|
|
98
|
-
catch (err) {
|
|
99
|
-
return (0, errorResponse_1.toolErrorResponse)(err);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
server.registerTool(bulkImportEstimate_1.bulkImportEstimateTool.name, {
|
|
103
|
-
description: bulkImportEstimate_1.bulkImportEstimateTool.description,
|
|
104
|
-
inputSchema: bulkImportEstimate_1.bulkImportEstimateInputShape,
|
|
105
|
-
}, async (args) => {
|
|
106
|
-
try {
|
|
107
|
-
const result = await bulkImportEstimate_1.bulkImportEstimateTool.handler((0, apiClient_1.getApiClient)(), args);
|
|
108
|
-
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
109
|
-
}
|
|
110
|
-
catch (err) {
|
|
111
|
-
return (0, errorResponse_1.toolErrorResponse)(err);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
server.registerTool(getBulkImportStatus_1.getBulkImportStatusTool.name, {
|
|
115
|
-
description: getBulkImportStatus_1.getBulkImportStatusTool.description,
|
|
116
|
-
inputSchema: getBulkImportStatus_1.getBulkImportStatusInputShape,
|
|
117
|
-
}, async (args) => {
|
|
118
|
-
try {
|
|
119
|
-
const result = await getBulkImportStatus_1.getBulkImportStatusTool.handler((0, apiClient_1.getApiClient)(), args);
|
|
46
|
+
const result = await tool.handler((0, apiClient_1.getApiClient)(), args);
|
|
120
47
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
121
48
|
}
|
|
122
49
|
catch (err) {
|
|
123
50
|
return (0, errorResponse_1.toolErrorResponse)(err);
|
|
124
51
|
}
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
function buildServer() {
|
|
55
|
+
const server = new mcp_js_1.McpServer({
|
|
56
|
+
name: '@quiki/mcp',
|
|
57
|
+
version: version_1.PACKAGE_VERSION,
|
|
125
58
|
});
|
|
59
|
+
// Registration order is the order clients list the tools in.
|
|
60
|
+
registerQuikiTool(server, whoami_1.whoamiTool, {});
|
|
61
|
+
registerQuikiTool(server, scanUrl_1.scanUrlTool, scanUrl_1.scanUrlInputShape);
|
|
62
|
+
registerQuikiTool(server, getScan_1.getScanTool, getScan_1.getScanInputShape);
|
|
63
|
+
registerQuikiTool(server, listRecentVideos_1.listRecentVideosTool, listRecentVideos_1.listRecentVideosInputShape);
|
|
64
|
+
registerQuikiTool(server, getVideo_1.getVideoTool, getVideo_1.getVideoInputShape);
|
|
65
|
+
registerQuikiTool(server, bulkImport_1.bulkImportTool, bulkImport_1.bulkImportInputShape);
|
|
66
|
+
registerQuikiTool(server, bulkImportEstimate_1.bulkImportEstimateTool, bulkImportEstimate_1.bulkImportEstimateInputShape);
|
|
67
|
+
registerQuikiTool(server, getBulkImportStatus_1.getBulkImportStatusTool, getBulkImportStatus_1.getBulkImportStatusInputShape);
|
|
126
68
|
return server;
|
|
127
69
|
}
|
|
128
70
|
async function main() {
|
|
@@ -20,6 +20,13 @@ declare const InputSchema: z.ZodObject<{
|
|
|
20
20
|
type Input = z.infer<typeof InputSchema>;
|
|
21
21
|
export declare const bulkImportTool: {
|
|
22
22
|
name: string;
|
|
23
|
+
annotations: {
|
|
24
|
+
title: string;
|
|
25
|
+
readOnlyHint: false;
|
|
26
|
+
destructiveHint: false;
|
|
27
|
+
idempotentHint: false;
|
|
28
|
+
openWorldHint: true;
|
|
29
|
+
};
|
|
23
30
|
description: string;
|
|
24
31
|
inputShape: z.ZodObject<{
|
|
25
32
|
urls: z.ZodArray<z.ZodString>;
|
package/dist/tools/bulkImport.js
CHANGED
|
@@ -18,6 +18,15 @@ exports.bulkImportInputShape = {
|
|
|
18
18
|
const InputSchema = zod_1.z.object(exports.bulkImportInputShape);
|
|
19
19
|
exports.bulkImportTool = {
|
|
20
20
|
name: 'bulk_import',
|
|
21
|
+
// Spends credits and fetches the video from its platform, so it is
|
|
22
|
+
// neither read-only nor idempotent. Nothing here deletes data.
|
|
23
|
+
annotations: {
|
|
24
|
+
title: 'Bulk import video URLs',
|
|
25
|
+
readOnlyHint: false,
|
|
26
|
+
destructiveHint: false,
|
|
27
|
+
idempotentHint: false,
|
|
28
|
+
openWorldHint: true,
|
|
29
|
+
},
|
|
21
30
|
description: [
|
|
22
31
|
'Submits a list of video URLs for bulk scanning. Returns a `bulkImportId` you can pass to `get_bulk_import_status` to poll progress.',
|
|
23
32
|
'',
|
|
@@ -20,6 +20,13 @@ declare const InputSchema: z.ZodObject<{
|
|
|
20
20
|
type Input = z.infer<typeof InputSchema>;
|
|
21
21
|
export declare const bulkImportEstimateTool: {
|
|
22
22
|
name: string;
|
|
23
|
+
annotations: {
|
|
24
|
+
title: string;
|
|
25
|
+
readOnlyHint: true;
|
|
26
|
+
destructiveHint: false;
|
|
27
|
+
idempotentHint: true;
|
|
28
|
+
openWorldHint: false;
|
|
29
|
+
};
|
|
23
30
|
description: string;
|
|
24
31
|
inputShape: z.ZodObject<{
|
|
25
32
|
urls: z.ZodArray<z.ZodString>;
|
|
@@ -19,6 +19,14 @@ exports.bulkImportEstimateInputShape = {
|
|
|
19
19
|
const InputSchema = zod_1.z.object(exports.bulkImportEstimateInputShape);
|
|
20
20
|
exports.bulkImportEstimateTool = {
|
|
21
21
|
name: 'bulk_import_estimate',
|
|
22
|
+
// Reads only; safe for a client to auto-approve.
|
|
23
|
+
annotations: {
|
|
24
|
+
title: 'Estimate a bulk import',
|
|
25
|
+
readOnlyHint: true,
|
|
26
|
+
destructiveHint: false,
|
|
27
|
+
idempotentHint: true,
|
|
28
|
+
openWorldHint: false,
|
|
29
|
+
},
|
|
22
30
|
description: [
|
|
23
31
|
'Returns the dedup + credit math for a URL list without starting an import. Use this to plan a bulk submission before committing -- `fits: true` means `bulk_import` would succeed; `fits: false` returns `shortfall: N` so you can trim the list.',
|
|
24
32
|
'',
|
|
@@ -10,6 +10,13 @@ declare const InputSchema: z.ZodObject<{
|
|
|
10
10
|
type Input = z.infer<typeof InputSchema>;
|
|
11
11
|
export declare const getBulkImportStatusTool: {
|
|
12
12
|
name: string;
|
|
13
|
+
annotations: {
|
|
14
|
+
title: string;
|
|
15
|
+
readOnlyHint: true;
|
|
16
|
+
destructiveHint: false;
|
|
17
|
+
idempotentHint: true;
|
|
18
|
+
openWorldHint: false;
|
|
19
|
+
};
|
|
13
20
|
description: string;
|
|
14
21
|
inputShape: z.ZodObject<{
|
|
15
22
|
id: z.ZodString;
|
|
@@ -10,6 +10,14 @@ exports.getBulkImportStatusInputShape = {
|
|
|
10
10
|
const InputSchema = zod_1.z.object(exports.getBulkImportStatusInputShape);
|
|
11
11
|
exports.getBulkImportStatusTool = {
|
|
12
12
|
name: 'get_bulk_import_status',
|
|
13
|
+
// Reads only; safe for a client to auto-approve.
|
|
14
|
+
annotations: {
|
|
15
|
+
title: 'Get bulk import status',
|
|
16
|
+
readOnlyHint: true,
|
|
17
|
+
destructiveHint: false,
|
|
18
|
+
idempotentHint: true,
|
|
19
|
+
openWorldHint: false,
|
|
20
|
+
},
|
|
13
21
|
description: [
|
|
14
22
|
'Returns the current state of a bulk import. Poll this after `bulk_import` until `status` is one of `COMPLETED`, `FAILED`, or `CANCELLED`.',
|
|
15
23
|
'',
|
package/dist/tools/getScan.d.ts
CHANGED
|
@@ -10,6 +10,13 @@ declare const InputSchema: z.ZodObject<{
|
|
|
10
10
|
type Input = z.infer<typeof InputSchema>;
|
|
11
11
|
export declare const getScanTool: {
|
|
12
12
|
name: string;
|
|
13
|
+
annotations: {
|
|
14
|
+
title: string;
|
|
15
|
+
readOnlyHint: true;
|
|
16
|
+
destructiveHint: false;
|
|
17
|
+
idempotentHint: true;
|
|
18
|
+
openWorldHint: false;
|
|
19
|
+
};
|
|
13
20
|
description: string;
|
|
14
21
|
inputShape: z.ZodObject<{
|
|
15
22
|
id: z.ZodString;
|
package/dist/tools/getScan.js
CHANGED
|
@@ -10,6 +10,14 @@ exports.getScanInputShape = {
|
|
|
10
10
|
const InputSchema = zod_1.z.object(exports.getScanInputShape);
|
|
11
11
|
exports.getScanTool = {
|
|
12
12
|
name: 'get_scan',
|
|
13
|
+
// Reads only; safe for a client to auto-approve.
|
|
14
|
+
annotations: {
|
|
15
|
+
title: 'Get scan status and result',
|
|
16
|
+
readOnlyHint: true,
|
|
17
|
+
destructiveHint: false,
|
|
18
|
+
idempotentHint: true,
|
|
19
|
+
openWorldHint: false,
|
|
20
|
+
},
|
|
13
21
|
description: 'Retrieves the current status and result of a previously submitted scan. Poll this after `scan_url` returns a scan ID. The scan is done when `status` is `"completed"` or `"failed"`.',
|
|
14
22
|
inputShape: InputSchema,
|
|
15
23
|
async handler(client, args) {
|
package/dist/tools/getVideo.d.ts
CHANGED
|
@@ -10,6 +10,13 @@ declare const InputSchema: z.ZodObject<{
|
|
|
10
10
|
type Input = z.infer<typeof InputSchema>;
|
|
11
11
|
export declare const getVideoTool: {
|
|
12
12
|
name: string;
|
|
13
|
+
annotations: {
|
|
14
|
+
title: string;
|
|
15
|
+
readOnlyHint: true;
|
|
16
|
+
destructiveHint: false;
|
|
17
|
+
idempotentHint: true;
|
|
18
|
+
openWorldHint: false;
|
|
19
|
+
};
|
|
13
20
|
description: string;
|
|
14
21
|
inputShape: z.ZodObject<{
|
|
15
22
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
package/dist/tools/getVideo.js
CHANGED
|
@@ -11,6 +11,14 @@ exports.getVideoInputShape = {
|
|
|
11
11
|
const InputSchema = zod_1.z.object(exports.getVideoInputShape);
|
|
12
12
|
exports.getVideoTool = {
|
|
13
13
|
name: 'get_video',
|
|
14
|
+
// Reads only; safe for a client to auto-approve.
|
|
15
|
+
annotations: {
|
|
16
|
+
title: 'Get a video from the library',
|
|
17
|
+
readOnlyHint: true,
|
|
18
|
+
destructiveHint: false,
|
|
19
|
+
idempotentHint: true,
|
|
20
|
+
openWorldHint: false,
|
|
21
|
+
},
|
|
14
22
|
description: "Fetches the full record for one previously-scanned video: metadata, transcript (for videos), AI analysis (for deep scans), and image URLs (for TikTok photo carousels). The `id` comes from `list_recent_videos` or from the `video_id` field on a completed `scan_url` response. Check `media_type` to branch — for `'photo'`, `transcript` is absent and `images` is present.",
|
|
15
23
|
inputShape: InputSchema,
|
|
16
24
|
async handler(client, args) {
|
|
@@ -12,6 +12,13 @@ declare const InputSchema: z.ZodObject<{
|
|
|
12
12
|
type Input = z.infer<typeof InputSchema>;
|
|
13
13
|
export declare const listRecentVideosTool: {
|
|
14
14
|
name: string;
|
|
15
|
+
annotations: {
|
|
16
|
+
title: string;
|
|
17
|
+
readOnlyHint: true;
|
|
18
|
+
destructiveHint: false;
|
|
19
|
+
idempotentHint: true;
|
|
20
|
+
openWorldHint: false;
|
|
21
|
+
};
|
|
15
22
|
description: string;
|
|
16
23
|
inputShape: z.ZodObject<{
|
|
17
24
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -20,6 +20,14 @@ exports.listRecentVideosInputShape = {
|
|
|
20
20
|
const InputSchema = zod_1.z.object(exports.listRecentVideosInputShape);
|
|
21
21
|
exports.listRecentVideosTool = {
|
|
22
22
|
name: 'list_recent_videos',
|
|
23
|
+
// Reads only; safe for a client to auto-approve.
|
|
24
|
+
annotations: {
|
|
25
|
+
title: 'List recent videos',
|
|
26
|
+
readOnlyHint: true,
|
|
27
|
+
destructiveHint: false,
|
|
28
|
+
idempotentHint: true,
|
|
29
|
+
openWorldHint: false,
|
|
30
|
+
},
|
|
23
31
|
description: "Lists the most recently scanned videos in the authenticated user's library, newest first (by last scan time). Returns a trimmed shape — title, author, platform, URL, timestamps — without transcripts or AI analysis, so the agent can skim many entries and pick one to dig into. Call `get_video(id)` for the full body. Photo posts (TikTok carousels) are marked with `media_type: 'photo'` and do not have transcripts — they have `images` instead (fetch full via `get_video`).",
|
|
24
32
|
inputShape: InputSchema,
|
|
25
33
|
async handler(client, args) {
|
package/dist/tools/scanUrl.d.ts
CHANGED
|
@@ -22,6 +22,13 @@ declare const InputSchema: z.ZodObject<{
|
|
|
22
22
|
type Input = z.infer<typeof InputSchema>;
|
|
23
23
|
export declare const scanUrlTool: {
|
|
24
24
|
name: string;
|
|
25
|
+
annotations: {
|
|
26
|
+
title: string;
|
|
27
|
+
readOnlyHint: false;
|
|
28
|
+
destructiveHint: false;
|
|
29
|
+
idempotentHint: false;
|
|
30
|
+
openWorldHint: true;
|
|
31
|
+
};
|
|
25
32
|
description: string;
|
|
26
33
|
inputShape: z.ZodObject<{
|
|
27
34
|
url: z.ZodString;
|
package/dist/tools/scanUrl.js
CHANGED
|
@@ -18,6 +18,15 @@ exports.scanUrlInputShape = {
|
|
|
18
18
|
const InputSchema = zod_1.z.object(exports.scanUrlInputShape);
|
|
19
19
|
exports.scanUrlTool = {
|
|
20
20
|
name: 'scan_url',
|
|
21
|
+
// Spends credits and fetches the video from its platform, so it is
|
|
22
|
+
// neither read-only nor idempotent. Nothing here deletes data.
|
|
23
|
+
annotations: {
|
|
24
|
+
title: 'Scan a video URL',
|
|
25
|
+
readOnlyHint: false,
|
|
26
|
+
destructiveHint: false,
|
|
27
|
+
idempotentHint: false,
|
|
28
|
+
openWorldHint: true,
|
|
29
|
+
},
|
|
21
30
|
description: [
|
|
22
31
|
'Submits a TikTok, YouTube, or Instagram URL for scanning. Returns scan metadata immediately (async) or waits up to 90 seconds for the result (sync-ish).',
|
|
23
32
|
'',
|
package/dist/tools/whoami.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ import type { ApiClient } from '../apiClient';
|
|
|
3
3
|
import type { WhoamiResponse } from '../types';
|
|
4
4
|
export declare const whoamiTool: {
|
|
5
5
|
name: string;
|
|
6
|
+
annotations: {
|
|
7
|
+
title: string;
|
|
8
|
+
readOnlyHint: true;
|
|
9
|
+
destructiveHint: false;
|
|
10
|
+
idempotentHint: true;
|
|
11
|
+
openWorldHint: false;
|
|
12
|
+
};
|
|
6
13
|
description: string;
|
|
7
14
|
inputSchema: {};
|
|
8
15
|
inputShape: z.ZodObject<{}, z.core.$strip>;
|
package/dist/tools/whoami.js
CHANGED
|
@@ -7,7 +7,24 @@ exports.whoamiTool = void 0;
|
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
exports.whoamiTool = {
|
|
9
9
|
name: 'whoami',
|
|
10
|
-
|
|
10
|
+
// Reads only; safe for a client to auto-approve.
|
|
11
|
+
annotations: {
|
|
12
|
+
title: 'Who am I',
|
|
13
|
+
readOnlyHint: true,
|
|
14
|
+
destructiveHint: false,
|
|
15
|
+
idempotentHint: true,
|
|
16
|
+
openWorldHint: false,
|
|
17
|
+
},
|
|
18
|
+
// v0.5.0: mentions the credit fields added to GET /api/v1/me in server
|
|
19
|
+
// v1.2.71. The old text said scan_url needs `pro` or `admin`; FREE has been
|
|
20
|
+
// able to run fast scans since server v1.1.7, so that line was dropped.
|
|
21
|
+
description: [
|
|
22
|
+
'Returns the authenticated Quiki account: `id`, `email`, `tier` (`free`, `pro` or `admin`) and the credit balance (`credits.balance`). Use it to check the token works and to see what the account can spend before calling `scan_url` or `bulk_import`.',
|
|
23
|
+
'',
|
|
24
|
+
'On FREE it also returns `dailyScans` (`limit`, `used`, `remaining`, `resetsAt`): the daily scan allowance `scan_url` enforces. When `remaining` is 0, `scan_url` is refused until `resetsAt`. `dailyScans` is null on other tiers.',
|
|
25
|
+
'',
|
|
26
|
+
'FREE can run `fast` TikTok and YouTube scans within the daily allowance. Deep analysis, transcripts, Instagram and bulk imports need credits (tier `pro`). `admin` is not charged. Older Quiki servers return only `id`, `email` and `tier`.',
|
|
27
|
+
].join('\n'),
|
|
11
28
|
inputSchema: {},
|
|
12
29
|
inputShape: zod_1.z.object({}),
|
|
13
30
|
async handler(client, _args) {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
export type Tier = 'free' | '
|
|
1
|
+
export type Tier = 'free' | 'pro' | 'admin' | 'play' | 'agency';
|
|
2
2
|
export type Platform = 'tiktok' | 'youtube' | 'instagram';
|
|
3
3
|
export type Mode = 'fast' | 'deep' | 'transcript_only';
|
|
4
4
|
export type ScanStatus = 'queued' | 'running' | 'completed' | 'failed';
|
|
5
|
+
export interface DailyScanAllowance {
|
|
6
|
+
limit: number;
|
|
7
|
+
used: number;
|
|
8
|
+
remaining: number;
|
|
9
|
+
/** ISO 8601. When the allowance resets. */
|
|
10
|
+
resetsAt: string;
|
|
11
|
+
}
|
|
5
12
|
export interface WhoamiResponse {
|
|
6
13
|
id: string;
|
|
7
14
|
email: string;
|
|
8
15
|
tier: Tier;
|
|
16
|
+
credits?: {
|
|
17
|
+
balance: number;
|
|
18
|
+
};
|
|
19
|
+
/** FREE only: the daily scan allowance `scan_url` enforces. null on other tiers. */
|
|
20
|
+
dailyScans?: DailyScanAllowance | null;
|
|
9
21
|
}
|
|
10
22
|
export interface ScanMetadata {
|
|
11
23
|
title: string | null;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "0.
|
|
1
|
+
export declare const PACKAGE_VERSION = "0.5.0";
|
package/dist/version.js
CHANGED
|
@@ -4,4 +4,4 @@ exports.PACKAGE_VERSION = void 0;
|
|
|
4
4
|
// Single source for the package version: reported to MCP clients by the
|
|
5
5
|
// server (index.ts) and sent to Quiki as the User-Agent (apiClient.ts).
|
|
6
6
|
// Keep in step with package.json (a test checks this).
|
|
7
|
-
exports.PACKAGE_VERSION = '0.
|
|
7
|
+
exports.PACKAGE_VERSION = '0.5.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quiki/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Quiki.io MCP server — whoami, scan_url, get_scan, list_recent_videos, get_video, bulk_import, bulk_import_estimate, get_bulk_import_status over stdio.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|