@ssemble/mcp-server 1.1.10 → 1.1.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.
- package/README.md +13 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/api/client.js +1 -1
- package/src/resources/static-data.js +1 -1
- package/src/tools/create-short.js +5 -1
- package/src/transports/apiKey.js +27 -0
- package/src/transports/http.js +4 -3
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ Required: a source (`url` for YouTube or `fileUrl` for a public video file) plus
|
|
|
100
100
|
| Clipping | `preferredLength` (`under30sec` … `under10min`, default `under60sec`), `maxShorts` (1-12), `noClipping` (render the whole range as one clip) |
|
|
101
101
|
| Language | `language` (spoken, ISO 639-1, 54 codes — read the `ssemble://supported-languages` resource), `captionLanguage` (if different) |
|
|
102
102
|
| Captions | `templateId` (from `list_templates`), `captionsEnabled` (default `true`; set `false` for sources that already carry captions) |
|
|
103
|
-
| Framing | `layout` (`auto` / `fill` / `fit` / `square`), `blurBackground` (with `fit`: `true` = blurred copy of the video behind the clip, `false` = the
|
|
103
|
+
| Framing | `layout` (`auto` / `fill` / `fit` / `square`), `blurBackground` (with `fit`: `true` = blurred copy of the video behind the clip, `false` = a solid colour, set it with `backgroundColor` like `#000000`, else the account's saved colour or the template's; omit to use the account's saved editor preference) |
|
|
104
104
|
| Overlays | `hookTitle`, `memeHook` + `memeHookName`, `gameVideo` + `gameVideoName`, `ctaEnabled` + `ctaText` |
|
|
105
105
|
| Music | `music` + `musicName`, `musicVolume` (0-100, default 10) |
|
|
106
106
|
| End-screen outro | `outroEnabled` (default `false`), then `outroText` (≤ 80 chars, default a localized "Please subscribe"), `outroImageUrl` (custom card), `outroSeconds` (1-3, default 2), `outroSting` (bell sound, default `true`), `outroHandle` (e.g. `@mychannel`) |
|
|
@@ -161,6 +161,18 @@ Webhook payload example:
|
|
|
161
161
|
**Get results:**
|
|
162
162
|
> "Show me the clips for request 507f1f77bcf86cd799439011, sorted by viral score"
|
|
163
163
|
|
|
164
|
+
## Remote endpoint (`https://mcp.ssemble.com/mcp`)
|
|
165
|
+
|
|
166
|
+
No install needed — point any Streamable-HTTP MCP client at `https://mcp.ssemble.com/mcp` and send your API key in **any one** of these headers:
|
|
167
|
+
|
|
168
|
+
| Header | Example |
|
|
169
|
+
|--------|---------|
|
|
170
|
+
| `X-Ssemble-API-Key` | `X-Ssemble-API-Key: sk_ssemble_...` |
|
|
171
|
+
| `X-API-Key` | `X-API-Key: sk_ssemble_...` |
|
|
172
|
+
| `Authorization` | `Authorization: Bearer sk_ssemble_...` |
|
|
173
|
+
|
|
174
|
+
Clients that only allow standard headers (for example Claude custom connectors) should use `Authorization: Bearer sk_ssemble_...` or `X-API-Key`.
|
|
175
|
+
|
|
164
176
|
## Environment Variables
|
|
165
177
|
|
|
166
178
|
| Variable | Required | Description |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssemble/mcp-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12",
|
|
4
4
|
"mcpName": "com.ssemble/mcp-server",
|
|
5
5
|
"description": "MCP server for Ssemble AI Clipping — create viral short-form videos from any AI assistant. Webhook callbacks for n8n, Zapier, and Make automation.",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "com.ssemble/mcp-server",
|
|
4
4
|
"title": "Ssemble AI Clipping",
|
|
5
5
|
"description": "Create AI-powered short-form video clips from YouTube videos. Supports webhook callbacks.",
|
|
6
|
-
"version": "1.1.
|
|
6
|
+
"version": "1.1.12",
|
|
7
7
|
"websiteUrl": "https://www.ssemble.com/mcp",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/ssembleinc/ssemble-mcp-server",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
16
16
|
"identifier": "@ssemble/mcp-server",
|
|
17
|
-
"version": "1.1.
|
|
17
|
+
"version": "1.1.12",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
|
20
20
|
},
|
package/src/api/client.js
CHANGED
|
@@ -63,7 +63,7 @@ export class SsembleClient {
|
|
|
63
63
|
if (!this.apiKey) {
|
|
64
64
|
throw new SsembleApiError(401, {
|
|
65
65
|
code: 'missing_api_key',
|
|
66
|
-
message: 'Ssemble API key required.
|
|
66
|
+
message: 'Ssemble API key required. When using the remote endpoint pass it via the X-Ssemble-API-Key header, the X-API-Key header, or "Authorization: Bearer sk_ssemble_..."; for local usage set the SSEMBLE_API_KEY env var. Get your key at https://app.ssemble.com/api-keys',
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
if (!this.apiKey.startsWith('sk_ssemble_')) {
|
|
@@ -28,7 +28,7 @@ const PREFERRED_LENGTHS = {
|
|
|
28
28
|
const LAYOUTS = {
|
|
29
29
|
auto: 'Automatic — AI detects best framing based on speaker position',
|
|
30
30
|
fill: 'Fill — crop to fill 9:16 vertical frame',
|
|
31
|
-
fit: 'Fit — fit entire frame; the area around the video is a blurred copy of the video (default) or
|
|
31
|
+
fit: 'Fit — fit entire frame; the area around the video is a blurred copy of the video (default) or a solid color when blurBackground=false (backgroundColor, e.g. #000000)',
|
|
32
32
|
square: 'Square — 1:1 aspect ratio',
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -44,7 +44,8 @@ const schema = {
|
|
|
44
44
|
outroSeconds: z.number().int().min(1).max(3).default(2).describe('Outro duration in seconds (1-3, default 2). Requires outroEnabled=true.').optional(),
|
|
45
45
|
outroSting: z.boolean().default(true).describe('Play the short bell sound on the outro (default true). Requires outroEnabled=true.').optional(),
|
|
46
46
|
outroHandle: z.string().max(40).describe('Channel handle shown on the outro card, e.g. "@mychannel" (max 40 chars). Requires outroEnabled=true.').optional(),
|
|
47
|
-
blurBackground: z.boolean().describe('Background behind the clip when the source does not fill the 9:16 canvas (mainly layout=fit): true = blurred copy of the video, false = solid template color. Omit to use the account\'s saved editor preference (default: blurred).').optional(),
|
|
47
|
+
blurBackground: z.boolean().describe('Background behind the clip when the source does not fill the 9:16 canvas (mainly layout=fit): true = blurred copy of the video, false = solid color (backgroundColor, else the account\'s saved color, else the template color). Omit to use the account\'s saved editor preference (default: blurred).').optional(),
|
|
48
|
+
backgroundColor: z.string().regex(/^#[0-9a-fA-F]{6}$/).describe('Solid background color as hex, e.g. "#000000". Only with blurBackground=false. Omit to use the account\'s saved background color, else the template color.').optional(),
|
|
48
49
|
webhookUrl: z.string().url().describe('Optional webhook URL for completion/failure notifications. Receives a POST with results when processing finishes.').optional(),
|
|
49
50
|
};
|
|
50
51
|
|
|
@@ -73,6 +74,9 @@ export function registerCreateShort(server, client) {
|
|
|
73
74
|
if (outroExtras.length && params.outroEnabled !== true) {
|
|
74
75
|
return { content: [{ type: 'text', text: formatError({ message: `${outroExtras.join(', ')} require outroEnabled: true`, code: 'invalid_request' }) }], isError: true };
|
|
75
76
|
}
|
|
77
|
+
if (params.backgroundColor !== undefined && params.blurBackground !== false) {
|
|
78
|
+
return { content: [{ type: 'text', text: formatError({ message: 'backgroundColor requires blurBackground: false', code: 'invalid_request' }) }], isError: true };
|
|
79
|
+
}
|
|
76
80
|
|
|
77
81
|
try {
|
|
78
82
|
const result = await client.createShort(params);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the Ssemble API key for an incoming HTTP MCP request.
|
|
3
|
+
*
|
|
4
|
+
* Accepted, in order of precedence:
|
|
5
|
+
* 1. X-Ssemble-API-Key: sk_ssemble_... (original header)
|
|
6
|
+
* 2. X-API-Key: sk_ssemble_... (same header the REST API accepts)
|
|
7
|
+
* 3. Authorization: Bearer sk_ssemble_... (standard header — the only kind
|
|
8
|
+
* some MCP clients, e.g. Claude custom connectors, allow)
|
|
9
|
+
* 4. SSEMBLE_API_KEY env var (single-tenant deployments)
|
|
10
|
+
*
|
|
11
|
+
* Returns null when nothing is present so the server can answer with the
|
|
12
|
+
* usual missing_api_key error.
|
|
13
|
+
*/
|
|
14
|
+
export function resolveApiKey(headers = {}, env = process.env) {
|
|
15
|
+
const first = (v) => (Array.isArray(v) ? v[0] : v);
|
|
16
|
+
|
|
17
|
+
const direct = first(headers['x-ssemble-api-key']) || first(headers['x-api-key']);
|
|
18
|
+
if (typeof direct === 'string' && direct.trim()) return direct.trim();
|
|
19
|
+
|
|
20
|
+
const auth = first(headers['authorization']);
|
|
21
|
+
if (typeof auth === 'string') {
|
|
22
|
+
const m = /^\s*Bearer\s+(\S+)\s*$/i.exec(auth);
|
|
23
|
+
if (m) return m[1];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return env.SSEMBLE_API_KEY || null;
|
|
27
|
+
}
|
package/src/transports/http.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import express from 'express';
|
|
10
10
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
11
11
|
import { createSsembleMcpServer, PKG_VERSION } from '../index.js';
|
|
12
|
+
import { resolveApiKey } from './apiKey.js';
|
|
12
13
|
|
|
13
14
|
const app = express();
|
|
14
15
|
app.use(express.json());
|
|
@@ -25,8 +26,8 @@ const SERVER_CARD = {
|
|
|
25
26
|
},
|
|
26
27
|
authentication: {
|
|
27
28
|
required: true,
|
|
28
|
-
schemes: ['api_key'],
|
|
29
|
-
instructions: 'Pass your Ssemble API key via the X-Ssemble-API-Key header or set SSEMBLE_API_KEY env var on the server.',
|
|
29
|
+
schemes: ['api_key', 'bearer'],
|
|
30
|
+
instructions: 'Pass your Ssemble API key via the X-Ssemble-API-Key header, the X-API-Key header, or "Authorization: Bearer sk_ssemble_..." — or set SSEMBLE_API_KEY env var on the server.',
|
|
30
31
|
},
|
|
31
32
|
};
|
|
32
33
|
|
|
@@ -42,7 +43,7 @@ app.get('/.well-known/mcp/server-card.json', (_req, res) => {
|
|
|
42
43
|
|
|
43
44
|
// MCP endpoint — stateless mode (each request is independent)
|
|
44
45
|
app.all('/mcp', async (req, res) => {
|
|
45
|
-
const apiKey = req.headers
|
|
46
|
+
const apiKey = resolveApiKey(req.headers);
|
|
46
47
|
const baseUrl = process.env.SSEMBLE_API_BASE_URL;
|
|
47
48
|
|
|
48
49
|
// Log MCP requests (tool calls) for usage tracking
|