@simpligen/mcp 0.1.1 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpligen/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server for SimpliGen -- drive local/cloud AI image & video generation from an agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/bin.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  // packages/mcp-server/src/bin.js
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { ControlApiClient } from './client.js';
package/src/client.js CHANGED
@@ -46,6 +46,7 @@ export class ControlApiClient {
46
46
  getStatus() { return this.#req('GET', '/status'); }
47
47
  listProjects() { return this.#req('GET', '/projects'); }
48
48
  createProject(name) { return this.#req('POST', '/projects', { name }); }
49
+ listLoras() { return this.#req('GET', '/loras'); }
49
50
  generate(args) { return this.#req('POST', '/generate', args); }
50
51
  getJob(id) { return this.#req('GET', `/jobs/${encodeURIComponent(id)}`); }
51
52
  listJobs() { return this.#req('GET', '/jobs'); }
package/src/tools.js CHANGED
@@ -7,7 +7,7 @@ import { buildResultImageContent } from './resultImage.js';
7
7
 
8
8
  export const TOOL_NAMES = [
9
9
  'list_capabilities', 'get_status', 'list_projects', 'create_project',
10
- 'upload_file', 'generate', 'get_job', 'wait_for_result', 'list_jobs',
10
+ 'upload_file', 'generate', 'list_loras', 'get_job', 'wait_for_result', 'list_jobs',
11
11
  'cancel_job', 'prepare_preset', 'get_result_image',
12
12
  'list_characters', 'get_character', 'list_character_features', 'list_character_presets',
13
13
  'remove_character', 'create_character', 'generate_character_image', 'generate_character_video',
@@ -50,11 +50,16 @@ export function registerTools(server, client) {
50
50
  image: z.string().optional().describe('upload_file handle'),
51
51
  referenceImages: z.array(z.string()).optional().describe('upload_file handles'),
52
52
  video: z.string().optional().describe('upload_file handle (driving video)'),
53
+ loras: z.array(z.object({ name: z.string().describe('LoRA display name from list_loras'), weight: z.number().optional().describe('Strength; defaults to the LoRA default') })).optional().describe('LoRAs to apply. Local backend only, and only for presets where inputs.supportsLoras is true. Use the LoRA trigger words in the prompt so it activates.'),
53
54
  options: z.object({ resolution: z.string().optional(), aspectRatio: z.string().optional().describe('Aspect ratio, e.g. "1:1", "16:9", "9:16" (portrait/vertical), "4:3", "3:4". See list_capabilities -> options.aspectRatio for the values each preset accepts. Defaults to 1:1 for images (16:9 for video) if omitted.'), durationSeconds: z.number().optional(), steps: z.number().optional(), cfg: z.number().optional(), seed: z.number().optional() }).optional(),
54
55
  },
55
56
  },
56
57
  wrap((args) => client.generate(args)));
57
58
 
59
+ server.registerTool('list_loras',
60
+ { title: 'List LoRAs', description: 'List the installed user LoRAs (name, base model, trigger words) so you can pass them in generate -> loras.', inputSchema: {} },
61
+ wrap(() => client.listLoras()));
62
+
58
63
  server.registerTool('get_job',
59
64
  { title: 'Get job', description: 'Status + result of a generation job. resultPath is the local file when completed.', inputSchema: { jobId: z.string() } },
60
65
  wrap(({ jobId }) => client.getJob(jobId)));