@quiki/mcp 0.3.1 → 0.4.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/dist/apiClient.js +3 -0
- package/dist/index.js +2 -1
- package/dist/tools/bulkImport.js +2 -0
- package/dist/tools/bulkImportEstimate.js +5 -1
- package/dist/tools/getBulkImportStatus.js +1 -1
- package/dist/types.d.ts +18 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +7 -0
- package/package.json +3 -3
package/dist/apiClient.js
CHANGED
|
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.getApiClient = getApiClient;
|
|
14
14
|
const axios_1 = __importDefault(require("axios"));
|
|
15
|
+
const version_1 = require("./version");
|
|
15
16
|
const DEFAULT_BASE_URL = 'https://api.quiki.io/api/v1';
|
|
16
17
|
function getApiClient() {
|
|
17
18
|
const token = process.env.QUIKI_API_TOKEN;
|
|
@@ -24,6 +25,8 @@ function getApiClient() {
|
|
|
24
25
|
timeout: 120_000,
|
|
25
26
|
headers: {
|
|
26
27
|
Authorization: `Bearer ${token}`,
|
|
28
|
+
// Lets Quiki tell MCP use apart from direct API calls (server v1.2.39).
|
|
29
|
+
'User-Agent': `quiki-mcp/${version_1.PACKAGE_VERSION}`,
|
|
27
30
|
'Content-Type': 'application/json',
|
|
28
31
|
Accept: 'application/json',
|
|
29
32
|
},
|
package/dist/index.js
CHANGED
|
@@ -21,10 +21,11 @@ const listRecentVideos_1 = require("./tools/listRecentVideos");
|
|
|
21
21
|
const bulkImport_1 = require("./tools/bulkImport");
|
|
22
22
|
const bulkImportEstimate_1 = require("./tools/bulkImportEstimate");
|
|
23
23
|
const getBulkImportStatus_1 = require("./tools/getBulkImportStatus");
|
|
24
|
+
const version_1 = require("./version");
|
|
24
25
|
function buildServer() {
|
|
25
26
|
const server = new mcp_js_1.McpServer({
|
|
26
27
|
name: '@quiki/mcp',
|
|
27
|
-
version:
|
|
28
|
+
version: version_1.PACKAGE_VERSION,
|
|
28
29
|
});
|
|
29
30
|
server.registerTool(whoami_1.whoamiTool.name, {
|
|
30
31
|
description: whoami_1.whoamiTool.description,
|
package/dist/tools/bulkImport.js
CHANGED
|
@@ -25,6 +25,8 @@ exports.bulkImportTool = {
|
|
|
25
25
|
'',
|
|
26
26
|
'Hard cap: 500 URLs per call -- split larger imports into multiple calls. Mixed platforms must pass an explicit `platform`. Re-submitting the same URLs creates a new BulkImport (no idempotency); duplicate URLs already scanned are deduped server-side and do not count toward credit cost.',
|
|
27
27
|
'',
|
|
28
|
+
'URLs that are not a single importable video -- channel, @handle and playlist URLs, TikTok vm./vt. short links, malformed video ids -- are reported as `totals.rejectedCount` and silently skipped rather than failing the call. They are excluded from `newEntryCount` and cost nothing. The counts partition the list exactly: `totalEntries` = `rejectedCount` + `duplicateCount` + `newEntryCount`. If `rejectedCount` is above zero and you expected every URL to scan, fix those URLs and submit them in a follow-up call.',
|
|
29
|
+
'',
|
|
28
30
|
'Credits are debited per-job at worker completion (not up front). `fileName` is stamped as `API Bulk Import` so the dashboard distinguishes agent imports from file uploads.',
|
|
29
31
|
'',
|
|
30
32
|
'Write scope required.',
|
|
@@ -28,7 +28,11 @@ exports.bulkImportEstimateTool = {
|
|
|
28
28
|
'',
|
|
29
29
|
'The two count fields measure different things: `estimatedCost` is what your CURRENT URL list would cost if submitted as-is (always = `newEntryCount x effectiveCostPerVideo`); `scannableCount` is the maximum number of URLs that would fit your CURRENT balance (= `min(newEntryCount, floor(balance / effectiveCostPerVideo))`). When `fits: false`, trim your list to `scannableCount` and resubmit.',
|
|
30
30
|
'',
|
|
31
|
-
'URL
|
|
31
|
+
'Each URL is resolved to a (platform, videoId) during dedup. URLs that are not a single importable video -- channel, @handle and playlist URLs, TikTok vm./vt. short links, malformed video ids -- are reported as `totals.rejectedCount`, excluded from `newEntryCount`, and cost nothing. The list is still accepted: a bad URL does not fail the whole call. Check `rejectedCount` and fix those URLs before submitting if you expected all of them to scan.',
|
|
32
|
+
'',
|
|
33
|
+
'The counts partition the list exactly: `totalEntries` = `rejectedCount` + `duplicateCount` + `newEntryCount`. A rejected URL is never also counted as a duplicate.',
|
|
34
|
+
'',
|
|
35
|
+
'Resolving an id is not the same as confirming the video exists. A 200 estimate means each counted URL has a well-formed video identity, not that the video is live and scannable.',
|
|
32
36
|
].join('\n'),
|
|
33
37
|
inputShape: InputSchema,
|
|
34
38
|
async handler(client, args) {
|
|
@@ -13,7 +13,7 @@ exports.getBulkImportStatusTool = {
|
|
|
13
13
|
description: [
|
|
14
14
|
'Returns the current state of a bulk import. Poll this after `bulk_import` until `status` is one of `COMPLETED`, `FAILED`, or `CANCELLED`.',
|
|
15
15
|
'',
|
|
16
|
-
'Suggested cadence: every 5 s for the first 30 s, then every 10 s. The `jobStats` object tells you how many jobs are pending/processing/completed/failed/skipped right now
|
|
16
|
+
'Suggested cadence: every 5 s for the first 30 s, then every 10 s. The `jobStats` object tells you how many jobs are pending/processing/completed/failed/skipped right now; `skipped` counts links TikTok reported deleted or private before scanning, and is included in `failed`. `skippedAsDuplicate` reports URLs that were dropped because the user already has them in their library -- these never count toward credit cost.',
|
|
17
17
|
'',
|
|
18
18
|
'The `updatedAt` field on the response only ticks when a worker writes to the row -- it does NOT update on polls, on status-reads, or while jobs are queued. Use `jobStats` (specifically the `processing` count and the sum of `pending + processing`) to detect work-in-progress; treat `updatedAt` as a "last meaningful write" timestamp, not a heartbeat.',
|
|
19
19
|
'',
|
package/dist/types.d.ts
CHANGED
|
@@ -97,6 +97,15 @@ export interface BulkImportSubmitResponse {
|
|
|
97
97
|
totals: {
|
|
98
98
|
totalEntries: number;
|
|
99
99
|
duplicateCount: number;
|
|
100
|
+
/**
|
|
101
|
+
* URLs that carry no importable video identity — YouTube
|
|
102
|
+
* channel/@handle/playlist URLs, TikTok vm./vt. short links,
|
|
103
|
+
* malformed video ids. Excluded from `newEntryCount` and never charged
|
|
104
|
+
* for. Server v1.0.74; before that these were miscounted as duplicates.
|
|
105
|
+
*
|
|
106
|
+
* Invariant: totalEntries === rejectedCount + duplicateCount + newEntryCount.
|
|
107
|
+
*/
|
|
108
|
+
rejectedCount: number;
|
|
100
109
|
newEntryCount: number;
|
|
101
110
|
};
|
|
102
111
|
scannableCount: number;
|
|
@@ -116,6 +125,15 @@ export interface BulkImportEstimateResponse {
|
|
|
116
125
|
totals: {
|
|
117
126
|
totalEntries: number;
|
|
118
127
|
duplicateCount: number;
|
|
128
|
+
/**
|
|
129
|
+
* URLs that carry no importable video identity — YouTube
|
|
130
|
+
* channel/@handle/playlist URLs, TikTok vm./vt. short links,
|
|
131
|
+
* malformed video ids. Excluded from `newEntryCount` and never charged
|
|
132
|
+
* for. Server v1.0.74; before that these were miscounted as duplicates.
|
|
133
|
+
*
|
|
134
|
+
* Invariant: totalEntries === rejectedCount + duplicateCount + newEntryCount.
|
|
135
|
+
*/
|
|
136
|
+
rejectedCount: number;
|
|
119
137
|
newEntryCount: number;
|
|
120
138
|
};
|
|
121
139
|
scannableCount: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PACKAGE_VERSION = "0.4.0";
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PACKAGE_VERSION = void 0;
|
|
4
|
+
// Single source for the package version: reported to MCP clients by the
|
|
5
|
+
// server (index.ts) and sent to Quiki as the User-Agent (apiClient.ts).
|
|
6
|
+
// Keep in step with package.json (a test checks this).
|
|
7
|
+
exports.PACKAGE_VERSION = '0.4.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quiki/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"test": "jest"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
23
|
-
"axios": "^1.
|
|
22
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
23
|
+
"axios": "^1.20.0",
|
|
24
24
|
"zod": "^4.0.14"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|