@slatesvideo/mcp-server 0.5.10 → 0.5.12

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 (2) hide show
  1. package/dist/server.js +17 -3
  2. package/package.json +2 -2
package/dist/server.js CHANGED
@@ -6,7 +6,7 @@ import { zodToJsonSchema } from 'zod-to-json-schema';
6
6
  import { readFileSync } from 'node:fs';
7
7
  import { join, dirname } from 'node:path';
8
8
  import { fileURLToPath } from 'node:url';
9
- import { ALL_OPERATIONS, defaultContext, } from '@slatesvideo/shared';
9
+ import { ALL_OPERATIONS, buildAgentDoctrine, defaultContext, } 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
@@ -22,7 +22,20 @@ const opsById = new Map(ops.map((o) => [o.id, o]));
22
22
  // Version comes from this package's own package.json (dist/server.js →
23
23
  // ../package.json) so the reported version never drifts from the publish.
24
24
  const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json'), 'utf8'));
25
- const server = new Server({ name: 'slates-studio', version: pkg.version }, { capabilities: { tools: {} } });
25
+ // The MCP protocol carries a field for exactly this, and it sat unused: a
26
+ // Claude Code / Cursor / Codex user got tool descriptions and nothing else —
27
+ // no working method, no REAL NUMBERS rule, no guide index, while the desktop
28
+ // Studio Agent had 37K characters of all three. Same doctrine, one source
29
+ // (@slatesvideo/shared → prompts/agent-doctrine.ts), surface-aware only where
30
+ // the mechanism genuinely differs.
31
+ //
32
+ // ⚠️ SIZE IS DELIBERATE. This is injected into EVERY client session and some
33
+ // clients truncate or ignore long instructions, so it ships the working method
34
+ // + hard rules + guide index and leaves the long-form skills to
35
+ // slates_get_prompting_guide. scripts/agent-surface-lockstep-check.mjs pins the
36
+ // byte count so growth is a review decision, not an accident.
37
+ const instructions = buildAgentDoctrine({ surface: 'mcp' });
38
+ const server = new Server({ name: 'slates-studio', version: pkg.version }, { capabilities: { tools: {} }, instructions });
26
39
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
27
40
  tools: ops.map((op) => ({
28
41
  name: op.id,
@@ -60,7 +73,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
60
73
  async function main() {
61
74
  const transport = new StdioServerTransport();
62
75
  await server.connect(transport);
63
- console.error(`[slates-mcp] server started, ${ops.length} tools registered`);
76
+ console.error(`[slates-mcp] server started, ${ops.length} tools registered, ` +
77
+ `${instructions.length} chars of agent doctrine sent as instructions`);
64
78
  }
65
79
  main().catch((err) => {
66
80
  console.error('[slates-mcp] fatal:', err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slatesvideo/mcp-server",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "description": "MCP server for the Slates desktop app. Your AI agent (Claude, Cursor, or any MCP client) drives a local AI video studio: projects, characters, storyboards, image and video generation. Files land on disk.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@modelcontextprotocol/sdk": "^1.0.0",
53
- "@slatesvideo/shared": "^0.6.1",
53
+ "@slatesvideo/shared": "^0.6.3",
54
54
  "zod": "^3.23.0",
55
55
  "zod-to-json-schema": "^3.23.0"
56
56
  },