porkbun-mcp-server 1.3.0 → 1.4.1
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 -26
- package/dist/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +49 -52
- package/dist/client.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tools/_shared.d.ts +3 -9
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/_shared.js +6 -13
- package/dist/tools/_shared.js.map +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -29,31 +29,22 @@ Get your API keys at [porkbun.com/account/api](https://porkbun.com/account/api).
|
|
|
29
29
|
|
|
30
30
|
### Multiple accounts
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Create a JSON file listing your accounts and point `PORKBUN_ACCOUNTS_FILE` at it:
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export PORKBUN_API_KEY_ALICE="pk1_..."
|
|
38
|
-
export PORKBUN_SECRET_API_KEY_ALICE="sk1_..."
|
|
39
|
-
|
|
40
|
-
export PORKBUN_API_KEY_ACME_CORP="pk1_..."
|
|
41
|
-
export PORKBUN_SECRET_API_KEY_ACME_CORP="sk1_..."
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
The user identifier is the suffix, lowercased — so `PORKBUN_API_KEY_ACME_CORP` is selected with `"user": "acme_corp"` (or `"acme-corp"`, since matching is case- and separator-insensitive at lookup time).
|
|
45
|
-
|
|
46
|
-
**Option B: `PORKBUN_ACCOUNTS` JSON array**
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
export PORKBUN_ACCOUNTS='[
|
|
34
|
+
```json
|
|
35
|
+
// ~/.porkbun-accounts.json
|
|
36
|
+
[
|
|
50
37
|
{ "user": "default", "PORKBUN_API_KEY": "pk1_...", "PORKBUN_SECRET_API_KEY": "sk1_..." },
|
|
51
38
|
{ "user": "alice", "PORKBUN_API_KEY": "pk1_...", "PORKBUN_SECRET_API_KEY": "sk1_..." },
|
|
52
39
|
{ "user": "acme-corp", "PORKBUN_API_KEY": "pk1_...", "PORKBUN_SECRET_API_KEY": "sk1_..." }
|
|
53
|
-
]
|
|
40
|
+
]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
export PORKBUN_ACCOUNTS_FILE="$HOME/.porkbun-accounts.json"
|
|
54
45
|
```
|
|
55
46
|
|
|
56
|
-
The `apiKey`
|
|
47
|
+
The shorthand aliases `apiKey` and `secretApiKey` are also accepted inside the file.
|
|
57
48
|
|
|
58
49
|
Then pass `user` to any authenticated tool:
|
|
59
50
|
|
|
@@ -70,9 +61,8 @@ Then pass `user` to any authenticated tool:
|
|
|
70
61
|
|
|
71
62
|
Resolution rules:
|
|
72
63
|
|
|
73
|
-
- The default account (used when `user` is omitted) is `PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY`, or the `
|
|
64
|
+
- The default account (used when `user` is omitted) is `PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY`, or — if defined — the entry in `PORKBUN_ACCOUNTS_FILE` with `user: "default"`.
|
|
74
65
|
- A `user` argument matches a configured account by lowercased identifier.
|
|
75
|
-
- Sources are merged — if the same user appears in multiple sources, `PORKBUN_ACCOUNTS` wins over suffixed env vars.
|
|
76
66
|
- Use `porkbun_list_users` to discover which user identifiers are configured.
|
|
77
67
|
|
|
78
68
|
## Usage with Claude Desktop
|
|
@@ -88,16 +78,15 @@ Add to your Claude Desktop config (`claude_desktop_config.json`):
|
|
|
88
78
|
"env": {
|
|
89
79
|
"PORKBUN_API_KEY": "pk1_...",
|
|
90
80
|
"PORKBUN_SECRET_API_KEY": "sk1_...",
|
|
91
|
-
"
|
|
92
|
-
"PORKBUN_SECRET_API_KEY_ALICE": "sk1_...",
|
|
93
|
-
"PORKBUN_API_KEY_ACME_CORP": "pk1_...",
|
|
94
|
-
"PORKBUN_SECRET_API_KEY_ACME_CORP": "sk1_..."
|
|
81
|
+
"PORKBUN_ACCOUNTS_FILE": "/Users/you/.porkbun-accounts.json"
|
|
95
82
|
}
|
|
96
83
|
}
|
|
97
84
|
}
|
|
98
85
|
}
|
|
99
86
|
```
|
|
100
87
|
|
|
88
|
+
`PORKBUN_ACCOUNTS_FILE` is optional — leave it out for a single-account setup.
|
|
89
|
+
|
|
101
90
|
## Tools (33)
|
|
102
91
|
|
|
103
92
|
### Utility
|
|
@@ -149,7 +138,7 @@ Add to your Claude Desktop config (`claude_desktop_config.json`):
|
|
|
149
138
|
### Marketplace
|
|
150
139
|
- `porkbun_marketplace_list` — List marketplace domains
|
|
151
140
|
|
|
152
|
-
Every authenticated tool accepts an optional `user` parameter that selects which
|
|
141
|
+
Every authenticated tool accepts an optional `user` parameter that selects which account from `PORKBUN_ACCOUNTS_FILE` to use. Omit it to use the default account.
|
|
153
142
|
|
|
154
143
|
## Development
|
|
155
144
|
|
package/dist/client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Returns the list of configured user identifiers, lowercased.
|
|
3
3
|
*
|
|
4
4
|
* Includes "default" when default credentials are present, plus any users
|
|
5
|
-
* defined
|
|
5
|
+
* defined in the file referenced by `PORKBUN_ACCOUNTS_FILE`.
|
|
6
6
|
*/
|
|
7
7
|
export declare function listConfiguredUsers(): string[];
|
|
8
8
|
/** Test-only: clear the parsed-accounts cache. */
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAiIA;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C;AAED,kDAAkD;AAClD,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED,wBAAsB,cAAc,CAAC,CAAC,EACpC,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,CAAC,CAAC,CAyBZ;AAED,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,CAAC,CAAC,CAkBZ"}
|
package/dist/client.js
CHANGED
|
@@ -4,27 +4,54 @@ exports.listConfiguredUsers = listConfiguredUsers;
|
|
|
4
4
|
exports._resetAccountsCache = _resetAccountsCache;
|
|
5
5
|
exports.porkbunRequest = porkbunRequest;
|
|
6
6
|
exports.porkbunRequestNoAuth = porkbunRequestNoAuth;
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
7
8
|
const BASE_URL = "https://api.porkbun.com/api/json/v3";
|
|
8
9
|
let cachedAccounts = null;
|
|
9
10
|
let cachedSnapshot;
|
|
10
11
|
function envSnapshot() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
return [
|
|
13
|
+
`PORKBUN_API_KEY=${process.env.PORKBUN_API_KEY ?? ""}`,
|
|
14
|
+
`PORKBUN_SECRET_API_KEY=${process.env.PORKBUN_SECRET_API_KEY ?? ""}`,
|
|
15
|
+
`PORKBUN_ACCOUNTS_FILE=${process.env.PORKBUN_ACCOUNTS_FILE ?? ""}`,
|
|
16
|
+
].join("\n");
|
|
17
|
+
}
|
|
18
|
+
function parseAccountsJson(raw, source) {
|
|
19
|
+
let parsed;
|
|
20
|
+
try {
|
|
21
|
+
parsed = JSON.parse(raw);
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
throw new Error(`${source} is not valid JSON: ${err instanceof Error ? err.message : String(err)}`);
|
|
25
|
+
}
|
|
26
|
+
if (!Array.isArray(parsed)) {
|
|
27
|
+
throw new Error(`${source} must be a JSON array of account objects`);
|
|
28
|
+
}
|
|
29
|
+
const out = new Map();
|
|
30
|
+
for (const [i, entry] of parsed.entries()) {
|
|
31
|
+
if (!entry || typeof entry !== "object") {
|
|
32
|
+
throw new Error(`${source}[${i}] is not an object`);
|
|
17
33
|
}
|
|
34
|
+
const acc = entry;
|
|
35
|
+
const apiKey = acc.PORKBUN_API_KEY ?? acc.apiKey;
|
|
36
|
+
const secretApiKey = acc.PORKBUN_SECRET_API_KEY ?? acc.secretApiKey;
|
|
37
|
+
if (!apiKey || !secretApiKey) {
|
|
38
|
+
throw new Error(`${source}[${i}] is missing PORKBUN_API_KEY or PORKBUN_SECRET_API_KEY`);
|
|
39
|
+
}
|
|
40
|
+
const user = (acc.user ?? "default").trim().toLowerCase();
|
|
41
|
+
if (out.has(user)) {
|
|
42
|
+
throw new Error(`${source} contains duplicate user "${user}"`);
|
|
43
|
+
}
|
|
44
|
+
out.set(user, { user, apiKey, secretApiKey });
|
|
18
45
|
}
|
|
19
|
-
return
|
|
46
|
+
return out;
|
|
20
47
|
}
|
|
21
48
|
/**
|
|
22
|
-
* Build the account map from
|
|
49
|
+
* Build the account map from supported configuration sources, merged in
|
|
23
50
|
* this order (later sources override earlier ones for the same user):
|
|
24
51
|
*
|
|
25
|
-
* 1. Top-level PORKBUN_API_KEY / PORKBUN_SECRET_API_KEY → "default" account
|
|
26
|
-
* 2.
|
|
27
|
-
*
|
|
52
|
+
* 1. Top-level `PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY` → "default" account
|
|
53
|
+
* 2. `PORKBUN_ACCOUNTS_FILE` — path to a JSON file containing
|
|
54
|
+
* `[{user, PORKBUN_API_KEY, PORKBUN_SECRET_API_KEY}, ...]`
|
|
28
55
|
*
|
|
29
56
|
* User identifiers are lowercased throughout.
|
|
30
57
|
*/
|
|
@@ -41,49 +68,18 @@ function parseAccounts() {
|
|
|
41
68
|
secretApiKey: process.env.PORKBUN_SECRET_API_KEY,
|
|
42
69
|
});
|
|
43
70
|
}
|
|
44
|
-
// 2.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
continue;
|
|
49
|
-
const suffix = m[1];
|
|
50
|
-
const apiKey = process.env[envKey];
|
|
51
|
-
const secretApiKey = process.env[`PORKBUN_SECRET_API_KEY_${suffix}`];
|
|
52
|
-
if (!apiKey || !secretApiKey)
|
|
53
|
-
continue;
|
|
54
|
-
const user = suffix.toLowerCase();
|
|
55
|
-
map.set(user, { user, apiKey, secretApiKey });
|
|
56
|
-
}
|
|
57
|
-
// 3. PORKBUN_ACCOUNTS JSON array (overrides anything above)
|
|
58
|
-
const raw = process.env.PORKBUN_ACCOUNTS;
|
|
59
|
-
if (raw && raw.trim()) {
|
|
60
|
-
let parsed;
|
|
71
|
+
// 2. PORKBUN_ACCOUNTS_FILE — path to a JSON file containing the array
|
|
72
|
+
const filePath = process.env.PORKBUN_ACCOUNTS_FILE;
|
|
73
|
+
if (filePath && filePath.trim()) {
|
|
74
|
+
let raw;
|
|
61
75
|
try {
|
|
62
|
-
|
|
76
|
+
raw = (0, node_fs_1.readFileSync)(filePath.trim(), "utf8");
|
|
63
77
|
}
|
|
64
78
|
catch (err) {
|
|
65
|
-
throw new Error(`
|
|
66
|
-
}
|
|
67
|
-
if (!Array.isArray(parsed)) {
|
|
68
|
-
throw new Error("PORKBUN_ACCOUNTS must be a JSON array of account objects");
|
|
79
|
+
throw new Error(`PORKBUN_ACCOUNTS_FILE could not be read at "${filePath}": ${err instanceof Error ? err.message : String(err)}`);
|
|
69
80
|
}
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
if (!entry || typeof entry !== "object") {
|
|
73
|
-
throw new Error(`PORKBUN_ACCOUNTS[${i}] is not an object`);
|
|
74
|
-
}
|
|
75
|
-
const acc = entry;
|
|
76
|
-
const apiKey = acc.PORKBUN_API_KEY ?? acc.apiKey;
|
|
77
|
-
const secretApiKey = acc.PORKBUN_SECRET_API_KEY ?? acc.secretApiKey;
|
|
78
|
-
if (!apiKey || !secretApiKey) {
|
|
79
|
-
throw new Error(`PORKBUN_ACCOUNTS[${i}] is missing PORKBUN_API_KEY or PORKBUN_SECRET_API_KEY`);
|
|
80
|
-
}
|
|
81
|
-
const user = (acc.user ?? "default").trim().toLowerCase();
|
|
82
|
-
if (seen.has(user)) {
|
|
83
|
-
throw new Error(`PORKBUN_ACCOUNTS contains duplicate user "${user}"`);
|
|
84
|
-
}
|
|
85
|
-
seen.add(user);
|
|
86
|
-
map.set(user, { user, apiKey, secretApiKey });
|
|
81
|
+
for (const [user, acc] of parseAccountsJson(raw, "PORKBUN_ACCOUNTS_FILE")) {
|
|
82
|
+
map.set(user, acc);
|
|
87
83
|
}
|
|
88
84
|
}
|
|
89
85
|
cachedAccounts = map;
|
|
@@ -97,7 +93,8 @@ function resolveAccount(user) {
|
|
|
97
93
|
if (!acc) {
|
|
98
94
|
if (!user || key === "default") {
|
|
99
95
|
throw new Error("No default Porkbun credentials configured. Set PORKBUN_API_KEY and " +
|
|
100
|
-
"PORKBUN_SECRET_API_KEY (or
|
|
96
|
+
"PORKBUN_SECRET_API_KEY (or include a default entry in the file " +
|
|
97
|
+
"referenced by PORKBUN_ACCOUNTS_FILE).");
|
|
101
98
|
}
|
|
102
99
|
const known = [...accounts.keys()].join(", ") || "(none)";
|
|
103
100
|
throw new Error(`No Porkbun credentials configured for user "${user}". Configured users: ${known}`);
|
|
@@ -108,7 +105,7 @@ function resolveAccount(user) {
|
|
|
108
105
|
* Returns the list of configured user identifiers, lowercased.
|
|
109
106
|
*
|
|
110
107
|
* Includes "default" when default credentials are present, plus any users
|
|
111
|
-
* defined
|
|
108
|
+
* defined in the file referenced by `PORKBUN_ACCOUNTS_FILE`.
|
|
112
109
|
*/
|
|
113
110
|
function listConfiguredUsers() {
|
|
114
111
|
return [...parseAccounts().keys()];
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;AAuIA,kDAEC;AAGD,kDAGC;AAED,wCA6BC;AAED,oDAqBC;AArMD,qCAAuC;AAEvC,MAAM,QAAQ,GAAG,qCAAqC,CAAC;AAgBvD,IAAI,cAAc,GAAgC,IAAI,CAAC;AACvD,IAAI,cAAkC,CAAC;AAEvC,SAAS,WAAW;IAClB,OAAO;QACL,mBAAmB,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,EAAE;QACtD,0BAA0B,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,EAAE,EAAE;QACpE,yBAAyB,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE,EAAE;KACnE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,iBAAiB,CAAC,GAAW,EAAE,MAAc;IACpD,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,uBAAuB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACnF,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,0CAA0C,CAAC,CAAC;IACvE,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAmB,CAAC;IACvC,KAAK,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;QAC1C,IAAI,CAAC,KAAK,IAAI,OAAO,KA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C;QACpE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,IAAS,CAAC;AACnB,CAAC;AAEM,KAAK,UAAU,oBAAoB,CACxC,IAAY,EACZ,IAA8B;IAE9B,MAAM,GAAG,GAAG,GAAG,QAAQ,GAAG,IAAI,EAAE,CAAC;IAEjC,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAC3B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC;KACjC,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAA4B,CAAC;IAE3D,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAI,IAAI,CAAC,OAAkB,IAAI,2BAA2B,CAAC;QACpE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,IAAS,CAAC;AACnB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const email_js_1 = require("./tools/email.js");
|
|
|
13
13
|
const marketplace_js_1 = require("./tools/marketplace.js");
|
|
14
14
|
const server = new mcp_js_1.McpServer({
|
|
15
15
|
name: "porkbun-mcp",
|
|
16
|
-
version: "1.
|
|
16
|
+
version: "1.4.1",
|
|
17
17
|
});
|
|
18
18
|
const allTools = [
|
|
19
19
|
...utility_js_1.utilityTools,
|
package/dist/tools/_shared.d.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
3
|
* Optional `user` field added to every authenticated tool. Selects which
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* • Suffixed env vars `PORKBUN_API_KEY_<USER>` / `PORKBUN_SECRET_API_KEY_<USER>`
|
|
8
|
-
* • A `PORKBUN_ACCOUNTS` JSON array of `{user, PORKBUN_API_KEY, PORKBUN_SECRET_API_KEY}`
|
|
9
|
-
*
|
|
10
|
-
* Omit `user` to use the default account
|
|
11
|
-
* (`PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY`, or the `PORKBUN_ACCOUNTS`
|
|
12
|
-
* entry with `user: "default"`).
|
|
4
|
+
* account from the file referenced by `PORKBUN_ACCOUNTS_FILE` to use. Omit
|
|
5
|
+
* to use the default account from `PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY`
|
|
6
|
+
* (or a `user: "default"` entry in the accounts file).
|
|
13
7
|
*/
|
|
14
8
|
export declare const userField: z.ZodOptional<z.ZodString>;
|
|
15
9
|
//# sourceMappingURL=_shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,SAAS,4BAOnB,CAAC"}
|
package/dist/tools/_shared.js
CHANGED
|
@@ -4,21 +4,14 @@ exports.userField = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
/**
|
|
6
6
|
* Optional `user` field added to every authenticated tool. Selects which
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* • Suffixed env vars `PORKBUN_API_KEY_<USER>` / `PORKBUN_SECRET_API_KEY_<USER>`
|
|
11
|
-
* • A `PORKBUN_ACCOUNTS` JSON array of `{user, PORKBUN_API_KEY, PORKBUN_SECRET_API_KEY}`
|
|
12
|
-
*
|
|
13
|
-
* Omit `user` to use the default account
|
|
14
|
-
* (`PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY`, or the `PORKBUN_ACCOUNTS`
|
|
15
|
-
* entry with `user: "default"`).
|
|
7
|
+
* account from the file referenced by `PORKBUN_ACCOUNTS_FILE` to use. Omit
|
|
8
|
+
* to use the default account from `PORKBUN_API_KEY` / `PORKBUN_SECRET_API_KEY`
|
|
9
|
+
* (or a `user: "default"` entry in the accounts file).
|
|
16
10
|
*/
|
|
17
11
|
exports.userField = zod_1.z
|
|
18
12
|
.string()
|
|
19
13
|
.optional()
|
|
20
|
-
.describe("Optional user identifier to select which Porkbun account
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"Matching is case-insensitive. Omit to use the default account.");
|
|
14
|
+
.describe("Optional user identifier to select which Porkbun account to use from the " +
|
|
15
|
+
"file referenced by PORKBUN_ACCOUNTS_FILE. Matching is case-insensitive. " +
|
|
16
|
+
"Omit to use the default account (PORKBUN_API_KEY / PORKBUN_SECRET_API_KEY).");
|
|
24
17
|
//# sourceMappingURL=_shared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB
|
|
1
|
+
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB;;;;;GAKG;AACU,QAAA,SAAS,GAAG,OAAC;KACvB,MAAM,EAAE;KACR,QAAQ,EAAE;KACV,QAAQ,CACP,2EAA2E;IACzE,0EAA0E;IAC1E,6EAA6E,CAChF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "porkbun-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "MCP server for Porkbun API v3 — domain registration, DNS management, SSL certificates, and more",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -38,13 +38,16 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
42
|
-
"zod": "^4.
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
42
|
+
"zod": "^4.6.7"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^25.5.2",
|
|
46
46
|
"ts-node": "^10.9.2",
|
|
47
47
|
"typescript": "^6.0.2",
|
|
48
48
|
"vitest": "^4.1.2"
|
|
49
|
+
},
|
|
50
|
+
"overrides": {
|
|
51
|
+
"@hono/node-server": "1.19.17"
|
|
49
52
|
}
|
|
50
53
|
}
|