@open-recording/mcp 0.2.0 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +69 -2
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { toNodeHandler } from "@modelcontextprotocol/node";
2
2
  import { McpServer, createMcpHandler, hostHeaderValidationResponse, localhostAllowedHostnames, localhostAllowedOrigins, originValidationResponse } from "@modelcontextprotocol/server";
3
- import { OpsError, cancelRecording, deleteRecording, listRecordings, makeContext, pauseRecording, readNotes, readRecording, readSubtitles, readTranscript, recorderStatus, renameRecording, resumeRecording, searchTranscripts, startRecording, stopRecording, tagRecording, transcribeEnvironment, transcribeRecording, writeNotes } from "@open-recording/core/ops";
3
+ import { OpsError, addBookmark, cancelRecording, deleteBookmark, deleteRecording, editTranscriptSegment, importRecording, listRecordings, makeContext, markRecordingMoment, pauseRecording, readCurrent, readNotes, readRecording, readSubtitles, readTranscript, recorderStatus, renameRecording, resumeRecording, searchTranscripts, startRecording, stopRecording, tagRecording, transcribeEnvironment, transcribeRecording, writeNotes } from "@open-recording/core/ops";
4
4
  import { z } from "zod";
5
5
  //#region src/tools.ts
6
6
  /**
@@ -40,6 +40,11 @@ function registerTools(server, ctx) {
40
40
  description: "Whether anything is recording or paused, and whether a studio page is connected to record through. Check this before starting.",
41
41
  inputSchema: z.object({})
42
42
  }, () => run(() => recorderStatus(ctx)));
43
+ server.registerTool("current_recording", {
44
+ title: "Current recording in browser",
45
+ description: "The recording currently open in the studio browser and its playhead position in milliseconds.",
46
+ inputSchema: z.object({})
47
+ }, () => run(() => readCurrent(ctx)));
43
48
  server.registerTool("start_recording", {
44
49
  title: "Start recording",
45
50
  description: "Press record on whatever the studio is holding — a microphone, or a browser tab with its picture and audio. Returns once the studio confirms it is capturing; fails if no studio is connected or nothing is armed. One recording at a time.",
@@ -84,6 +89,31 @@ function registerTools(server, ctx) {
84
89
  description: "Stop the open recording and delete its audio. Use when the recording was a mistake.",
85
90
  inputSchema: z.object({})
86
91
  }, () => run(() => cancelRecording(ctx)));
92
+ server.registerTool("mark_moment", {
93
+ title: "Mark a moment in the open recording",
94
+ description: "Drop a timestamped bookmark on the currently active recording at the current elapsed time.",
95
+ inputSchema: z.object({ label: z.string().optional().describe("what just happened, e.g. \"Pricing decision\"") })
96
+ }, ({ label }) => run(() => markRecordingMoment(ctx, label)));
97
+ server.registerTool("import_recording", {
98
+ title: "Import external audio or video file",
99
+ description: "Import an existing media file (.mp3, .m4a, .wav, .mp4, .mov, .webm) from disk into recordings/.",
100
+ inputSchema: z.object({
101
+ filePath: z.string().describe("path to the media file on disk"),
102
+ title: z.string().optional(),
103
+ tags: z.array(z.string()).optional(),
104
+ note: z.string().optional(),
105
+ transcribe: z.boolean().optional(),
106
+ language: z.string().optional()
107
+ })
108
+ }, ({ filePath, title, tags, note, transcribe, language }) => run(() => importRecording(ctx, {
109
+ filePath,
110
+ ...title ? { title } : {},
111
+ ...tags ? { tags } : {},
112
+ ...note ? { note } : {},
113
+ ...transcribe ? { transcribe } : {},
114
+ ...language ? { language } : {},
115
+ source: "agent"
116
+ })));
87
117
  server.registerTool("list_recordings", {
88
118
  title: "List recordings",
89
119
  description: "Every recording with its id, title, length, and whether it has been transcribed.",
@@ -101,11 +131,13 @@ function registerTools(server, ctx) {
101
131
  id: z.string(),
102
132
  language: z.string().optional().describe("language code, or `auto` (the default)"),
103
133
  model: z.string().optional().describe("path to a ggml model, overriding the configured one"),
134
+ vocabulary: z.array(z.string()).optional().describe("proper nouns and acronyms to normalize across segments"),
104
135
  force: z.boolean().optional()
105
136
  })
106
- }, ({ id, language, model, force }) => run(() => transcribeRecording(ctx, id, {
137
+ }, ({ id, language, model, vocabulary, force }) => run(() => transcribeRecording(ctx, id, {
107
138
  ...language ? { language } : {},
108
139
  ...model ? { model } : {},
140
+ ...vocabulary ? { vocabulary } : {},
109
141
  ...force ? { force } : {}
110
142
  })));
111
143
  server.registerTool("read_transcript", {
@@ -120,6 +152,41 @@ function registerTools(server, ctx) {
120
152
  ]).optional()
121
153
  })
122
154
  }, ({ id, view }) => run(() => readTranscript(ctx, id, view ?? "markdown")));
155
+ server.registerTool("edit_transcript_segment", {
156
+ title: "Edit transcript segment",
157
+ description: "Correct a segment’s text, set its speaker label, or star/unstar it. Rewrites Markdown, SRT, and VTT subtitles in sync.",
158
+ inputSchema: z.object({
159
+ id: z.string(),
160
+ index: z.number().int().nonnegative(),
161
+ text: z.string().optional(),
162
+ speaker: z.string().nullable().optional(),
163
+ starred: z.boolean().optional()
164
+ })
165
+ }, ({ id, index, text, speaker, starred }) => run(() => editTranscriptSegment(ctx, id, index, {
166
+ ...text !== void 0 ? { text } : {},
167
+ ...speaker !== void 0 ? { speaker } : {},
168
+ ...starred !== void 0 ? { starred } : {}
169
+ })));
170
+ server.registerTool("add_bookmark", {
171
+ title: "Add bookmark",
172
+ description: "Add a timestamped bookmark to a recording at `atMs` milliseconds.",
173
+ inputSchema: z.object({
174
+ id: z.string(),
175
+ atMs: z.number().nonnegative(),
176
+ label: z.string()
177
+ })
178
+ }, ({ id, atMs, label }) => run(() => addBookmark(ctx, id, {
179
+ atMs,
180
+ label
181
+ })));
182
+ server.registerTool("delete_bookmark", {
183
+ title: "Delete bookmark",
184
+ description: "Remove a bookmark from a recording by its bookmark id.",
185
+ inputSchema: z.object({
186
+ id: z.string(),
187
+ bookmarkId: z.string()
188
+ })
189
+ }, ({ id, bookmarkId }) => run(() => deleteBookmark(ctx, id, bookmarkId)));
123
190
  server.registerTool("read_subtitles", {
124
191
  title: "Read subtitles",
125
192
  description: "The transcript as subtitle cues — `srt` for an editor, `vtt` for a player. Written when a recording is transcribed.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-recording/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "MCP server for open-recording — lets any agent framework press record, stop, transcribe, and read back the transcript.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -46,13 +46,13 @@
46
46
  "zod": "^4.4.3"
47
47
  },
48
48
  "peerDependencies": {
49
- "@open-recording/core": "^0.2.0"
49
+ "@open-recording/core": "^0.3.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@types/node": "^22.19.17",
52
+ "@types/node": "^26.2.0",
53
53
  "tsdown": "^0.22.14",
54
54
  "typescript": "^5.9.3",
55
- "@open-recording/core": "0.2.0"
55
+ "@open-recording/core": "0.3.0"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsdown",