@speakai/mcp-server 1.35.0 → 1.37.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.
- package/README.md +4 -3
- package/dist/index.js +105 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -242,7 +242,7 @@ For questions about data handling, see [speakai.co/privacy](https://speakai.co/p
|
|
|
242
242
|
|
|
243
243
|
## What you can do once installed
|
|
244
244
|
|
|
245
|
-
Speak AI ships
|
|
245
|
+
Speak AI ships 185 tools your AI assistant can call. You don't memorize them — Claude/ChatGPT pick the right ones based on what you ask. Examples by category:
|
|
246
246
|
|
|
247
247
|
| Ask | Tools used (auto) |
|
|
248
248
|
|---|---|
|
|
@@ -394,10 +394,10 @@ SPEAK_API_KEY=your-key npx @speakai/mcp-server
|
|
|
394
394
|
| `SPEAK_ACCESS_TOKEN` | No | Auto-managed | JWT access token (auto-fetched and refreshed) |
|
|
395
395
|
| `SPEAK_BASE_URL` | No | `https://api.speakai.co` | API base URL |
|
|
396
396
|
|
|
397
|
-
### MCP Tools (
|
|
397
|
+
### MCP Tools (185)
|
|
398
398
|
|
|
399
399
|
<details>
|
|
400
|
-
<summary>Media (
|
|
400
|
+
<summary>Media (19 tools)</summary>
|
|
401
401
|
|
|
402
402
|
| Tool | Description |
|
|
403
403
|
|---|---|
|
|
@@ -414,6 +414,7 @@ SPEAK_API_KEY=your-key npx @speakai/mcp-server
|
|
|
414
414
|
| `bulk_update_transcript_speakers` | Rename speaker labels across multiple media files in one call (max 500) |
|
|
415
415
|
| `get_media_status` | Check processing status (pending → processed) |
|
|
416
416
|
| `update_media_metadata` | Update name, description, tags, or folder |
|
|
417
|
+
| `set_media_thumbnail` | Set a custom video thumbnail from an image link, base64 image bytes, or a frame at a given second (JPEG, PNG or WebP, up to 10 MB) |
|
|
417
418
|
| `delete_media` | Permanently delete a media file |
|
|
418
419
|
| `toggle_media_favorite` | Mark or unmark media as a favorite |
|
|
419
420
|
| `reanalyze_media` | Re-run AI analysis with latest models |
|
package/dist/index.js
CHANGED
|
@@ -4414,6 +4414,13 @@ function getMimeType(filePath) {
|
|
|
4414
4414
|
function detectMediaType(filePath) {
|
|
4415
4415
|
return isVideoFile(filePath) ? "video" : "audio";
|
|
4416
4416
|
}
|
|
4417
|
+
function detectImageMimeType(bytes) {
|
|
4418
|
+
const ascii = (start, end) => String.fromCharCode(...bytes.subarray(start, end));
|
|
4419
|
+
if (bytes[0] === 255 && bytes[1] === 216 && bytes[2] === 255) return "image/jpeg";
|
|
4420
|
+
if (bytes.length >= 8 && bytes[0] === 137 && ascii(1, 8) === "PNG\r\n\n") return "image/png";
|
|
4421
|
+
if (bytes.length >= 12 && ascii(0, 4) === "RIFF" && ascii(8, 12) === "WEBP") return "image/webp";
|
|
4422
|
+
return null;
|
|
4423
|
+
}
|
|
4417
4424
|
var path, VIDEO_EXTENSIONS, MIME_TYPES, SUPPORTED_URL_SOURCES, UNSUPPORTED_URL_SOURCES;
|
|
4418
4425
|
var init_media_utils = __esm({
|
|
4419
4426
|
"src/media-utils.ts"() {
|
|
@@ -4583,7 +4590,7 @@ function register(server, client) {
|
|
|
4583
4590
|
registerSpeakTool(
|
|
4584
4591
|
server,
|
|
4585
4592
|
"get_media_insights",
|
|
4586
|
-
"Retrieve AI-generated insights for a processed media file \u2014 topics, sentiment, keywords, action items, summaries, and more. The media must be in 'processed' state (check with get_media_status first). For asking custom questions about a media file, use ask_ai_chat instead.",
|
|
4593
|
+
"Retrieve AI-generated insights for a processed media file \u2014 topics, sentiment, keywords, action items, summaries, and more. The media must be in 'processed' state (check with get_media_status first). For asking custom questions about a media file, use ask_ai_chat instead. For a video, data.thumbnail has the thumbnail: url, source (auto or custom), pending while a requested frame is being made, and error if that frame failed.",
|
|
4587
4594
|
{
|
|
4588
4595
|
mediaId: import_zod2.z.string().min(1).describe("Unique identifier of the media file")
|
|
4589
4596
|
},
|
|
@@ -4722,7 +4729,7 @@ function register(server, client) {
|
|
|
4722
4729
|
registerSpeakTool(
|
|
4723
4730
|
server,
|
|
4724
4731
|
"get_media_status",
|
|
4725
|
-
"Check the processing status of a media file. States: pending \u2192 transcribing \u2192 analyzing \u2192 processed (or failed). Poll this after upload_media until state is 'processed', then use get_transcript and get_media_insights to retrieve results.",
|
|
4732
|
+
"Check the processing status of a media file. States: pending \u2192 transcribing \u2192 analyzing \u2192 processed (or failed). Poll this after upload_media until state is 'processed', then use get_transcript and get_media_insights to retrieve results. For a video, data.thumbnail has the thumbnail: url, source (auto or custom), pending while a requested frame is being made, and error if that frame failed.",
|
|
4726
4733
|
{
|
|
4727
4734
|
mediaId: import_zod2.z.string().min(1).describe("Unique identifier of the media file")
|
|
4728
4735
|
},
|
|
@@ -5049,8 +5056,74 @@ function register(server, client) {
|
|
|
5049
5056
|
}
|
|
5050
5057
|
}
|
|
5051
5058
|
);
|
|
5059
|
+
registerSpeakTool(
|
|
5060
|
+
server,
|
|
5061
|
+
"set_media_thumbnail",
|
|
5062
|
+
"Set a custom thumbnail for a video. Send exactly one of imageUrl, imageBase64 or atSeconds. The image must be JPEG, PNG or WebP and at most 10 MB; the type is judged from the file bytes, not the name. atSeconds uses the video frame at that moment; this tool waits up to 60 seconds for the frame and returns its url, or says it is still processing (check later with get_media_status, which carries the thumbnail field). Each call replaces the current custom thumbnail, and there is no way back to the automatic one. Needs permission to edit the media. Errors: 400 bad input, unsupported image, blocked link or failed frame; 413 image too large; 409 a frame is already being made; 503 frame service busy, try again shortly.",
|
|
5063
|
+
{
|
|
5064
|
+
mediaId: import_zod2.z.string().min(1).describe("Unique identifier of the video"),
|
|
5065
|
+
imageUrl: import_zod2.z.string().url().refine((value) => /^https:\/\//i.test(value), "imageUrl must be an https URL").optional().describe("A public https link to a JPEG, PNG or WebP image of at most 10 MB. The server downloads it."),
|
|
5066
|
+
imageBase64: import_zod2.z.string().min(1).optional().describe("The image bytes in base64 (JPEG, PNG or WebP, at most 10 MB once decoded). A data:image/...;base64, prefix is allowed."),
|
|
5067
|
+
atSeconds: import_zod2.z.number().min(0).optional().describe("Use the video frame at this many seconds from the start. Values past the end use the last second.")
|
|
5068
|
+
},
|
|
5069
|
+
{
|
|
5070
|
+
title: "Set Media Thumbnail",
|
|
5071
|
+
readOnlyHint: false,
|
|
5072
|
+
destructiveHint: true,
|
|
5073
|
+
idempotentHint: false,
|
|
5074
|
+
openWorldHint: true
|
|
5075
|
+
},
|
|
5076
|
+
async ({ mediaId, imageUrl, imageBase64, atSeconds }) => {
|
|
5077
|
+
const modes = [imageUrl, imageBase64, atSeconds].filter((value) => value !== void 0);
|
|
5078
|
+
if (modes.length !== 1) {
|
|
5079
|
+
return err(new Error("Send exactly one of imageUrl, imageBase64 or atSeconds."));
|
|
5080
|
+
}
|
|
5081
|
+
const path4 = `/v1/media/${mediaId}/thumbnail`;
|
|
5082
|
+
try {
|
|
5083
|
+
if (imageUrl !== void 0) {
|
|
5084
|
+
const result = await api.put(path4, { url: imageUrl });
|
|
5085
|
+
return ok(result.data);
|
|
5086
|
+
}
|
|
5087
|
+
if (imageBase64 !== void 0) {
|
|
5088
|
+
const bytes = Buffer.from(imageBase64.replace(/^data:[^,]*;base64,/i, ""), "base64");
|
|
5089
|
+
if (bytes.length === 0) {
|
|
5090
|
+
return err(new Error("imageBase64 decoded to an empty file."));
|
|
5091
|
+
}
|
|
5092
|
+
if (bytes.length > THUMBNAIL_MAX_BYTES) {
|
|
5093
|
+
return err(new Error("The image is larger than 10 MB."));
|
|
5094
|
+
}
|
|
5095
|
+
const mimeType = detectImageMimeType(bytes);
|
|
5096
|
+
if (!mimeType) {
|
|
5097
|
+
return err(new Error("The image must be a JPEG, PNG or WebP file."));
|
|
5098
|
+
}
|
|
5099
|
+
const form = new FormData();
|
|
5100
|
+
form.append("image", new Blob([bytes], { type: mimeType }), `thumbnail.${THUMBNAIL_FILE_EXTENSIONS[mimeType]}`);
|
|
5101
|
+
const result = await api.put(path4, form, { headers: { "Content-Type": "multipart/form-data" } });
|
|
5102
|
+
return ok(result.data);
|
|
5103
|
+
}
|
|
5104
|
+
await api.put(path4, { seekSec: atSeconds });
|
|
5105
|
+
const deadline = Date.now() + THUMBNAIL_POLL_TIMEOUT_MS;
|
|
5106
|
+
while (Date.now() < deadline) {
|
|
5107
|
+
await new Promise((resolve) => setTimeout(resolve, THUMBNAIL_POLL_INTERVAL_MS));
|
|
5108
|
+
const detail = await api.get(`/v1/media/status/${mediaId}`);
|
|
5109
|
+
const thumbnail = detail.data?.data?.thumbnail;
|
|
5110
|
+
if (!thumbnail || thumbnail.pending) continue;
|
|
5111
|
+
if (thumbnail?.error) {
|
|
5112
|
+
return err(new Error(`The frame could not be used: ${thumbnail.error}`));
|
|
5113
|
+
}
|
|
5114
|
+
return ok({ thumbnail });
|
|
5115
|
+
}
|
|
5116
|
+
return ok({
|
|
5117
|
+
thumbnail: { pending: true },
|
|
5118
|
+
message: "The frame is still processing. Check the thumbnail field with get_media_status in a minute."
|
|
5119
|
+
});
|
|
5120
|
+
} catch (error) {
|
|
5121
|
+
return err(error);
|
|
5122
|
+
}
|
|
5123
|
+
}
|
|
5124
|
+
);
|
|
5052
5125
|
}
|
|
5053
|
-
var import_zod2, LIST_MEDIA_DEFAULT_PAGE_SIZE, LIST_MEDIA_MAX_PAGE_SIZE;
|
|
5126
|
+
var import_zod2, LIST_MEDIA_DEFAULT_PAGE_SIZE, LIST_MEDIA_MAX_PAGE_SIZE, THUMBNAIL_MAX_BYTES, THUMBNAIL_POLL_TIMEOUT_MS, THUMBNAIL_POLL_INTERVAL_MS, THUMBNAIL_FILE_EXTENSIONS;
|
|
5054
5127
|
var init_media3 = __esm({
|
|
5055
5128
|
"src/tools/media.ts"() {
|
|
5056
5129
|
"use strict";
|
|
@@ -5061,6 +5134,14 @@ var init_media3 = __esm({
|
|
|
5061
5134
|
init_media_utils();
|
|
5062
5135
|
LIST_MEDIA_DEFAULT_PAGE_SIZE = 25;
|
|
5063
5136
|
LIST_MEDIA_MAX_PAGE_SIZE = 100;
|
|
5137
|
+
THUMBNAIL_MAX_BYTES = 10 * 1024 * 1024;
|
|
5138
|
+
THUMBNAIL_POLL_TIMEOUT_MS = 6e4;
|
|
5139
|
+
THUMBNAIL_POLL_INTERVAL_MS = 3e3;
|
|
5140
|
+
THUMBNAIL_FILE_EXTENSIONS = {
|
|
5141
|
+
"image/jpeg": "jpg",
|
|
5142
|
+
"image/png": "png",
|
|
5143
|
+
"image/webp": "webp"
|
|
5144
|
+
};
|
|
5064
5145
|
}
|
|
5065
5146
|
});
|
|
5066
5147
|
|
|
@@ -11144,7 +11225,8 @@ var init_dashboards = __esm({
|
|
|
11144
11225
|
// src/tools/voice.ts
|
|
11145
11226
|
var voice_exports = {};
|
|
11146
11227
|
__export(voice_exports, {
|
|
11147
|
-
register: () => register19
|
|
11228
|
+
register: () => register19,
|
|
11229
|
+
voiceInputSchema: () => voiceInputSchema
|
|
11148
11230
|
});
|
|
11149
11231
|
function register19(server, client, options = {}) {
|
|
11150
11232
|
const api = client ?? speakClient;
|
|
@@ -11289,7 +11371,7 @@ function register19(server, client, options = {}) {
|
|
|
11289
11371
|
registerSpeakTool(
|
|
11290
11372
|
server,
|
|
11291
11373
|
"update_voice_agent",
|
|
11292
|
-
"Update a voice agent. Requires the OWNER or ADMIN role. Send only the fields you want to change; agentId, companyId, and userId are immutable and silently dropped if sent.",
|
|
11374
|
+
"Update a voice agent. Requires the OWNER or ADMIN role. Send only the top-level fields you want to change; agentId, companyId, and userId are immutable and silently dropped if sent. Object fields (voice, llm, avatar, chatSettings) each replace the stored object whole, not merge -- fetch get_voice_agent first and resend every key of an object field you're not fully replacing.",
|
|
11293
11375
|
{
|
|
11294
11376
|
agentId: import_zod21.z.string().min(1).describe("ID of the voice agent to update (from list_voice_agents)"),
|
|
11295
11377
|
...Object.fromEntries(
|
|
@@ -11500,13 +11582,25 @@ function register19(server, client, options = {}) {
|
|
|
11500
11582
|
}
|
|
11501
11583
|
);
|
|
11502
11584
|
}
|
|
11503
|
-
var import_zod21, voiceInputSchema;
|
|
11585
|
+
var import_zod21, chatSettingsSchema, voiceInputSchema;
|
|
11504
11586
|
var init_voice4 = __esm({
|
|
11505
11587
|
"src/tools/voice.ts"() {
|
|
11506
11588
|
"use strict";
|
|
11507
11589
|
import_zod21 = require("zod");
|
|
11590
|
+
init_dist();
|
|
11508
11591
|
init_helpers();
|
|
11509
11592
|
init_client();
|
|
11593
|
+
chatSettingsSchema = import_zod21.z.object({
|
|
11594
|
+
welcomeMessage: import_zod21.z.string().optional().describe("The agent's opening line."),
|
|
11595
|
+
conversationStarters: import_zod21.z.array(import_zod21.z.string()).optional(),
|
|
11596
|
+
topicsToAvoid: import_zod21.z.array(import_zod21.z.string()).optional(),
|
|
11597
|
+
maxResponseLength: import_zod21.z.number().int().min(10).max(50).optional().describe("Words per response, 10-50."),
|
|
11598
|
+
maxSessionLength: import_zod21.z.number().int().positive().optional().describe("Minutes before the call ends."),
|
|
11599
|
+
language: import_zod21.z.string().optional(),
|
|
11600
|
+
responsePace: import_zod21.z.enum(RESPONSE_PACES).optional()
|
|
11601
|
+
}).describe(
|
|
11602
|
+
"Sending this object replaces it whole on the stored agent, the same as voice/llm/avatar below -- fields you omit are not merged, they're dropped. Fetch get_voice_agent first and resend every key you want to keep."
|
|
11603
|
+
);
|
|
11510
11604
|
voiceInputSchema = {
|
|
11511
11605
|
name: import_zod21.z.string().min(1).describe("Required on create. Trimmed, non-empty."),
|
|
11512
11606
|
personality: import_zod21.z.string().describe("Required on create. Free text describing the agent's tone."),
|
|
@@ -11523,7 +11617,8 @@ var init_voice4 = __esm({
|
|
|
11523
11617
|
avatar: import_zod21.z.object({
|
|
11524
11618
|
avatarId: import_zod21.z.string().describe("Must match a row in your company's avatar catalog (list_voice_avatars) or the shared system catalog.")
|
|
11525
11619
|
}).optional().describe("Set to attach a video avatar; avatarUrl/provider are derived server-side from the catalog row."),
|
|
11526
|
-
|
|
11620
|
+
chatSettings: chatSettingsSchema.optional(),
|
|
11621
|
+
conversationMode: import_zod21.z.enum(["voice", "avatar"]).optional(),
|
|
11527
11622
|
folderId: import_zod21.z.string().optional().describe("Folder to file this agent's conversations under."),
|
|
11528
11623
|
enableWebSearch: import_zod21.z.boolean().optional().describe("Let the agent search the web mid-call, separate from any attached knowledge base.")
|
|
11529
11624
|
};
|
|
@@ -12682,6 +12777,7 @@ var init_tool_names = __esm({
|
|
|
12682
12777
|
"search_media",
|
|
12683
12778
|
"delete_media",
|
|
12684
12779
|
"update_media_metadata",
|
|
12780
|
+
"set_media_thumbnail",
|
|
12685
12781
|
"toggle_media_favorite",
|
|
12686
12782
|
"reanalyze_media",
|
|
12687
12783
|
"get_captions",
|
|
@@ -13973,7 +14069,8 @@ var SPEAK_MCP_TOOL_CATEGORIES = [
|
|
|
13973
14069
|
"toggle_media_favorite",
|
|
13974
14070
|
"reanalyze_media",
|
|
13975
14071
|
"bulk_move_media",
|
|
13976
|
-
"upload_and_analyze_batch"
|
|
14072
|
+
"upload_and_analyze_batch",
|
|
14073
|
+
"set_media_thumbnail"
|
|
13977
14074
|
]
|
|
13978
14075
|
},
|
|
13979
14076
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speakai/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.0",
|
|
4
4
|
"mcpName": "io.github.speakai/mcp-server",
|
|
5
5
|
"description": "Official Speak AI MCP Server — capture meetings, search thousands of recordings, run async voice and video surveys, create clips, and automate workflows from your AI assistant.",
|
|
6
6
|
"homepage": "https://docs.speakai.co/mcp",
|