@instavar/mcp-server 0.1.1 → 0.1.3
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 +22 -11
- package/dist/index.js +69 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -37,20 +37,31 @@ no data of its own.
|
|
|
37
37
|
|
|
38
38
|
## Tools
|
|
39
39
|
|
|
40
|
-
| Tool
|
|
41
|
-
|
|
|
42
|
-
| `list_jobs`
|
|
43
|
-
| `get_job_status`
|
|
44
|
-
| `get_video_state`
|
|
45
|
-
| `get_job_metrics`
|
|
46
|
-
| `get_cost_summary`
|
|
47
|
-
| `create_video_brief`
|
|
48
|
-
| `edit_video_brief`
|
|
49
|
-
| `approve_job`
|
|
50
|
-
| `publish_job`
|
|
40
|
+
| Tool | What it does |
|
|
41
|
+
| ------------------------ | --------------------------------------------------------------- |
|
|
42
|
+
| `list_jobs` | List recent jobs (newest first). |
|
|
43
|
+
| `get_job_status` | Runs, artifacts, verifications, current video + thumbnail URLs. |
|
|
44
|
+
| `get_video_state` | Materialized composition state for a job. |
|
|
45
|
+
| `get_job_metrics` | Platform engagement snapshots for a published job. |
|
|
46
|
+
| `get_cost_summary` | Infra cost summary (Lambda / RunPod / R2 / WaveSpeed / PoYo). |
|
|
47
|
+
| `create_video_brief` | Create a job from a structured brief and start rendering. |
|
|
48
|
+
| `edit_video_brief` | Patch a brief and re-render. |
|
|
49
|
+
| `approve_job` | Approve a rendered job so it can be published. |
|
|
50
|
+
| `publish_job` | Publish an approved job to its connected social destination. |
|
|
51
|
+
| `connect_account` | Start connecting a social account (headless OAuth pairing). |
|
|
52
|
+
| `connect_account_status` | Poll a pending account connection until it is connected. |
|
|
51
53
|
|
|
52
54
|
Writes require a key with the `write` scope; `publish_job` requires `publish`.
|
|
53
55
|
|
|
56
|
+
### Connecting a social account from the terminal
|
|
57
|
+
|
|
58
|
+
`connect_account` returns an **approve URL** and a short **confirm code**. Open
|
|
59
|
+
the URL in a browser where you are signed in to Instavar, check the code matches
|
|
60
|
+
the one in your terminal, and approve — you go through the platform's normal
|
|
61
|
+
sign-in, then return to Instavar. Poll `connect_account_status` with the returned
|
|
62
|
+
`pairingId` until it reports `connected`. Pairings expire after 10 minutes and
|
|
63
|
+
can only be approved by an owner/admin of the workspace.
|
|
64
|
+
|
|
54
65
|
## CLI
|
|
55
66
|
|
|
56
67
|
```
|
package/dist/index.js
CHANGED
|
@@ -113,6 +113,7 @@ var BRIEF_OBJECTIVES = [
|
|
|
113
113
|
"faq",
|
|
114
114
|
"explainer",
|
|
115
115
|
"customer_story",
|
|
116
|
+
"directions",
|
|
116
117
|
"other"
|
|
117
118
|
];
|
|
118
119
|
var ASPECT_RATIOS = ["9:16", "4:5", "1:1", "16:9"];
|
|
@@ -163,6 +164,44 @@ var briefSceneSchema = z.object({
|
|
|
163
164
|
src: z.string().optional(),
|
|
164
165
|
caption: z.string().optional()
|
|
165
166
|
});
|
|
167
|
+
var directionsBriefSchema = z.object({
|
|
168
|
+
subtitle: z.string().optional(),
|
|
169
|
+
unitLabel: z.string().optional(),
|
|
170
|
+
distanceTimeChip: z.string().optional(),
|
|
171
|
+
clips: z.array(
|
|
172
|
+
z.object({
|
|
173
|
+
src: z.string(),
|
|
174
|
+
trimStartSeconds: z.number().optional(),
|
|
175
|
+
trimEndSeconds: z.number(),
|
|
176
|
+
speed: z.number().optional(),
|
|
177
|
+
mirrorFlip: z.boolean().optional()
|
|
178
|
+
})
|
|
179
|
+
).min(1),
|
|
180
|
+
cues: z.array(
|
|
181
|
+
z.object({
|
|
182
|
+
atSeconds: z.number(),
|
|
183
|
+
text: z.string(),
|
|
184
|
+
arrow: z.enum(["left", "right", "forward"]).optional(),
|
|
185
|
+
step: z.number().optional()
|
|
186
|
+
})
|
|
187
|
+
),
|
|
188
|
+
outro: z.object({
|
|
189
|
+
heading: z.string().optional(),
|
|
190
|
+
body: z.array(z.string()).optional(),
|
|
191
|
+
seconds: z.number().optional()
|
|
192
|
+
}).optional(),
|
|
193
|
+
music: z.object({
|
|
194
|
+
perSegment: z.array(
|
|
195
|
+
z.object({
|
|
196
|
+
src: z.string(),
|
|
197
|
+
clipIndexStart: z.number().optional(),
|
|
198
|
+
hotOffsetSeconds: z.number().optional(),
|
|
199
|
+
volume: z.number().optional()
|
|
200
|
+
})
|
|
201
|
+
).optional(),
|
|
202
|
+
crossfadeSeconds: z.number().optional()
|
|
203
|
+
}).optional()
|
|
204
|
+
});
|
|
166
205
|
var createBriefShape = {
|
|
167
206
|
title: z.string().min(1).max(120).describe("Short title (max 120 chars)"),
|
|
168
207
|
script: z.string().min(1).describe("Full narration script (sent to TTS)"),
|
|
@@ -173,7 +212,10 @@ var createBriefShape = {
|
|
|
173
212
|
steps: z.array(briefStepSchema).optional().describe("Structured steps for educational content (LaTeX)"),
|
|
174
213
|
scenes: z.array(briefSceneSchema).optional().describe("Scene graph for the UniversalVideo composition"),
|
|
175
214
|
aspectRatio: z.enum(ASPECT_RATIOS).default("9:16").describe("Aspect ratio (default 9:16)"),
|
|
176
|
-
compositionId: z.string().optional().describe("Remotion composition ID override (advanced)")
|
|
215
|
+
compositionId: z.string().optional().describe("Remotion composition ID override (advanced)"),
|
|
216
|
+
directions: directionsBriefSchema.optional().describe(
|
|
217
|
+
"DirectionsWalkthrough 'find-us' payload: source clips (legs), decision-point cues on the realtime walk timeline, outro, and optional music. Set compositionId 'DirectionsWalkthrough' (or objective 'directions')."
|
|
218
|
+
)
|
|
177
219
|
};
|
|
178
220
|
var editBriefShape = {
|
|
179
221
|
jobId: z.string().uuid().describe("The job to edit"),
|
|
@@ -297,6 +339,32 @@ function registerTools(server) {
|
|
|
297
339
|
runTool(() => apiPost(`/api/jobs/${encodeURIComponent(jobId)}/publish`, rest))
|
|
298
340
|
)
|
|
299
341
|
);
|
|
342
|
+
server.tool(
|
|
343
|
+
"connect_account",
|
|
344
|
+
"Start connecting a social account headlessly (no local browser needed). Returns an approve URL + a short confirm code: open the URL in a browser signed in to Instavar, check the code matches THIS terminal, and approve. Then poll connect_account_status with the returned pairingId until it reports 'connected'.",
|
|
345
|
+
{
|
|
346
|
+
provider: z2.enum([
|
|
347
|
+
"youtube",
|
|
348
|
+
"x",
|
|
349
|
+
"tiktok",
|
|
350
|
+
"linkedin",
|
|
351
|
+
"facebook",
|
|
352
|
+
"instagram",
|
|
353
|
+
"threads"
|
|
354
|
+
]).describe("The social platform to connect")
|
|
355
|
+
},
|
|
356
|
+
async ({ provider }) => runTool(() => apiPost(`/api/v1/connect/start`, { provider }))
|
|
357
|
+
);
|
|
358
|
+
server.tool(
|
|
359
|
+
"connect_account_status",
|
|
360
|
+
"Poll a pending account connection started by connect_account. Returns status 'pending' | 'connected' | 'expired', plus the connected account label once connected.",
|
|
361
|
+
{ pairingId: uuid("The pairingId returned by connect_account") },
|
|
362
|
+
async ({ pairingId }) => runTool(
|
|
363
|
+
() => apiGet(
|
|
364
|
+
`/api/v1/connect/poll?pairingId=${encodeURIComponent(pairingId)}`
|
|
365
|
+
)
|
|
366
|
+
)
|
|
367
|
+
);
|
|
300
368
|
}
|
|
301
369
|
|
|
302
370
|
// src/index.ts
|
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instavar/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"mcpName": "com.instavar/mcp-server",
|
|
4
5
|
"description": "Instavar Studio MCP server — drive the full video create→render→approve→publish→metrics workflow from Claude Code or Codex with an API key.",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"homepage": "https://instavar.com",
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/
|
|
11
|
-
|
|
11
|
+
"url": "https://github.com/instavar/mcp-server.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/instavar/mcp-server/issues"
|
|
12
15
|
},
|
|
13
16
|
"keywords": ["mcp", "model-context-protocol", "instavar", "video", "claude", "codex"],
|
|
14
17
|
"bin": {
|