@plaud-ai/mcp 0.1.3 → 0.1.4
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/dist/index.js
CHANGED
|
@@ -410,10 +410,15 @@ server.tool("logout", "Log out and revoke authorization", async () => {
|
|
|
410
410
|
});
|
|
411
411
|
async function main() {
|
|
412
412
|
if (process.argv[2] === "setup") {
|
|
413
|
-
const { runSetup } = await import("./setup-
|
|
413
|
+
const { runSetup } = await import("./setup-JK7UZOLW.js");
|
|
414
414
|
await runSetup();
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
|
+
if (process.argv[2] === "unsetup") {
|
|
418
|
+
const { runUnsetup } = await import("./setup-JK7UZOLW.js");
|
|
419
|
+
await runUnsetup();
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
417
422
|
const transport = new StdioServerTransport();
|
|
418
423
|
await server.connect(transport);
|
|
419
424
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
3
3
|
import { join, dirname } from "path";
|
|
4
4
|
import { homedir } from "os";
|
|
5
|
-
var MCP_ENTRY = { command: "plaud-mcp" };
|
|
5
|
+
var MCP_ENTRY = { command: "npx", args: ["-y", "@plaud-ai/mcp@latest"] };
|
|
6
6
|
function getConfigPath() {
|
|
7
7
|
if (process.platform === "darwin") {
|
|
8
8
|
return join(homedir(), "Library", "Application Support", "Claude", "claude_desktop_config.json");
|
|
@@ -12,6 +12,31 @@ function getConfigPath() {
|
|
|
12
12
|
}
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
|
+
async function runUnsetup() {
|
|
16
|
+
const configPath = getConfigPath();
|
|
17
|
+
if (!configPath) {
|
|
18
|
+
console.error("Claude Desktop is only supported on macOS and Windows.");
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
let config = {};
|
|
22
|
+
try {
|
|
23
|
+
const raw = await readFile(configPath, "utf-8");
|
|
24
|
+
config = JSON.parse(raw);
|
|
25
|
+
} catch {
|
|
26
|
+
console.log("Claude Desktop config file not found. Nothing to remove.");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const mcpServers = config.mcpServers ?? {};
|
|
30
|
+
if (!mcpServers.plaud) {
|
|
31
|
+
console.log("Plaud is not configured in Claude Desktop. Nothing to remove.");
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const { plaud: _, ...rest } = mcpServers;
|
|
35
|
+
config.mcpServers = rest;
|
|
36
|
+
await writeFile(configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
37
|
+
console.log("Plaud has been removed from Claude Desktop.");
|
|
38
|
+
console.log("Please restart Claude Desktop to complete the unsetup.");
|
|
39
|
+
}
|
|
15
40
|
async function runSetup() {
|
|
16
41
|
const configPath = getConfigPath();
|
|
17
42
|
if (!configPath) {
|
|
@@ -37,5 +62,6 @@ async function runSetup() {
|
|
|
37
62
|
console.log("Please restart Claude Desktop to complete the setup.");
|
|
38
63
|
}
|
|
39
64
|
export {
|
|
40
|
-
runSetup
|
|
65
|
+
runSetup,
|
|
66
|
+
runUnsetup
|
|
41
67
|
};
|