@slatesvideo/mcp-server 0.6.16 → 0.6.18
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 +2 -2
- package/dist/server.js +29 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -75,9 +75,9 @@ No environment variables, no API keys to paste into config files.
|
|
|
75
75
|
|
|
76
76
|
## What the agent can do
|
|
77
77
|
|
|
78
|
-
<!-- gen:tool-count -->
|
|
78
|
+
<!-- gen:tool-count -->240<!-- /gen:tool-count --> tools covering the full workspace: project, folder, character, location, look, and board management (create / update / delete), image generation and surgical image editing (<!-- gen:image-roster -->Nano Banana 2.1, GPT Image 2.6 Flare, GPT Image 2.6 Sunburst, FLUX 3 Image, Seedream 5.5<!-- /gen:image-roster --> — with project-asset reference images), video generation (<!-- gen:video-roster -->kling-v3.0-std, kling-v3.0-pro, kling-v3.0-omni, Seedance 2.0, Seedance 2.5, Gemini Omni Flash 1.2, Wan 3.0, MAGI-2, Kling 4.0, MiniMax H3, MiniMax H3 Max, MiniMax H3 Max Turbo<!-- /gen:video-roster -->), audio generation (<!-- gen:audio-roster -->Seed Audio 1.0, ElevenLabs Sound Effects v2, Inworld Realtime TTS-2<!-- /gen:audio-roster -->), lip sync, motion transfer, background generation with status polling, timeline assembly (add / reorder / remove clips), MP4 export and FCP7 XML export for DaVinci Resolve, cost estimation, and credit balance. Bundled prompting/workflow guides are readable at runtime via the `slates_get_prompting_guide` tool — no skill installation needed for MCP-only clients.
|
|
79
79
|
|
|
80
|
-
Generation tools estimate cost first and ask for confirmation on anything over <!-- gen:confirm-credits -->17<!-- /gen:confirm-credits --> credits, so the agent cannot silently burn credits. Every tool also carries MCP annotations, so a host can auto-approve a read and warn on a delete; the <!-- gen:skill-count -->
|
|
80
|
+
Generation tools estimate cost first and ask for confirmation on anything over <!-- gen:confirm-credits -->17<!-- /gen:confirm-credits --> credits, so the agent cannot silently burn credits. Every tool also carries MCP annotations, so a host can auto-approve a read and warn on a delete; the <!-- gen:skill-count -->53<!-- /gen:skill-count --> skills your Slates account opens are exposed as MCP **prompts**, and the manual, the model capability table and the live price list as **resources**.
|
|
81
81
|
|
|
82
82
|
The timeline, export, background-generation, edit-image, and image-reference tools require a Slates desktop on agent API v2 — if a tool reports a version error, update Slates (Settings → Check for Updates) and retry.
|
|
83
83
|
|
package/dist/server.js
CHANGED
|
@@ -6,7 +6,7 @@ import { spawn } from 'node:child_process';
|
|
|
6
6
|
import { existsSync, readFileSync } from 'node:fs';
|
|
7
7
|
import { join, dirname } from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
|
-
import { ALL_OPERATIONS, ARCHIVE_AFTER_DAYS, brainSkills, parseSkillMetadata, MODEL_CAPABILITIES, MODEL_FACTS, SlatesCloudClient, buildMcpInstructions, BRAIN_ROUTER, MY_BRAIN_TOPIC, ROUTER_NOTICE, archiveUnusedDaily, refreshServedBrain, myBrainPreload, noteUsed, APP_MANUAL, defaultContext, prepareOperation, runOperation, toolDefinitions, cachedLatestVersion, refreshLatestVersion, updateNotice, readMcpLauncher, setDesktopClientIdentity, isDesktopDown, } from '@slatesvideo/shared';
|
|
9
|
+
import { ALL_OPERATIONS, ARCHIVE_AFTER_DAYS, brainSkills, parseSkillMetadata, MODEL_CAPABILITIES, MODEL_FACTS, SlatesCloudClient, buildMcpInstructions, BRAIN_ROUTER, MY_BRAIN_TOPIC, ROUTER_NOTICE, archiveUnusedDaily, refreshServedBrain, myBrainPreload, noteUsed, APP_MANUAL, defaultContext, prepareOperation, operations, runOperation, toolDefinitions, cachedLatestVersion, refreshLatestVersion, updateNotice, readMcpLauncher, setDesktopClientIdentity, isDesktopDown, } from '@slatesvideo/shared';
|
|
10
10
|
import { DECLINED_TEXT, confirmGate, runWithConsent } from './confirm-gate.js';
|
|
11
11
|
// Slates MCP server. Stdio transport. Wires every operation in
|
|
12
12
|
// @slatesvideo/shared as an MCP tool. Both the desktop server and the
|
|
@@ -139,7 +139,7 @@ const OUTPUT_SCHEMAS = {
|
|
|
139
139
|
slates_get_generation_status: {
|
|
140
140
|
type: 'object',
|
|
141
141
|
properties: {
|
|
142
|
-
status: { type: 'string', enum: ['pending', 'processing', 'completed', 'failed', 'cancelled', 'unknown'] },
|
|
142
|
+
status: { type: 'string', enum: ['pending', 'processing', 'completed', 'failed', 'rejected', 'cancelled', 'unknown'] },
|
|
143
143
|
error: { type: ['string', 'null'] },
|
|
144
144
|
asset: { type: ['object', 'null'] },
|
|
145
145
|
cost_credits: { type: ['number', 'null'] },
|
|
@@ -241,6 +241,7 @@ async function elicitConfirm(message) {
|
|
|
241
241
|
// (stdio), so a generation is refused until its model's guide was served here:
|
|
242
242
|
// as a guide tool result, a prompt or a skill resource.
|
|
243
243
|
const guidesRead = new Set();
|
|
244
|
+
const guideEvidence = { cards: new Set(), full: new Set(), rejected: new Set() };
|
|
244
245
|
server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
245
246
|
const op = opsById.get(request.params.name);
|
|
246
247
|
if (!op) {
|
|
@@ -249,10 +250,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
|
249
250
|
isError: true,
|
|
250
251
|
};
|
|
251
252
|
}
|
|
253
|
+
// MCP exposes request boundaries, but no assistant message ID. An overlapping call
|
|
254
|
+
// keeps the cards available when it arrived, even if consent or a quote waits.
|
|
255
|
+
const evidenceAtArrival = { ...guideEvidence, cards: new Set(guideEvidence.cards) };
|
|
256
|
+
const topics = new Set();
|
|
257
|
+
const rejectGeneration = () => {
|
|
258
|
+
if (op.billable)
|
|
259
|
+
operations.recordGenerationRejection({ guideEvidence }, op.id, request.params.arguments?.model, topics);
|
|
260
|
+
};
|
|
252
261
|
try {
|
|
253
262
|
const prepared = prepareOperation(op, request.params.arguments);
|
|
254
|
-
if (!prepared.ok)
|
|
263
|
+
if (!prepared.ok) {
|
|
264
|
+
rejectGeneration();
|
|
255
265
|
return { content: [{ type: 'text', text: prepared.message }], isError: true };
|
|
266
|
+
}
|
|
256
267
|
const { call } = prepared;
|
|
257
268
|
const args = call.input;
|
|
258
269
|
// Progress notifications: a background render is invisible to the host
|
|
@@ -285,7 +296,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
|
285
296
|
gate: CONFIRM_GATES.get(op.id) ?? 'none',
|
|
286
297
|
args: args,
|
|
287
298
|
hostCanAsk: clientSupportsElicitation() && !elicitationFailed,
|
|
288
|
-
run: (patch) => call.run({
|
|
299
|
+
run: (patch) => call.run({
|
|
300
|
+
...defaultContext(), signal: extra?.signal, guidesRead, guideEvidence: evidenceAtArrival,
|
|
301
|
+
onGenerationGuide: (topic) => topics.add(topic),
|
|
302
|
+
}, patch),
|
|
289
303
|
ask: elicitConfirm,
|
|
290
304
|
});
|
|
291
305
|
}
|
|
@@ -293,10 +307,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
|
293
307
|
if (ticker)
|
|
294
308
|
clearInterval(ticker);
|
|
295
309
|
}
|
|
296
|
-
if ('declined' in outcome)
|
|
310
|
+
if ('declined' in outcome) {
|
|
311
|
+
rejectGeneration();
|
|
297
312
|
return { content: [{ type: 'text', text: DECLINED_TEXT }] };
|
|
313
|
+
}
|
|
298
314
|
const result = outcome;
|
|
299
315
|
let data = result.data;
|
|
316
|
+
if (data?.requires_clarification === true)
|
|
317
|
+
rejectGeneration();
|
|
318
|
+
if (op.id === 'slates_estimate_generation_cost' && typeof data?.craft_card === 'string' && data.craft_card &&
|
|
319
|
+
typeof data.craft_card_skill === 'string')
|
|
320
|
+
guideEvidence.cards.add(data.craft_card_skill);
|
|
300
321
|
if (typeof data?.prompt_warning === 'string' && data.prompt_warning) {
|
|
301
322
|
warn(data.prompt_warning);
|
|
302
323
|
}
|
|
@@ -332,6 +353,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
|
332
353
|
};
|
|
333
354
|
}
|
|
334
355
|
catch (err) {
|
|
356
|
+
rejectGeneration();
|
|
335
357
|
const message = err instanceof Error ? err.message : String(err);
|
|
336
358
|
if (isDesktopDown(err))
|
|
337
359
|
warn(message);
|
|
@@ -376,6 +398,7 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
|
376
398
|
throw new Error(`Unknown prompt: ${name}. Available: ${Object.keys(skills).sort().join(', ')}`);
|
|
377
399
|
}
|
|
378
400
|
guidesRead.add(name);
|
|
401
|
+
guideEvidence.full.add(name);
|
|
379
402
|
// Served is used: a My brain file read this way keeps its date, so archiveUnused never takes a file in use.
|
|
380
403
|
if (brain.mine.has(name))
|
|
381
404
|
noteUsed(name);
|
|
@@ -488,6 +511,7 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
|
488
511
|
if (content === undefined)
|
|
489
512
|
throw new Error(`Unknown skill: ${skill[1]}`);
|
|
490
513
|
guidesRead.add(name);
|
|
514
|
+
guideEvidence.full.add(name);
|
|
491
515
|
if (brain.mine.has(name))
|
|
492
516
|
noteUsed(name);
|
|
493
517
|
return content;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slatesvideo/mcp-server",
|
|
3
3
|
"mcpName": "io.github.EricDisero/slates",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.18",
|
|
5
5
|
"description": "MCP server for the Slates desktop app. Your AI agent (ChatGPT via Codex, Claude, Cursor, or another local MCP client) drives a local AI video studio: projects, characters, storyboards, image and video generation. Files land on disk.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
53
|
-
"@slatesvideo/shared": "^0.7.
|
|
53
|
+
"@slatesvideo/shared": "^0.7.25",
|
|
54
54
|
"zod": "^4.6.7"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|