@plaud-ai/mcp 0.2.1 → 0.2.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.
@@ -16,15 +16,17 @@ function parseDate(s) {
16
16
  return d.getTime();
17
17
  }
18
18
  function registerTools(server, client) {
19
- server.tool(
19
+ server.registerTool(
20
20
  "list_files",
21
- "List Plaud recordings. Supports optional client-side filtering: `query` (case-insensitive name substring), `date_from`/`date_to` (YYYY-MM-DD, inclusive). When any filter is set, paginates up to 5 pages \xD7 100 recordings and returns all matches.",
22
21
  {
23
- page: z.number().optional().default(1).describe("Page number (ignored when filters are set)"),
24
- page_size: z.number().optional().default(20).describe("Items per page (ignored when filters are set)"),
25
- query: z.string().optional().describe("Case-insensitive substring match on recording name"),
26
- date_from: z.string().optional().describe("Start date inclusive, YYYY-MM-DD"),
27
- date_to: z.string().optional().describe("End date inclusive, YYYY-MM-DD")
22
+ description: "List Plaud recordings. Supports optional client-side filtering: `query` (case-insensitive name substring), `date_from`/`date_to` (YYYY-MM-DD, inclusive). When any filter is set, paginates up to 5 pages \xD7 100 recordings and returns all matches.",
23
+ inputSchema: {
24
+ page: z.number().optional().default(1).describe("Page number (ignored when filters are set)"),
25
+ page_size: z.number().optional().default(20).describe("Items per page (ignored when filters are set)"),
26
+ query: z.string().optional().describe("Case-insensitive substring match on recording name"),
27
+ date_from: z.string().optional().describe("Start date inclusive, YYYY-MM-DD"),
28
+ date_to: z.string().optional().describe("End date inclusive, YYYY-MM-DD")
29
+ }
28
30
  },
29
31
  async ({ page, page_size, query, date_from, date_to }) => {
30
32
  const start = Date.now();
@@ -76,10 +78,12 @@ function registerTools(server, client) {
76
78
  }
77
79
  }
78
80
  );
79
- server.tool(
81
+ server.registerTool(
80
82
  "get_file",
81
- "Get details of a specific Plaud recording by ID",
82
- { file_id: z.string().describe("The file ID to retrieve") },
83
+ {
84
+ description: "Get details of a specific Plaud recording by ID",
85
+ inputSchema: { file_id: z.string().describe("The file ID to retrieve") }
86
+ },
83
87
  async ({ file_id }) => {
84
88
  const start = Date.now();
85
89
  logger.info({ event: "tool_call", tool: "get_file", file_id });
@@ -93,10 +97,12 @@ function registerTools(server, client) {
93
97
  }
94
98
  }
95
99
  );
96
- server.tool(
100
+ server.registerTool(
97
101
  "get_note",
98
- "Fetch AI-generated notes for a Plaud recording \u2014 compact summary, action items, and key topics",
99
- { file_id: z.string().describe("The file ID to retrieve notes for") },
102
+ {
103
+ description: "Fetch AI-generated notes for a Plaud recording \u2014 compact summary, action items, and key topics",
104
+ inputSchema: { file_id: z.string().describe("The file ID to retrieve notes for") }
105
+ },
100
106
  async ({ file_id }) => {
101
107
  const start = Date.now();
102
108
  logger.info({ event: "tool_call", tool: "get_note", file_id });
@@ -110,10 +116,12 @@ function registerTools(server, client) {
110
116
  }
111
117
  }
112
118
  );
113
- server.tool(
119
+ server.registerTool(
114
120
  "get_transcript",
115
- "Fetch the full timestamped transcript with speaker attribution for a Plaud recording",
116
- { file_id: z.string().describe("The file ID to retrieve transcript for") },
121
+ {
122
+ description: "Fetch the full timestamped transcript with speaker attribution for a Plaud recording",
123
+ inputSchema: { file_id: z.string().describe("The file ID to retrieve transcript for") }
124
+ },
117
125
  async ({ file_id }) => {
118
126
  const start = Date.now();
119
127
  logger.info({ event: "tool_call", tool: "get_transcript", file_id });
@@ -127,9 +135,11 @@ function registerTools(server, client) {
127
135
  }
128
136
  }
129
137
  );
130
- server.tool(
138
+ server.registerTool(
131
139
  "get_current_user",
132
- "Get current authenticated user info",
140
+ {
141
+ description: "Get current authenticated user info"
142
+ },
133
143
  async () => {
134
144
  const start = Date.now();
135
145
  logger.info({ event: "tool_call", tool: "get_current_user" });
@@ -10,18 +10,28 @@ import { homedir, platform } from "os";
10
10
  import { spawnSync } from "child_process";
11
11
  var SKILLS_MARKER_START = "<!-- plaud-skills:start -->";
12
12
  var SKILLS_MARKER_END = "<!-- plaud-skills:end -->";
13
- function findNpxCommand() {
14
- const npxName = platform() === "win32" ? "npx.cmd" : "npx";
15
- const found = spawnSync(platform() === "win32" ? "where" : "which", [npxName], { encoding: "utf-8" });
13
+ function findNodeBinCommand(command) {
14
+ const commandName = platform() === "win32" ? `${command}.cmd` : command;
15
+ const found = spawnSync(platform() === "win32" ? "where" : "which", [commandName], { encoding: "utf-8" });
16
16
  const firstMatch = found.status === 0 ? found.stdout.split(/\r?\n/).find((line) => line.trim())?.trim() : void 0;
17
17
  if (firstMatch) return firstMatch;
18
- const sibling = join(dirname(process.execPath), npxName);
19
- return existsSync(sibling) ? sibling : npxName;
18
+ const sibling = join(dirname(process.execPath), commandName);
19
+ return existsSync(sibling) ? sibling : commandName;
20
+ }
21
+ function isLocalPackageSpec(spec) {
22
+ return spec.endsWith(".tgz") || spec.startsWith(".") || spec.startsWith("/") || /^[A-Za-z]:[\\/]/.test(spec);
20
23
  }
21
24
  function getMcpEntry() {
25
+ const packageSpec = process.env.PLAUD_MCP_PACKAGE_SPEC?.trim() || "@plaud-ai/mcp@latest";
26
+ if (isLocalPackageSpec(packageSpec)) {
27
+ return {
28
+ command: findNodeBinCommand("npm"),
29
+ args: ["exec", "--yes", "--package", packageSpec, "--", "plaud-mcp"]
30
+ };
31
+ }
22
32
  return {
23
- command: findNpxCommand(),
24
- args: ["-y", "@plaud-ai/mcp@latest"]
33
+ command: findNodeBinCommand("npx"),
34
+ args: ["-y", packageSpec]
25
35
  };
26
36
  }
27
37
  function copyToClipboard(content) {
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-4QBEOJPX.js";
8
8
  import {
9
9
  registerTools
10
- } from "./chunk-MPCF6HMK.js";
10
+ } from "./chunk-IZKXHQM3.js";
11
11
  import "./chunk-SNSGVRCU.js";
12
12
 
13
13
  // src/index.ts
@@ -17,11 +17,13 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
17
17
  import open from "open";
18
18
  var server = new McpServer({
19
19
  name: "plaud",
20
- version: "0.2.0"
20
+ version: "0.2.2"
21
21
  });
22
22
  var CALLBACK_PORT = 8199;
23
23
  var LOGIN_TIMEOUT_MS = 12e4;
24
- server.tool("login", "Log in, sign in, or authenticate with Plaud account via OAuth (opens browser)", async () => {
24
+ server.registerTool("login", {
25
+ description: "Log in, sign in, or authenticate with Plaud account via OAuth (opens browser)"
26
+ }, async () => {
25
27
  const client = getClient();
26
28
  const existingToken = await client.auth.getAccessToken();
27
29
  if (existingToken) {
@@ -103,7 +105,9 @@ If this is a remote/headless machine, forward local port 8199 to this machine fi
103
105
  });
104
106
  });
105
107
  registerTools(server, getClient());
106
- server.tool("logout", "Log out, sign out, revoke authorization, and disconnect from Plaud account", async () => {
108
+ server.registerTool("logout", {
109
+ description: "Log out, sign out, revoke authorization, and disconnect from Plaud account"
110
+ }, async () => {
107
111
  const client = getClient();
108
112
  const existingToken = await client.auth.getAccessToken();
109
113
  if (!existingToken) {
@@ -121,7 +125,7 @@ server.tool("logout", "Log out, sign out, revoke authorization, and disconnect f
121
125
  async function registerSkillPrompts() {
122
126
  const skills = await loadSkills();
123
127
  for (const skill of skills) {
124
- server.prompt(skill.name, skill.description, () => ({
128
+ server.registerPrompt(skill.name, { description: skill.description }, () => ({
125
129
  messages: [{ role: "user", content: { type: "text", text: skill.content } }]
126
130
  }));
127
131
  }
@@ -130,7 +134,7 @@ async function main() {
130
134
  const sub = process.argv[2];
131
135
  const sub2 = process.argv[3];
132
136
  if (sub === "install") {
133
- const { runInstall } = await import("./install-I2N3DJG4.js");
137
+ const { runInstall } = await import("./install-EEQXUUG3.js");
134
138
  const args = process.argv.slice(3);
135
139
  const yes = args.some((a) => a === "--yes" || a === "-y");
136
140
  const noLogin = args.some((a) => a === "--no-login");
@@ -138,32 +142,32 @@ async function main() {
138
142
  return;
139
143
  }
140
144
  if (sub === "clean-plugin") {
141
- const { runCleanPlugin } = await import("./setup-QRUDA7ES.js");
145
+ const { runCleanPlugin } = await import("./setup-QXZHVVDP.js");
142
146
  await runCleanPlugin();
143
147
  return;
144
148
  }
145
149
  if (sub === "setup" && sub2 === "codex") {
146
- const { runSetupCodex } = await import("./setup-QRUDA7ES.js");
150
+ const { runSetupCodex } = await import("./setup-QXZHVVDP.js");
147
151
  await runSetupCodex();
148
152
  return;
149
153
  }
150
154
  if (sub === "unsetup" && sub2 === "codex") {
151
- const { runUnsetupCodex } = await import("./setup-QRUDA7ES.js");
155
+ const { runUnsetupCodex } = await import("./setup-QXZHVVDP.js");
152
156
  await runUnsetupCodex();
153
157
  return;
154
158
  }
155
159
  if (sub === "setup") {
156
- const { runSetup } = await import("./setup-QRUDA7ES.js");
160
+ const { runSetup } = await import("./setup-QXZHVVDP.js");
157
161
  await runSetup();
158
162
  return;
159
163
  }
160
164
  if (sub === "unsetup") {
161
- const { runUnsetup } = await import("./setup-QRUDA7ES.js");
165
+ const { runUnsetup } = await import("./setup-QXZHVVDP.js");
162
166
  await runUnsetup();
163
167
  return;
164
168
  }
165
169
  if (sub === "http") {
166
- const { startHttpServer } = await import("./server-D3H6AMVD.js");
170
+ const { startHttpServer } = await import("./server-QWAZPBHU.js");
167
171
  startHttpServer();
168
172
  return;
169
173
  }
@@ -173,7 +177,7 @@ async function main() {
173
177
  Usage:
174
178
  plaud-mcp start MCP over stdio
175
179
  plaud-mcp install detect AI clients, configure them, and run OAuth inline (recommended)
176
- plaud-mcp install --yes non-interactive; auto-configure every detected client (for agent-driven install)
180
+ plaud-mcp install --yes non-interactive; auto-configure detected local clients (skips manual web connectors)
177
181
  plaud-mcp install --no-login skip the OAuth step (for CI / headless setup)
178
182
  plaud-mcp http start HTTP MCP server (advanced)
179
183
  plaud-mcp setup [deprecated] alias for install (Claude Desktop only)