@slatesvideo/mcp-server 0.6.6 → 0.6.8

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 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 -->196<!-- /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.
78
+ <!-- gen:tool-count -->202<!-- /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 -->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**.
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 -->51<!-- /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
@@ -2,11 +2,12 @@
2
2
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
5
- import { readFileSync } from 'node:fs';
5
+ import { spawn } from 'node:child_process';
6
+ import { existsSync, readFileSync } from 'node:fs';
6
7
  import { join, dirname } from 'node:path';
7
8
  import { fileURLToPath } from 'node:url';
8
9
  import { z } from 'zod';
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
+ 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, readMcpLauncher, setDesktopClientIdentity, } from '@slatesvideo/shared';
10
11
  // Slates MCP server. Stdio transport. Wires every operation in
11
12
  // @slatesvideo/shared as an MCP tool. Both the desktop server and the
12
13
  // cloud API are reached through env-discovered creds in
@@ -46,15 +47,25 @@ const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url))
46
47
  // scripts/agent-surface-lockstep-check.mjs pins the byte count so growth is a
47
48
  // review decision, not an accident.
48
49
  const PKG_NAME = '@slatesvideo/mcp-server';
50
+ // 🚨 THE COPY INSIDE THE SLATES APP (since 0.6.7, 2026-10-31). The desktop app carries this server,
51
+ // started by the app's own binary as Node with SLATES_MCP_BUNDLED=1 (slate
52
+ // `src/main/agent/mcpLauncher.ts`), so it is always the version that matches the app and updates
53
+ // with it. That copy never checks npm: the app's own update is its update. Its version line is no
54
+ // longer than the npm one, so the instructions' ceiling (check 2) holds for both.
55
+ const BUNDLED = process.env.SLATES_MCP_BUNDLED === '1';
56
+ setDesktopClientIdentity(`mcp-server/${pkg.version}${BUNDLED ? ' bundled' : ''}`);
49
57
  // The first line names the running version so an agent can answer "what
50
58
  // version am I on"; the notice appears only when the on-disk cache (refreshed
51
59
  // in main(), for the NEXT launch) says a newer package is published. Read the
52
60
  // design note in @slatesvideo/shared update-check.ts before changing either.
53
- const updateAdvice = updateNotice(PKG_NAME, pkg.version, cachedLatestVersion(PKG_NAME), 'Newer models are missing until it updates. Tell the user in your FIRST reply: fully quit and reopen the MCP client so npx fetches it; a global install needs `npm i -g @slatesvideo/mcp-server@latest` first.');
61
+ const updateAdvice = BUNDLED ? null : updateNotice(PKG_NAME, pkg.version, cachedLatestVersion(PKG_NAME), 'Newer models are missing until it updates. Tell the user in your FIRST reply: fully quit and reopen the MCP client so npx fetches it; a global install needs `npm i -g @slatesvideo/mcp-server@latest` first.');
62
+ const versionLine = BUNDLED
63
+ ? `Slates MCP server v${pkg.version} (inside the Slates app).`
64
+ : `Slates MCP server v${pkg.version} (${PKG_NAME}).`;
54
65
  const doctrine = buildMcpInstructions();
55
66
  const firstParagraphEnd = doctrine.indexOf('\n\n');
56
67
  const instructions = [
57
- `Slates MCP server v${pkg.version} (${PKG_NAME}).`,
68
+ versionLine,
58
69
  doctrine.slice(0, firstParagraphEnd),
59
70
  updateAdvice,
60
71
  doctrine.slice(firstParagraphEnd + 2),
@@ -545,7 +556,59 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
545
556
  ],
546
557
  };
547
558
  });
559
+ /**
560
+ * 🚨 AN npm COPY HANDS OFF TO THE APP'S OWN. Started from npm (`npx -y @slatesvideo/mcp-server`, a
561
+ * global install, a directory plugin pinned to an old version) on a computer whose Slates app
562
+ * carries this server, this process starts the app's copy on the same stdin and stdout and only
563
+ * relays its exit. The client then always talks to the server that matches the installed app,
564
+ * whatever it was configured with, which ends the drift a customer hit on 2026-10-31 (an old npm
565
+ * copy without the transition tools, an app that had them).
566
+ *
567
+ * Only a copy with no `src/` beside its `dist/` hands off (the npm package and the Claude Desktop
568
+ * `.mcpb` bundle ship none): a server built in this repo (the checks, a developer's own client
569
+ * config) runs as itself. SLATES_MCP_NO_HANDOFF=1 keeps any copy as itself. Resolves to
570
+ * the exit code to leave with, or null to run here (no app copy, or it could not start).
571
+ */
572
+ function handOffToApp() {
573
+ if (BUNDLED || process.env.SLATES_MCP_NO_HANDOFF === '1')
574
+ return null;
575
+ if (existsSync(join(dirname(fileURLToPath(import.meta.url)), '..', 'src')))
576
+ return null;
577
+ const launcher = readMcpLauncher();
578
+ if (!launcher)
579
+ return null;
580
+ console.error(`[slates-mcp] v${pkg.version}: starting the Slates app's own server, v${launcher.version}`);
581
+ return new Promise((resolve) => {
582
+ const child = spawn(launcher.command, launcher.args, {
583
+ stdio: 'inherit',
584
+ env: { ...process.env, ...launcher.env },
585
+ windowsHide: true,
586
+ });
587
+ let started = false;
588
+ child.on('spawn', () => {
589
+ started = true;
590
+ // Only once the app's copy runs: a copy that falls back to itself keeps Node's own exit on a signal.
591
+ for (const signal of ['SIGINT', 'SIGTERM'])
592
+ process.on(signal, () => child.kill(signal));
593
+ });
594
+ // A launch that fails before it starts (the app moved since it wrote the file) runs this copy:
595
+ // nothing has read stdin yet, so the client is none the wiser.
596
+ child.on('error', (err) => {
597
+ if (started)
598
+ return;
599
+ console.error(`[slates-mcp] the app's server did not start (${err.message}); running v${pkg.version} instead`);
600
+ resolve(null);
601
+ });
602
+ child.on('exit', (code, signal) => resolve(code ?? (signal ? 1 : 0)));
603
+ });
604
+ }
548
605
  async function main() {
606
+ const handoff = handOffToApp();
607
+ if (handoff) {
608
+ const code = await handoff;
609
+ if (code !== null)
610
+ process.exit(code);
611
+ }
549
612
  if (process.argv.includes('--tools=compact'))
550
613
  console.error('[slates-mcp] --tools=compact is deprecated; the server always exposes the full fixed tool list. Clients control selective loading.');
551
614
  const transport = new StdioServerTransport();
@@ -553,7 +616,8 @@ async function main() {
553
616
  if (updateAdvice)
554
617
  console.error(`[slates-mcp] ${updateAdvice}`);
555
618
  // Background refresh; the result is read by the next launch, never awaited.
556
- void refreshLatestVersion(PKG_NAME);
619
+ if (!BUNDLED)
620
+ void refreshLatestVersion(PKG_NAME);
557
621
  // The playbooks, rules and model guides by the account's tier (shared skills/served.ts): the cache serves this
558
622
  // session at once, and the first guide answer waits for this check if it is still in flight.
559
623
  void refreshServedBrain(() => new SlatesCloudClient()).then((brain) => {
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.6",
4
+ "version": "0.6.8",
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.10",
53
+ "@slatesvideo/shared": "^0.7.12",
54
54
  "zod": "^3.23.0"
55
55
  },
56
56
  "devDependencies": {