@slatesvideo/mcp-server 0.6.3 → 0.6.4
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 +57 -16
- 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 -->189<!-- /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.5 Flare, GPT Image 2.5 Sunburst, FLUX 3 Image, Seedream 5 Lite<!-- /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.1, Wan 3.0, Kling 4.0, MiniMax H3, MiniMax H3 Max, MiniMax H3 Max Turbo, LTX-2.5, LTX-2.5 Pro<!-- /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 -->46<!-- /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 { readFileSync } from 'node:fs';
|
|
|
6
6
|
import { join, dirname } from 'node:path';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import { ALL_OPERATIONS,
|
|
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, toolDefinitions, cachedLatestVersion, refreshLatestVersion, updateNotice, } from '@slatesvideo/shared';
|
|
10
10
|
// Slates MCP server. Stdio transport. Wires every operation in
|
|
11
11
|
// @slatesvideo/shared as an MCP tool. Both the desktop server and the
|
|
12
12
|
// cloud API are reached through env-discovered creds in
|
|
@@ -333,8 +333,24 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
|
333
333
|
if (typeof data?.prompt_warning === 'string' && data.prompt_warning) {
|
|
334
334
|
warn(data.prompt_warning);
|
|
335
335
|
}
|
|
336
|
+
// The router rides the first result of a connection that has not opened it (ROUTER_NOTICE says why): as its
|
|
337
|
+
// own text block, so the result's own text still parses as the JSON many ops return, and in structured
|
|
338
|
+
// content, which is all Claude Code shows the model when it is present. Only on an op that spends nothing:
|
|
339
|
+
// a billable op's result reports a spend, and the router read there comes after the money is gone. A guide
|
|
340
|
+
// answer counts (an agent that opens a playbook first gets the router with it); the router's own answer
|
|
341
|
+
// marks it read and carries the user's brain itself.
|
|
342
|
+
let notice = null;
|
|
343
|
+
if (!op.billable && !guidesRead.has(BRAIN_ROUTER)) {
|
|
344
|
+
guidesRead.add(BRAIN_ROUTER);
|
|
345
|
+
// The user's own brain comes before the router, as in Director (plan § My brain), unless this answer was it.
|
|
346
|
+
const mine = op.id === 'slates_get_prompting_guide' && data?.topic === MY_BRAIN_TOPIC ? '' : myBrainPreload();
|
|
347
|
+
notice = mine ? `${mine}\n\n${ROUTER_NOTICE}` : ROUTER_NOTICE;
|
|
348
|
+
if (data && typeof data === 'object' && !Array.isArray(data))
|
|
349
|
+
data = { ...data, brain_router: notice };
|
|
350
|
+
}
|
|
336
351
|
const content = [
|
|
337
352
|
{ type: 'text', text: result.text },
|
|
353
|
+
...(notice ? [{ type: 'text', text: notice }] : []),
|
|
338
354
|
];
|
|
339
355
|
for (const img of result.images ?? []) {
|
|
340
356
|
content.push({ type: 'image', data: img.data, mimeType: img.mimeType });
|
|
@@ -364,29 +380,40 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
|
364
380
|
// tool call the model had to decide to make — measured at 13% compliance. As a
|
|
365
381
|
// prompt, the skill shows up in the host's own picker and the USER can invoke
|
|
366
382
|
// it, which is a completely different actor making the decision.
|
|
383
|
+
/** The bundled skills with the user's My brain laid over them, read per request like the guide op (theirs wins a name). */
|
|
384
|
+
const skillsNow = () => brainSkills().skills;
|
|
367
385
|
/** First sentence of the frontmatter description — the picker's one-liner. */
|
|
368
|
-
function skillSummary(name) {
|
|
369
|
-
const { description } = parseSkillMetadata(
|
|
386
|
+
function skillSummary(name, skills = skillsNow()) {
|
|
387
|
+
const { description } = parseSkillMetadata(skills[name], name);
|
|
370
388
|
const first = description.split(/(?<=\.)\s/)[0];
|
|
371
389
|
return first.length > 300 ? `${first.slice(0, 297)}…` : first;
|
|
372
390
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
391
|
+
/** The names at launch, for the resource template's description and the startup line; requests read skillsNow(). */
|
|
392
|
+
const SKILL_NAMES = Object.keys(skillsNow()).sort();
|
|
393
|
+
server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
|
394
|
+
const skills = skillsNow();
|
|
395
|
+
return {
|
|
396
|
+
prompts: Object.keys(skills).sort().map((name) => ({
|
|
397
|
+
name,
|
|
398
|
+
title: name.replace(/^slates-/, '').replace(/-/g, ' '),
|
|
399
|
+
description: skillSummary(name, skills),
|
|
400
|
+
})),
|
|
401
|
+
};
|
|
402
|
+
});
|
|
381
403
|
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
382
404
|
const name = request.params.name;
|
|
383
|
-
const
|
|
405
|
+
const brain = brainSkills();
|
|
406
|
+
const skills = brain.skills;
|
|
407
|
+
const content = skills[name];
|
|
384
408
|
if (content === undefined) {
|
|
385
|
-
throw new Error(`Unknown prompt: ${name}. Available: ${
|
|
409
|
+
throw new Error(`Unknown prompt: ${name}. Available: ${Object.keys(skills).sort().join(', ')}`);
|
|
386
410
|
}
|
|
387
411
|
guidesRead.add(name);
|
|
412
|
+
// Served is used: a My brain file read this way keeps its date, so archiveUnused never takes a file in use.
|
|
413
|
+
if (brain.mine.has(name))
|
|
414
|
+
noteUsed(name);
|
|
388
415
|
return {
|
|
389
|
-
description: skillSummary(name),
|
|
416
|
+
description: skillSummary(name, skills),
|
|
390
417
|
messages: [{ role: 'user', content: { type: 'text', text: content } }],
|
|
391
418
|
};
|
|
392
419
|
});
|
|
@@ -488,10 +515,14 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
|
488
515
|
}
|
|
489
516
|
const skill = /^slates:\/\/skill\/(.+)$/.exec(uri);
|
|
490
517
|
if (skill) {
|
|
491
|
-
const
|
|
518
|
+
const name = decodeURIComponent(skill[1]);
|
|
519
|
+
const brain = brainSkills();
|
|
520
|
+
const content = Object.hasOwn(brain.skills, name) ? brain.skills[name] : undefined;
|
|
492
521
|
if (content === undefined)
|
|
493
522
|
throw new Error(`Unknown skill: ${skill[1]}`);
|
|
494
|
-
guidesRead.add(
|
|
523
|
+
guidesRead.add(name);
|
|
524
|
+
if (brain.mine.has(name))
|
|
525
|
+
noteUsed(name);
|
|
495
526
|
return content;
|
|
496
527
|
}
|
|
497
528
|
const shots = /^slates:\/\/project\/([^/]+)\/shots$/.exec(uri);
|
|
@@ -523,6 +554,16 @@ async function main() {
|
|
|
523
554
|
console.error(`[slates-mcp] ${updateAdvice}`);
|
|
524
555
|
// Background refresh; the result is read by the next launch, never awaited.
|
|
525
556
|
void refreshLatestVersion(PKG_NAME);
|
|
557
|
+
// The playbooks, rules and model guides by the account's tier (shared skills/served.ts): the cache serves this
|
|
558
|
+
// session at once, and the first guide answer waits for this check if it is still in flight.
|
|
559
|
+
void refreshServedBrain(() => new SlatesCloudClient()).then((brain) => {
|
|
560
|
+
console.error(`[slates-mcp] brain: ${Object.keys(brain.files).length} files from the ${brain.source}${brain.problem ? ` (${brain.problem})` : ''}`);
|
|
561
|
+
});
|
|
562
|
+
// My brain files long unused move to its archive/ (skills/my-brain.ts): at most once a day, and never
|
|
563
|
+
// fatal, since a server starts with every client session.
|
|
564
|
+
const archived = archiveUnusedDaily();
|
|
565
|
+
if (archived.length)
|
|
566
|
+
console.error(`[slates-mcp] My brain: archived ${archived.length} file(s) unused for ${ARCHIVE_AFTER_DAYS} days: ${archived.join(', ')}`);
|
|
526
567
|
console.error(`[slates-mcp] server started, v${pkg.version}, ${ops.length} tools registered, ` +
|
|
527
568
|
`${SKILL_NAMES.length} skills as prompts, 3 resources + 2 templates, ` +
|
|
528
569
|
`${instructions.length} chars of agent doctrine sent as instructions`);
|
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.4",
|
|
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.8",
|
|
54
54
|
"zod": "^3.23.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|