minutes-mcp 0.5.1 → 0.5.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/LICENSE +21 -0
- package/dist/index.js +72 -3
- package/package.json +4 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mat Silverstein
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.js
CHANGED
|
@@ -144,16 +144,24 @@ const MINUTES_BIN = findMinutesBinary();
|
|
|
144
144
|
// When installed via `npx minutes-mcp`, the Rust CLI may not be present.
|
|
145
145
|
// In that case, read-only tools use the pure-TS reader module.
|
|
146
146
|
let cliAvailable = null;
|
|
147
|
+
let cliCheckedAt = 0;
|
|
148
|
+
const CLI_CACHE_TTL_MS = 5 * 60 * 1000; // re-check every 5 minutes
|
|
147
149
|
async function isCliAvailable() {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
+
// Cache hit: return true permanently (CLI won't disappear mid-session)
|
|
151
|
+
// Cache miss (false): re-probe after TTL so installing CLI mid-session works
|
|
152
|
+
if (cliAvailable === true)
|
|
153
|
+
return true;
|
|
154
|
+
if (cliAvailable === false && Date.now() - cliCheckedAt < CLI_CACHE_TTL_MS)
|
|
155
|
+
return false;
|
|
150
156
|
try {
|
|
151
157
|
await execFileAsync(MINUTES_BIN, ["--version"], { timeout: 5000 });
|
|
152
158
|
cliAvailable = true;
|
|
159
|
+
cliCheckedAt = Date.now();
|
|
153
160
|
console.error("[Minutes] CLI found — full mode (all tools enabled)");
|
|
154
161
|
}
|
|
155
162
|
catch {
|
|
156
163
|
cliAvailable = false;
|
|
164
|
+
cliCheckedAt = Date.now();
|
|
157
165
|
console.error("[Minutes] CLI not found — read-only mode. Install for recording: brew install minutes");
|
|
158
166
|
}
|
|
159
167
|
return cliAvailable;
|
|
@@ -229,7 +237,7 @@ function validatePathInDirectories(path, roots, allowedExts) {
|
|
|
229
237
|
// ── MCP Server ──────────────────────────────────────────────
|
|
230
238
|
const server = new McpServer({
|
|
231
239
|
name: "minutes",
|
|
232
|
-
version: "0.5.
|
|
240
|
+
version: "0.5.2",
|
|
233
241
|
});
|
|
234
242
|
// Configurable directories — override via env vars in Claude Desktop extension settings
|
|
235
243
|
const MEETINGS_DIR = process.env.MEETINGS_DIR || join(homedir(), "meetings");
|
|
@@ -960,6 +968,67 @@ server.resource("meeting", new ResourceTemplate("minutes://meetings/{slug}", { l
|
|
|
960
968
|
}
|
|
961
969
|
return { contents: [{ uri: uri.href, mimeType: "text/plain", text: `Meeting not found: ${slug}` }] };
|
|
962
970
|
});
|
|
971
|
+
// ── Tool: start_dictation ──────────────────────────────────
|
|
972
|
+
server.tool("start_dictation", "Start dictation mode. Speak naturally — text goes to clipboard and daily note after each pause. Runs until stop_dictation is called or silence timeout.", {}, { title: "Start Dictation", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }, async () => {
|
|
973
|
+
if (!(await isCliAvailable())) {
|
|
974
|
+
return { content: [{ type: "text", text: CLI_INSTALL_MSG }] };
|
|
975
|
+
}
|
|
976
|
+
const { stdout: statusOut } = await runMinutes(["status"]);
|
|
977
|
+
const status = parseJsonOutput(statusOut);
|
|
978
|
+
if (status.recording) {
|
|
979
|
+
return {
|
|
980
|
+
content: [
|
|
981
|
+
{
|
|
982
|
+
type: "text",
|
|
983
|
+
text: "Recording in progress — stop recording before dictating.",
|
|
984
|
+
},
|
|
985
|
+
],
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
// Spawn detached dictation process
|
|
989
|
+
const child = spawn(MINUTES_BIN, ["dictate"], {
|
|
990
|
+
detached: true,
|
|
991
|
+
stdio: "ignore",
|
|
992
|
+
env: { ...process.env, RUST_LOG: "info" },
|
|
993
|
+
});
|
|
994
|
+
child.unref();
|
|
995
|
+
// Wait briefly for startup
|
|
996
|
+
await new Promise((r) => setTimeout(r, 500));
|
|
997
|
+
return {
|
|
998
|
+
content: [
|
|
999
|
+
{
|
|
1000
|
+
type: "text",
|
|
1001
|
+
text: "Dictation started. Speak naturally — text will be copied to clipboard after each pause. Say \"stop dictation\" when done.",
|
|
1002
|
+
},
|
|
1003
|
+
],
|
|
1004
|
+
};
|
|
1005
|
+
});
|
|
1006
|
+
// ── Tool: stop_dictation ───────────────────────────────────
|
|
1007
|
+
server.tool("stop_dictation", "Stop the current dictation session.", {}, { title: "Stop Dictation", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }, async () => {
|
|
1008
|
+
// Send stop signal by killing the dictation process via PID file
|
|
1009
|
+
const minutesDir = join(homedir(), ".minutes");
|
|
1010
|
+
const pidPath = join(minutesDir, "dictation.pid");
|
|
1011
|
+
if (existsSync(pidPath)) {
|
|
1012
|
+
try {
|
|
1013
|
+
const pidContent = await readFile(pidPath, "utf-8");
|
|
1014
|
+
const pid = parseInt(pidContent.trim(), 10);
|
|
1015
|
+
if (Number.isFinite(pid) && pid > 0) {
|
|
1016
|
+
process.kill(pid, "SIGTERM");
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
catch {
|
|
1020
|
+
// Process already dead or PID file invalid
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
return {
|
|
1024
|
+
content: [
|
|
1025
|
+
{
|
|
1026
|
+
type: "text",
|
|
1027
|
+
text: "Dictation stop requested.",
|
|
1028
|
+
},
|
|
1029
|
+
],
|
|
1030
|
+
};
|
|
1031
|
+
});
|
|
963
1032
|
// ── Start server ────────────────────────────────────────────
|
|
964
1033
|
async function main() {
|
|
965
1034
|
const transport = new StdioServerTransport();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minutes-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "MCP server for minutes — conversation memory for AI assistants. Works with Claude Desktop, Cursor, Windsurf, and any MCP client.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/",
|
|
12
|
-
"dist-ui/"
|
|
12
|
+
"dist-ui/",
|
|
13
|
+
"LICENSE"
|
|
13
14
|
],
|
|
14
15
|
"keywords": [
|
|
15
16
|
"mcp",
|
|
@@ -38,11 +39,11 @@
|
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
41
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
42
|
+
"@modelcontextprotocol/ext-apps": "^1.2.2",
|
|
41
43
|
"minutes-sdk": "^0.5.0",
|
|
42
44
|
"yaml": "^2.8.3"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
|
-
"@modelcontextprotocol/ext-apps": "^1.2.2",
|
|
46
47
|
"@types/node": "^22.0.0",
|
|
47
48
|
"tsx": "^4.0.0",
|
|
48
49
|
"typescript": "^5.5.0",
|