@slatesvideo/mcp-server 0.5.20 → 0.6.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.
Files changed (3) hide show
  1. package/README.md +15 -4
  2. package/dist/server.js +30 -12
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @slatesvideo/mcp-server
2
2
 
3
- MCP server for the [Slates](https://slates.video) desktop app. Your AI agent (ChatGPT via Codex, Claude, Cursor, or another local MCP client) drives a local video studio: it creates projects, builds characters and storyboards, generates images and videos, and organizes assets. Files land on disk, and the Slates app updates live as the agent works.
3
+ MCP server for the [Slates](https://slates.video) desktop app. Your AI agent (ChatGPT via Codex, Claude, Cursor, or another local MCP client) drives a local video studio: it creates projects, builds characters and boards, generates images and videos, and organizes assets. Files land on disk, and the Slates app updates live as the agent works.
4
4
 
5
5
  ## Requirements
6
6
 
@@ -68,16 +68,16 @@ Add the same entry to `~/.cursor/mcp.json`:
68
68
 
69
69
  The server reads its credentials from `~/.slates/agent-connection.json`. Two ways to create it:
70
70
 
71
- 1. In the Slates app: **Settings → Agent Control → enter your email → Send link**. Click the link in your email. Done.
71
+ 1. In the Slates app: **Settings → AI tools → enter your email → Send link**. Click the link in your email. Done.
72
72
  2. From a terminal: `npx @slatesvideo/cli login`.
73
73
 
74
74
  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 -->92<!-- /gen:tool-count --> tools covering the full workspace: project, folder, character, environment, style, and storyboard management (create / update / delete), image generation and surgical image editing (<!-- gen:image-roster -->Nano Banana 2 (Gemini 3.1 Flash Image), Nano Banana 2 Lite, Nano Banana Pro, GPT Image 2.5 Flare, GPT Image 2.5 Sunburst, FLUX.2 Max, 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, veo-3.1-fast, veo-3.1-standard, Seedance 2.0, Seedance 2.5, Gemini Omni Flash, MiniMax H3, MiniMax H3 Max, 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 -->142<!-- /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 (Gemini 3.1 Flash Image), Nano Banana 2 Lite, Nano Banana Pro, GPT Image 2.5 Flare, GPT Image 2.5 Sunburst, FLUX.2 Max, 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, veo-3.1-fast, veo-3.1-standard, Seedance 2.0, Seedance 2.5, Gemini Omni Flash, 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 -->34<!-- /gen:skill-count --> bundled skills 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 -->37<!-- /gen:skill-count --> bundled skills 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
 
@@ -86,3 +86,14 @@ The timeline, export, background-generation, edit-image, and image-reference too
86
86
  - Website: [slates.video](https://slates.video)
87
87
  - Source: [github.com/EricDisero/slates-mcp](https://github.com/EricDisero/slates-mcp)
88
88
  - Issues: [github.com/EricDisero/slates-mcp/issues](https://github.com/EricDisero/slates-mcp/issues)
89
+
90
+ ### Context on demand
91
+
92
+ The server starts with a small workspace/discovery tool set. Use `slates_load_tools` with `query`
93
+ to find a capability, then `names` to load its exact schemas. A named/group load replaces the optional
94
+ selection and emits `tools/list_changed`; existing direct operation names remain callable.
95
+ `--tools=flat` restores the complete listing for clients that need it.
96
+
97
+ `slates_get_prompting_guide` returns a short readable card by default. Use `query` for a section or
98
+ cinematic technique ID, `depth: "index"` for headings, or `depth: "full"` for the complete guide.
99
+ Both text and structured content include the actual guide body. No extra loading hook is required.
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, SKILLS, MODEL_CAPABILITIES, MODEL_FACTS, SlatesCloudClient, buildAgentDoctrine, APP_MANUAL, defaultContext, toolDefinitions, cachedLatestVersion, refreshLatestVersion, updateNotice, } from '@slatesvideo/shared';
9
+ import { ALL_OPERATIONS, SKILLS, MODEL_CAPABILITIES, MODEL_FACTS, SlatesCloudClient, buildAgentDoctrine, APP_MANUAL, defaultContext, toolDefinitions, STARTUP_TOOL_IDS, 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
@@ -57,7 +57,7 @@ const instructions = [
57
57
  ].filter((part) => !!part).join('\n\n');
58
58
  const server = new Server({ name: 'slates-studio', version: pkg.version }, {
59
59
  capabilities: {
60
- tools: {},
60
+ tools: { listChanged: true },
61
61
  // Every bundled skill, offered in the host's own picker rather than
62
62
  // only through a tool call the model has to decide to make.
63
63
  prompts: {},
@@ -77,9 +77,11 @@ const server = new Server({ name: 'slates-studio', version: pkg.version }, {
77
77
  // of the ID SET and unproven of the BYTES. `toolDefinitions()` in shared is now
78
78
  // the only renderer either one calls, and the lockstep check compares them.
79
79
  //
80
- // `surface: 'mcp'` sends every op: a stdio server has no run to append to, and
81
- // Claude Code already defers stdio tool schemas through its own tool search.
80
+ // Render once; listing filters startup + connection selection below. Direct calls
81
+ // retain access to every operation for clients that do not refresh their listing.
82
82
  const TOOLS = toolDefinitions(ops, { surface: 'mcp' });
83
+ const flatTools = process.argv.includes('--tools=flat');
84
+ let selectedTools = new Set();
83
85
  /**
84
86
  * Output schemas for the ops whose result shape is STABLE.
85
87
  *
@@ -105,13 +107,20 @@ const OUTPUT_SCHEMAS = {
105
107
  message: { type: 'string' },
106
108
  },
107
109
  },
110
+ // 🚨 The op returns `error: null` and `asset: null` on every in-flight poll
111
+ // and `error: null` on every success; clients validate against this schema,
112
+ // so non-nullable types here rejected EVERY status call (user report
113
+ // 2026-09-14, twelve days after the schema shipped). 'unknown' is the
114
+ // desktop's not-found answer. mcp-instructions-smoke replays these payloads.
108
115
  slates_get_generation_status: {
109
116
  type: 'object',
110
117
  properties: {
111
- status: { type: 'string', enum: ['pending', 'processing', 'completed', 'failed', 'cancelled'] },
112
- error: { type: 'string' },
113
- asset: { type: 'object' },
114
- cost_credits: { type: 'number' },
118
+ status: { type: 'string', enum: ['pending', 'processing', 'completed', 'failed', 'cancelled', 'unknown'] },
119
+ error: { type: ['string', 'null'] },
120
+ asset: { type: ['object', 'null'] },
121
+ cost_credits: { type: ['number', 'null'] },
122
+ model: { type: 'string' },
123
+ completed_at: { type: ['string', 'null'] },
115
124
  },
116
125
  },
117
126
  slates_get_credit_balance: {
@@ -137,7 +146,7 @@ const OUTPUT_SCHEMAS = {
137
146
  },
138
147
  };
139
148
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
140
- tools: TOOLS.map((t) => ({
149
+ tools: TOOLS.filter((t) => flatTools || STARTUP_TOOL_IDS.has(t.name) || selectedTools.has(t.name)).map((t) => ({
141
150
  name: t.name,
142
151
  description: t.description,
143
152
  inputSchema: t.inputSchema,
@@ -276,7 +285,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
276
285
  if (ticker)
277
286
  clearInterval(ticker);
278
287
  }
279
- const data = result.data;
288
+ let data = result.data;
289
+ if (op.id === 'slates_load_tools' && Array.isArray(data?.tools)) {
290
+ selectedTools = new Set(data.tools.map((t) => t.name));
291
+ await server.sendToolListChanged().catch(() => { });
292
+ }
280
293
  // The one place the server can ask the USER instead of the model.
281
294
  //
282
295
  // 🚨 GATED ON THE OP HAVING A `confirm` INPUT, not merely on the flag.
@@ -288,10 +301,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
288
301
  if (data?.requires_confirm === true && opTakesConfirm(op) && clientSupportsElicitation()) {
289
302
  const answer = await elicitConfirm(typeof data.message === 'string' ? data.message : result.text);
290
303
  if (answer === true) {
291
- result = await op.run({ ...args, confirm: true }, {
304
+ // A quote that carries a fingerprint (`slates_generate_from_shots`) is
305
+ // fired only with it: the user approved THAT quote, and a changed
306
+ // recipe must still refuse.
307
+ const fingerprint = typeof data.fingerprint === 'string' ? { fingerprint: data.fingerprint } : {};
308
+ result = await op.run({ ...args, ...fingerprint, confirm: true }, {
292
309
  ...defaultContext(),
293
310
  signal: extra?.signal,
294
311
  });
312
+ data = result.data;
295
313
  }
296
314
  else if (answer === false) {
297
315
  return {
@@ -320,7 +338,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
320
338
  }
321
339
  catch (err) {
322
340
  const message = err instanceof Error ? err.message : String(err);
323
- if (/not reachable|Agent Control/i.test(message))
341
+ if (/not reachable|is not running|AI tools|Agent Control/i.test(message))
324
342
  warn(message);
325
343
  return {
326
344
  content: [{ type: 'text', text: `Error: ${message}` }],
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@slatesvideo/mcp-server",
3
- "version": "0.5.20",
3
+ "mcpName": "io.github.EricDisero/slates",
4
+ "version": "0.6.0",
4
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.",
5
6
  "license": "MIT",
6
7
  "type": "module",
@@ -50,7 +51,7 @@
50
51
  },
51
52
  "dependencies": {
52
53
  "@modelcontextprotocol/sdk": "^1.0.0",
53
- "@slatesvideo/shared": "^0.6.11",
54
+ "@slatesvideo/shared": "^0.7.0",
54
55
  "zod": "^3.23.0"
55
56
  },
56
57
  "devDependencies": {