@kadoa/mcp 0.1.0 → 0.1.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/README.md +15 -4
- package/dist/index.js +21 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -6,16 +6,26 @@ Use [Kadoa](https://kadoa.com) from Claude Desktop, Cursor, Claude Code, and oth
|
|
|
6
6
|
|
|
7
7
|
### Claude Code
|
|
8
8
|
|
|
9
|
+
Add for the current project:
|
|
10
|
+
|
|
9
11
|
```bash
|
|
10
12
|
claude mcp add --transport stdio kadoa -- npx -y @kadoa/mcp
|
|
11
13
|
```
|
|
12
14
|
|
|
15
|
+
Or add for all projects:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
claude mcp add --transport stdio -s user kadoa -- npx -y @kadoa/mcp
|
|
19
|
+
```
|
|
20
|
+
|
|
13
21
|
Set your API key:
|
|
14
22
|
|
|
15
23
|
```bash
|
|
16
24
|
export KADOA_API_KEY=tk-your_api_key
|
|
17
25
|
```
|
|
18
26
|
|
|
27
|
+
Or if you have the [Kadoa CLI](https://www.npmjs.com/package/@kadoa/cli) installed, just run `kadoa login` and the MCP will use your saved key automatically.
|
|
28
|
+
|
|
19
29
|
### Claude Desktop
|
|
20
30
|
|
|
21
31
|
Add to `~/.config/Claude/claude_desktop_config.json`:
|
|
@@ -25,7 +35,7 @@ Add to `~/.config/Claude/claude_desktop_config.json`:
|
|
|
25
35
|
"mcpServers": {
|
|
26
36
|
"kadoa": {
|
|
27
37
|
"command": "npx",
|
|
28
|
-
"args": ["-y", "kadoa
|
|
38
|
+
"args": ["-y", "@kadoa/mcp"],
|
|
29
39
|
"env": {
|
|
30
40
|
"KADOA_API_KEY": "tk-your_api_key"
|
|
31
41
|
}
|
|
@@ -45,7 +55,7 @@ Add to `.cursor/mcp.json`:
|
|
|
45
55
|
"mcpServers": {
|
|
46
56
|
"kadoa": {
|
|
47
57
|
"command": "npx",
|
|
48
|
-
"args": ["-y", "kadoa
|
|
58
|
+
"args": ["-y", "@kadoa/mcp"],
|
|
49
59
|
"env": {
|
|
50
60
|
"KADOA_API_KEY": "tk-your_api_key"
|
|
51
61
|
}
|
|
@@ -82,8 +92,9 @@ Ask your AI assistant:
|
|
|
82
92
|
|
|
83
93
|
## Troubleshooting
|
|
84
94
|
|
|
85
|
-
**"
|
|
86
|
-
-
|
|
95
|
+
**"No API key found"**
|
|
96
|
+
- Run `kadoa login` (requires `npm i -g @kadoa/cli`), or
|
|
97
|
+
- Set `KADOA_API_KEY` in your MCP config or environment
|
|
87
98
|
- API keys start with `tk-`
|
|
88
99
|
|
|
89
100
|
**Claude says "I don't have access to Kadoa"**
|
package/dist/index.js
CHANGED
|
@@ -17782,6 +17782,11 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
17782
17782
|
exports.default = formatsPlugin;
|
|
17783
17783
|
});
|
|
17784
17784
|
|
|
17785
|
+
// src/index.ts
|
|
17786
|
+
import { existsSync, readFileSync } from "fs";
|
|
17787
|
+
import { join } from "path";
|
|
17788
|
+
import { homedir } from "os";
|
|
17789
|
+
|
|
17785
17790
|
// node_modules/axios/lib/helpers/bind.js
|
|
17786
17791
|
function bind(fn, thisArg) {
|
|
17787
17792
|
return function wrap() {
|
|
@@ -34214,14 +34219,27 @@ var ServerResultSchema2 = union([
|
|
|
34214
34219
|
]);
|
|
34215
34220
|
|
|
34216
34221
|
// src/index.ts
|
|
34222
|
+
function loadApiKeyFromConfig() {
|
|
34223
|
+
const home = process.env.HOME || homedir();
|
|
34224
|
+
const configFile = join(home, ".kadoa", "config.json");
|
|
34225
|
+
if (!existsSync(configFile))
|
|
34226
|
+
return;
|
|
34227
|
+
try {
|
|
34228
|
+
const config2 = JSON.parse(readFileSync(configFile, "utf-8"));
|
|
34229
|
+
return config2.apiKey;
|
|
34230
|
+
} catch {
|
|
34231
|
+
return;
|
|
34232
|
+
}
|
|
34233
|
+
}
|
|
34234
|
+
|
|
34217
34235
|
class KadoaMcpServer {
|
|
34218
34236
|
server;
|
|
34219
34237
|
client;
|
|
34220
34238
|
constructor(apiKey) {
|
|
34221
34239
|
this.server = new Server({ name: "kadoa", version: "0.1.0" }, { capabilities: { tools: {} } });
|
|
34222
|
-
const key = apiKey || process.env.KADOA_API_KEY;
|
|
34240
|
+
const key = apiKey || process.env.KADOA_API_KEY || loadApiKeyFromConfig();
|
|
34223
34241
|
if (!key) {
|
|
34224
|
-
throw new Error("KADOA_API_KEY
|
|
34242
|
+
throw new Error("No API key found. Set KADOA_API_KEY env var or run 'kadoa login' (npm i -g @kadoa/cli).");
|
|
34225
34243
|
}
|
|
34226
34244
|
this.client = new KadoaClient({ apiKey: key });
|
|
34227
34245
|
this.setupHandlers();
|
|
@@ -34644,8 +34662,7 @@ class KadoaMcpServer {
|
|
|
34644
34662
|
console.error("Connected to Kadoa API");
|
|
34645
34663
|
}
|
|
34646
34664
|
}
|
|
34647
|
-
|
|
34648
|
-
if (isMainModule) {
|
|
34665
|
+
if (!process.env.VITEST && !process.env.BUN_TEST) {
|
|
34649
34666
|
new KadoaMcpServer().run().catch((error2) => {
|
|
34650
34667
|
console.error("Fatal error:", error2);
|
|
34651
34668
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kadoa/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Kadoa MCP Server — manage workflows from Claude Desktop, Cursor, and other MCP clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
18
|
"dev": "bun src/index.ts",
|
|
19
|
-
"build": "bun build src/index.ts --outdir=dist --target=node &&
|
|
19
|
+
"build": "bun build src/index.ts --outdir=dist --target=node && node -e \"const f='dist/index.js';require('fs').writeFileSync(f,require('fs').readFileSync(f,'utf8').replace('#!/usr/bin/env bun','#!/usr/bin/env node'))\"",
|
|
20
20
|
"check-types": "tsc --noEmit",
|
|
21
|
-
"test": "bun test",
|
|
22
|
-
"test:unit": "bun test tests/unit --timeout=120000",
|
|
21
|
+
"test": "BUN_TEST=1 bun test",
|
|
22
|
+
"test:unit": "BUN_TEST=1 bun test tests/unit --timeout=120000",
|
|
23
23
|
"prepublishOnly": "bun run check-types && bun run test:unit && bun run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|