@plaud-ai/mcp 0.1.0 → 0.1.3
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 +5 -0
- package/dist/setup-L2IP3BEI.js +41 -0
- package/package.json +5 -2
- package/plugin.json +14 -0
package/dist/index.js
CHANGED
|
@@ -409,6 +409,11 @@ server.tool("logout", "Log out and revoke authorization", async () => {
|
|
|
409
409
|
};
|
|
410
410
|
});
|
|
411
411
|
async function main() {
|
|
412
|
+
if (process.argv[2] === "setup") {
|
|
413
|
+
const { runSetup } = await import("./setup-L2IP3BEI.js");
|
|
414
|
+
await runSetup();
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
412
417
|
const transport = new StdioServerTransport();
|
|
413
418
|
await server.connect(transport);
|
|
414
419
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/setup.ts
|
|
2
|
+
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
3
|
+
import { join, dirname } from "path";
|
|
4
|
+
import { homedir } from "os";
|
|
5
|
+
var MCP_ENTRY = { command: "plaud-mcp" };
|
|
6
|
+
function getConfigPath() {
|
|
7
|
+
if (process.platform === "darwin") {
|
|
8
|
+
return join(homedir(), "Library", "Application Support", "Claude", "claude_desktop_config.json");
|
|
9
|
+
}
|
|
10
|
+
if (process.platform === "win32") {
|
|
11
|
+
return join(process.env.APPDATA ?? "", "Claude", "claude_desktop_config.json");
|
|
12
|
+
}
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
async function runSetup() {
|
|
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
|
+
}
|
|
27
|
+
const mcpServers = config.mcpServers ?? {};
|
|
28
|
+
if (mcpServers.plaud) {
|
|
29
|
+
console.log("Plaud is already configured in Claude Desktop.");
|
|
30
|
+
console.log("Restart Claude Desktop if you haven't already.");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
config.mcpServers = { ...mcpServers, plaud: MCP_ENTRY };
|
|
34
|
+
await mkdir(dirname(configPath), { recursive: true });
|
|
35
|
+
await writeFile(configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
36
|
+
console.log("Plaud has been added to Claude Desktop.");
|
|
37
|
+
console.log("Please restart Claude Desktop to complete the setup.");
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
runSetup
|
|
41
|
+
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaud-ai/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"plaud-mcp": "dist/index.js"
|
|
8
8
|
},
|
|
9
|
-
"files": [
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"plugin.json"
|
|
12
|
+
],
|
|
10
13
|
"scripts": {
|
|
11
14
|
"build": "tsup",
|
|
12
15
|
"dev": "tsup --watch",
|
package/plugin.json
ADDED