porkbun-mcp-server 1.0.0
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 +109 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +53 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/apikey.d.ts +21 -0
- package/dist/tools/apikey.d.ts.map +1 -0
- package/dist/tools/apikey.js +28 -0
- package/dist/tools/apikey.js.map +1 -0
- package/dist/tools/dns.d.ts +163 -0
- package/dist/tools/dns.d.ts.map +1 -0
- package/dist/tools/dns.js +161 -0
- package/dist/tools/dns.js.map +1 -0
- package/dist/tools/domain.d.ts +132 -0
- package/dist/tools/domain.d.ts.map +1 -0
- package/dist/tools/domain.js +171 -0
- package/dist/tools/domain.js.map +1 -0
- package/dist/tools/email.d.ts +14 -0
- package/dist/tools/email.d.ts.map +1 -0
- package/dist/tools/email.js +22 -0
- package/dist/tools/email.js.map +1 -0
- package/dist/tools/marketplace.d.ts +14 -0
- package/dist/tools/marketplace.d.ts.map +1 -0
- package/dist/tools/marketplace.js +22 -0
- package/dist/tools/marketplace.js.map +1 -0
- package/dist/tools/pricing.d.ts +12 -0
- package/dist/tools/pricing.d.ts.map +1 -0
- package/dist/tools/pricing.js +18 -0
- package/dist/tools/pricing.js.map +1 -0
- package/dist/tools/ssl.d.ts +12 -0
- package/dist/tools/ssl.d.ts.map +1 -0
- package/dist/tools/ssl.js +18 -0
- package/dist/tools/ssl.js.map +1 -0
- package/dist/tools/utility.d.ts +8 -0
- package/dist/tools/utility.d.ts.map +1 -0
- package/dist/tools/utility.js +24 -0
- package/dist/tools/utility.js.map +1 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# porkbun-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for the [Porkbun API v3](https://porkbun.com/api/json/v3/documentation) — 32 tools covering domain registration, DNS management, SSL certificates, email hosting, marketplace, and more.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### npm
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g porkbun-mcp-server
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### GitHub Packages
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @eyalm321/porkbun-mcp-server --registry=https://npm.pkg.github.com
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
Set the following environment variables:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
export PORKBUN_API_KEY="pk1_..."
|
|
25
|
+
export PORKBUN_SECRET_API_KEY="sk1_..."
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Get your API keys at [porkbun.com/account/api](https://porkbun.com/account/api).
|
|
29
|
+
|
|
30
|
+
## Usage with Claude Desktop
|
|
31
|
+
|
|
32
|
+
Add to your Claude Desktop config (`claude_desktop_config.json`):
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"porkbun": {
|
|
38
|
+
"command": "npx",
|
|
39
|
+
"args": ["-y", "porkbun-mcp-server"],
|
|
40
|
+
"env": {
|
|
41
|
+
"PORKBUN_API_KEY": "pk1_...",
|
|
42
|
+
"PORKBUN_SECRET_API_KEY": "sk1_..."
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Tools (32)
|
|
50
|
+
|
|
51
|
+
### Utility
|
|
52
|
+
- `porkbun_ping` — Test credentials and get IP
|
|
53
|
+
- `porkbun_get_ip` — Get public IP (no auth)
|
|
54
|
+
|
|
55
|
+
### Pricing
|
|
56
|
+
- `porkbun_get_pricing` — Get domain pricing for all TLDs (no auth)
|
|
57
|
+
|
|
58
|
+
### API Key Management
|
|
59
|
+
- `porkbun_apikey_request` — Initiate API key authorization
|
|
60
|
+
- `porkbun_apikey_retrieve` — Poll for API key approval
|
|
61
|
+
|
|
62
|
+
### Domain (13 tools)
|
|
63
|
+
- `porkbun_domain_list_all` — List all domains
|
|
64
|
+
- `porkbun_domain_get_ns` — Get nameservers
|
|
65
|
+
- `porkbun_domain_update_ns` — Update nameservers
|
|
66
|
+
- `porkbun_domain_update_auto_renew` — Update auto-renew
|
|
67
|
+
- `porkbun_domain_check` — Check availability & pricing
|
|
68
|
+
- `porkbun_domain_create` — Register a domain
|
|
69
|
+
- `porkbun_domain_add_url_forward` — Add URL forward
|
|
70
|
+
- `porkbun_domain_get_url_forwarding` — List URL forwards
|
|
71
|
+
- `porkbun_domain_delete_url_forward` — Delete URL forward
|
|
72
|
+
- `porkbun_domain_create_glue` — Create glue record
|
|
73
|
+
- `porkbun_domain_update_glue` — Update glue record
|
|
74
|
+
- `porkbun_domain_delete_glue` — Delete glue record
|
|
75
|
+
- `porkbun_domain_get_glue` — Get glue records
|
|
76
|
+
|
|
77
|
+
### DNS (11 tools)
|
|
78
|
+
- `porkbun_dns_retrieve` — Retrieve all DNS records
|
|
79
|
+
- `porkbun_dns_retrieve_by_id` — Get record by ID
|
|
80
|
+
- `porkbun_dns_retrieve_by_name_type` — Get records by name/type
|
|
81
|
+
- `porkbun_dns_create` — Create DNS record
|
|
82
|
+
- `porkbun_dns_edit` — Edit record by ID
|
|
83
|
+
- `porkbun_dns_edit_by_name_type` — Edit records by name/type
|
|
84
|
+
- `porkbun_dns_delete` — Delete record by ID
|
|
85
|
+
- `porkbun_dns_delete_by_name_type` — Delete records by name/type
|
|
86
|
+
- `porkbun_dns_create_dnssec` — Create DNSSEC record
|
|
87
|
+
- `porkbun_dns_get_dnssec` — Get DNSSEC records
|
|
88
|
+
- `porkbun_dns_delete_dnssec` — Delete DNSSEC record
|
|
89
|
+
|
|
90
|
+
### SSL
|
|
91
|
+
- `porkbun_ssl_retrieve` — Retrieve SSL certificate bundle
|
|
92
|
+
|
|
93
|
+
### Email Hosting
|
|
94
|
+
- `porkbun_email_set_password` — Set email hosting password
|
|
95
|
+
|
|
96
|
+
### Marketplace
|
|
97
|
+
- `porkbun_marketplace_list` — List marketplace domains
|
|
98
|
+
|
|
99
|
+
## Development
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm install
|
|
103
|
+
npm run build
|
|
104
|
+
npm test
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
MIT
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAcA,wBAAsB,cAAc,CAAC,CAAC,EACpC,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,CAAC,CAAC,CAwBZ;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
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.porkbunRequest = porkbunRequest;
|
|
4
|
+
exports.porkbunRequestNoAuth = porkbunRequestNoAuth;
|
|
5
|
+
const BASE_URL = "https://api.porkbun.com/api/json/v3";
|
|
6
|
+
function getApiKey() {
|
|
7
|
+
const key = process.env.PORKBUN_API_KEY;
|
|
8
|
+
if (!key)
|
|
9
|
+
throw new Error("PORKBUN_API_KEY environment variable is not set");
|
|
10
|
+
return key;
|
|
11
|
+
}
|
|
12
|
+
function getSecretApiKey() {
|
|
13
|
+
const key = process.env.PORKBUN_SECRET_API_KEY;
|
|
14
|
+
if (!key)
|
|
15
|
+
throw new Error("PORKBUN_SECRET_API_KEY environment variable is not set");
|
|
16
|
+
return key;
|
|
17
|
+
}
|
|
18
|
+
async function porkbunRequest(path, body) {
|
|
19
|
+
const url = `${BASE_URL}${path}`;
|
|
20
|
+
const payload = {
|
|
21
|
+
apikey: getApiKey(),
|
|
22
|
+
secretapikey: getSecretApiKey(),
|
|
23
|
+
...body,
|
|
24
|
+
};
|
|
25
|
+
const res = await fetch(url, {
|
|
26
|
+
method: "POST",
|
|
27
|
+
headers: { "Content-Type": "application/json" },
|
|
28
|
+
body: JSON.stringify(payload),
|
|
29
|
+
});
|
|
30
|
+
const data = (await res.json());
|
|
31
|
+
if (data.status === "ERROR") {
|
|
32
|
+
const msg = data.message || "Unknown Porkbun API error";
|
|
33
|
+
const code = data.code ? ` (${data.code})` : "";
|
|
34
|
+
throw new Error(`Porkbun API error${code}: ${msg}`);
|
|
35
|
+
}
|
|
36
|
+
return data;
|
|
37
|
+
}
|
|
38
|
+
async function porkbunRequestNoAuth(path, body) {
|
|
39
|
+
const url = `${BASE_URL}${path}`;
|
|
40
|
+
const res = await fetch(url, {
|
|
41
|
+
method: "POST",
|
|
42
|
+
headers: { "Content-Type": "application/json" },
|
|
43
|
+
body: JSON.stringify(body ?? {}),
|
|
44
|
+
});
|
|
45
|
+
const data = (await res.json());
|
|
46
|
+
if (data.status === "ERROR") {
|
|
47
|
+
const msg = data.message || "Unknown Porkbun API error";
|
|
48
|
+
const code = data.code ? ` (${data.code})` : "";
|
|
49
|
+
throw new Error(`Porkbun API error${code}: ${msg}`);
|
|
50
|
+
}
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;AAcA,wCA2BC;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AG,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.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
5
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
6
|
+
const utility_js_1 = require("./tools/utility.js");
|
|
7
|
+
const pricing_js_1 = require("./tools/pricing.js");
|
|
8
|
+
const apikey_js_1 = require("./tools/apikey.js");
|
|
9
|
+
const domain_js_1 = require("./tools/domain.js");
|
|
10
|
+
const dns_js_1 = require("./tools/dns.js");
|
|
11
|
+
const ssl_js_1 = require("./tools/ssl.js");
|
|
12
|
+
const email_js_1 = require("./tools/email.js");
|
|
13
|
+
const marketplace_js_1 = require("./tools/marketplace.js");
|
|
14
|
+
const server = new mcp_js_1.McpServer({
|
|
15
|
+
name: "porkbun-mcp",
|
|
16
|
+
version: "1.0.0",
|
|
17
|
+
});
|
|
18
|
+
const allTools = [
|
|
19
|
+
...utility_js_1.utilityTools,
|
|
20
|
+
...pricing_js_1.pricingTools,
|
|
21
|
+
...apikey_js_1.apikeyTools,
|
|
22
|
+
...domain_js_1.domainTools,
|
|
23
|
+
...dns_js_1.dnsTools,
|
|
24
|
+
...ssl_js_1.sslTools,
|
|
25
|
+
...email_js_1.emailTools,
|
|
26
|
+
...marketplace_js_1.marketplaceTools,
|
|
27
|
+
];
|
|
28
|
+
for (const tool of allTools) {
|
|
29
|
+
server.tool(tool.name, tool.description, tool.inputSchema.shape, async (args) => {
|
|
30
|
+
try {
|
|
31
|
+
const result = await tool.handler(args);
|
|
32
|
+
return {
|
|
33
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
38
|
+
return {
|
|
39
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
40
|
+
isError: true,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async function main() {
|
|
46
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
47
|
+
await server.connect(transport);
|
|
48
|
+
console.error("Porkbun MCP server running");
|
|
49
|
+
}
|
|
50
|
+
main().catch((err) => {
|
|
51
|
+
console.error("Fatal error:", err);
|
|
52
|
+
process.exit(1);
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,oEAAoE;AACpE,wEAAiF;AACjF,mDAAkD;AAClD,mDAAkD;AAClD,iDAAgD;AAChD,iDAAgD;AAChD,2CAA0C;AAC1C,2CAA0C;AAC1C,+CAA8C;AAC9C,2DAA0D;AAE1D,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;IAC3B,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG;IACf,GAAG,yBAAY;IACf,GAAG,yBAAY;IACf,GAAG,uBAAW;IACd,GAAG,uBAAW;IACd,GAAG,iBAAQ;IACX,GAAG,iBAAQ;IACX,GAAG,qBAAU;IACb,GAAG,iCAAgB;CACpB,CAAC;AAEF,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;IAC5B,MAAM,CAAC,IAAI,CACT,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,WAAW,CAAC,KAAY,EAC7B,KAAK,EAAE,IAAS,EAAE,EAAE;QAClB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAW,CAAC,CAAC;YAC/C,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aAC5E,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC;gBAC/D,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAC9C,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const apikeyTools: ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
name: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
handler: (args: {
|
|
9
|
+
name?: string;
|
|
10
|
+
}) => Promise<unknown>;
|
|
11
|
+
} | {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
inputSchema: z.ZodObject<{
|
|
15
|
+
requestToken: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
handler: (args: {
|
|
18
|
+
requestToken: string;
|
|
19
|
+
}) => Promise<unknown>;
|
|
20
|
+
})[];
|
|
21
|
+
//# sourceMappingURL=apikey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apikey.d.ts","sourceRoot":"","sources":["../../src/tools/apikey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,WAAW;;;;;;oBAOE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;oBAUjB;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE;IAIjD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.apikeyTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const client_js_1 = require("../client.js");
|
|
6
|
+
exports.apikeyTools = [
|
|
7
|
+
{
|
|
8
|
+
name: "porkbun_apikey_request",
|
|
9
|
+
description: "Initiate an API key authorization request. Returns a requestToken and authUrl that the account holder must visit to approve. No credentials required. Rate limited: 20 requests per IP per hour.",
|
|
10
|
+
inputSchema: zod_1.z.object({
|
|
11
|
+
name: zod_1.z.string().optional().describe("Optional human-readable name for the application requesting access (max 255 chars)."),
|
|
12
|
+
}),
|
|
13
|
+
handler: async (args) => {
|
|
14
|
+
return (0, client_js_1.porkbunRequestNoAuth)("/apikey/request", args.name ? { name: args.name } : {});
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "porkbun_apikey_retrieve",
|
|
19
|
+
description: "Poll for API key approval status. Returns PENDING while awaiting approval, SUCCESS with public API key on approval. The secret key is shown only in the user's browser. Rate limited: 120 requests per IP per hour.",
|
|
20
|
+
inputSchema: zod_1.z.object({
|
|
21
|
+
requestToken: zod_1.z.string().describe("The 64-character hex token returned by porkbun_apikey_request."),
|
|
22
|
+
}),
|
|
23
|
+
handler: async (args) => {
|
|
24
|
+
return (0, client_js_1.porkbunRequestNoAuth)("/apikey/retrieve", { requestToken: args.requestToken });
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
//# sourceMappingURL=apikey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apikey.js","sourceRoot":"","sources":["../../src/tools/apikey.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAoD;AAEvC,QAAA,WAAW,GAAG;IACzB;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,kMAAkM;QAC/M,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qFAAqF,CAAC;SAC5H,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAuB,EAAE,EAAE;YACzC,OAAO,IAAA,gCAAoB,EAAC,iBAAiB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvF,CAAC;KACF;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,qNAAqN;QAClO,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gEAAgE,CAAC;SACpG,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAA8B,EAAE,EAAE;YAChD,OAAO,IAAA,gCAAoB,EAAC,kBAAkB,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QACvF,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const dnsTools: ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
domain: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
handler: (args: {
|
|
9
|
+
domain: string;
|
|
10
|
+
}) => Promise<unknown>;
|
|
11
|
+
} | {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
inputSchema: z.ZodObject<{
|
|
15
|
+
domain: z.ZodString;
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
handler: (args: {
|
|
19
|
+
domain: string;
|
|
20
|
+
id: string;
|
|
21
|
+
}) => Promise<unknown>;
|
|
22
|
+
} | {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
inputSchema: z.ZodObject<{
|
|
26
|
+
domain: z.ZodString;
|
|
27
|
+
type: z.ZodString;
|
|
28
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
handler: (args: {
|
|
31
|
+
domain: string;
|
|
32
|
+
type: string;
|
|
33
|
+
subdomain?: string;
|
|
34
|
+
}) => Promise<unknown>;
|
|
35
|
+
} | {
|
|
36
|
+
name: string;
|
|
37
|
+
description: string;
|
|
38
|
+
inputSchema: z.ZodObject<{
|
|
39
|
+
domain: z.ZodString;
|
|
40
|
+
type: z.ZodEnum<{
|
|
41
|
+
A: "A";
|
|
42
|
+
AAAA: "AAAA";
|
|
43
|
+
MX: "MX";
|
|
44
|
+
CNAME: "CNAME";
|
|
45
|
+
ALIAS: "ALIAS";
|
|
46
|
+
TXT: "TXT";
|
|
47
|
+
NS: "NS";
|
|
48
|
+
SRV: "SRV";
|
|
49
|
+
TLSA: "TLSA";
|
|
50
|
+
CAA: "CAA";
|
|
51
|
+
SSHFP: "SSHFP";
|
|
52
|
+
}>;
|
|
53
|
+
content: z.ZodString;
|
|
54
|
+
name: z.ZodOptional<z.ZodString>;
|
|
55
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
prio: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
handler: (args: {
|
|
60
|
+
domain: string;
|
|
61
|
+
type: string;
|
|
62
|
+
content: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
ttl?: number;
|
|
65
|
+
prio?: number;
|
|
66
|
+
notes?: string;
|
|
67
|
+
}) => Promise<unknown>;
|
|
68
|
+
} | {
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
inputSchema: z.ZodObject<{
|
|
72
|
+
domain: z.ZodString;
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
type: z.ZodEnum<{
|
|
75
|
+
A: "A";
|
|
76
|
+
AAAA: "AAAA";
|
|
77
|
+
MX: "MX";
|
|
78
|
+
CNAME: "CNAME";
|
|
79
|
+
ALIAS: "ALIAS";
|
|
80
|
+
TXT: "TXT";
|
|
81
|
+
NS: "NS";
|
|
82
|
+
SRV: "SRV";
|
|
83
|
+
TLSA: "TLSA";
|
|
84
|
+
CAA: "CAA";
|
|
85
|
+
SSHFP: "SSHFP";
|
|
86
|
+
}>;
|
|
87
|
+
content: z.ZodString;
|
|
88
|
+
name: z.ZodOptional<z.ZodString>;
|
|
89
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
prio: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
handler: (args: {
|
|
94
|
+
domain: string;
|
|
95
|
+
id: string;
|
|
96
|
+
type: string;
|
|
97
|
+
content: string;
|
|
98
|
+
name?: string;
|
|
99
|
+
ttl?: number;
|
|
100
|
+
prio?: number;
|
|
101
|
+
notes?: string;
|
|
102
|
+
}) => Promise<unknown>;
|
|
103
|
+
} | {
|
|
104
|
+
name: string;
|
|
105
|
+
description: string;
|
|
106
|
+
inputSchema: z.ZodObject<{
|
|
107
|
+
domain: z.ZodString;
|
|
108
|
+
type: z.ZodString;
|
|
109
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
110
|
+
content: z.ZodString;
|
|
111
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
prio: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
handler: (args: {
|
|
116
|
+
domain: string;
|
|
117
|
+
type: string;
|
|
118
|
+
subdomain?: string;
|
|
119
|
+
content: string;
|
|
120
|
+
ttl?: number;
|
|
121
|
+
prio?: number;
|
|
122
|
+
notes?: string;
|
|
123
|
+
}) => Promise<unknown>;
|
|
124
|
+
} | {
|
|
125
|
+
name: string;
|
|
126
|
+
description: string;
|
|
127
|
+
inputSchema: z.ZodObject<{
|
|
128
|
+
domain: z.ZodString;
|
|
129
|
+
keyTag: z.ZodString;
|
|
130
|
+
alg: z.ZodString;
|
|
131
|
+
digestType: z.ZodString;
|
|
132
|
+
digest: z.ZodString;
|
|
133
|
+
maxSigLife: z.ZodOptional<z.ZodString>;
|
|
134
|
+
keyDataFlags: z.ZodOptional<z.ZodString>;
|
|
135
|
+
keyDataProtocol: z.ZodOptional<z.ZodString>;
|
|
136
|
+
keyDataAlgo: z.ZodOptional<z.ZodString>;
|
|
137
|
+
keyDataPubKey: z.ZodOptional<z.ZodString>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
handler: (args: {
|
|
140
|
+
domain: string;
|
|
141
|
+
keyTag: string;
|
|
142
|
+
alg: string;
|
|
143
|
+
digestType: string;
|
|
144
|
+
digest: string;
|
|
145
|
+
maxSigLife?: string;
|
|
146
|
+
keyDataFlags?: string;
|
|
147
|
+
keyDataProtocol?: string;
|
|
148
|
+
keyDataAlgo?: string;
|
|
149
|
+
keyDataPubKey?: string;
|
|
150
|
+
}) => Promise<unknown>;
|
|
151
|
+
} | {
|
|
152
|
+
name: string;
|
|
153
|
+
description: string;
|
|
154
|
+
inputSchema: z.ZodObject<{
|
|
155
|
+
domain: z.ZodString;
|
|
156
|
+
keytag: z.ZodString;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
handler: (args: {
|
|
159
|
+
domain: string;
|
|
160
|
+
keytag: string;
|
|
161
|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MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;oBA6ClH;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;oBAsBvM;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAI3D,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dnsTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const client_js_1 = require("../client.js");
|
|
6
|
+
const dnsTypeEnum = zod_1.z.enum(["A", "AAAA", "MX", "CNAME", "ALIAS", "TXT", "NS", "SRV", "TLSA", "CAA", "SSHFP"]);
|
|
7
|
+
exports.dnsTools = [
|
|
8
|
+
{
|
|
9
|
+
name: "porkbun_dns_retrieve",
|
|
10
|
+
description: "Retrieve all editable DNS records for a domain. SOA and default NS records are excluded.",
|
|
11
|
+
inputSchema: zod_1.z.object({
|
|
12
|
+
domain: zod_1.z.string().describe("The domain name (e.g. 'example.com')."),
|
|
13
|
+
}),
|
|
14
|
+
handler: async (args) => {
|
|
15
|
+
return (0, client_js_1.porkbunRequest)(`/dns/retrieve/${args.domain}`);
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "porkbun_dns_retrieve_by_id",
|
|
20
|
+
description: "Retrieve a specific DNS record by its numeric ID.",
|
|
21
|
+
inputSchema: zod_1.z.object({
|
|
22
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
23
|
+
id: zod_1.z.string().describe("Numeric DNS record ID."),
|
|
24
|
+
}),
|
|
25
|
+
handler: async (args) => {
|
|
26
|
+
return (0, client_js_1.porkbunRequest)(`/dns/retrieve/${args.domain}/${args.id}`);
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "porkbun_dns_retrieve_by_name_type",
|
|
31
|
+
description: "Retrieve DNS records matching a specific subdomain and record type.",
|
|
32
|
+
inputSchema: zod_1.z.object({
|
|
33
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
34
|
+
type: zod_1.z.string().describe("DNS record type (A, AAAA, CNAME, MX, TXT, etc.)."),
|
|
35
|
+
subdomain: zod_1.z.string().optional().describe("Subdomain portion only. Omit for root domain records."),
|
|
36
|
+
}),
|
|
37
|
+
handler: async (args) => {
|
|
38
|
+
const sub = args.subdomain || "";
|
|
39
|
+
return (0, client_js_1.porkbunRequest)(`/dns/retrieveByNameType/${args.domain}/${args.type}/${sub}`);
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "porkbun_dns_create",
|
|
44
|
+
description: "Create a new DNS record for a domain. Returns the record ID.",
|
|
45
|
+
inputSchema: zod_1.z.object({
|
|
46
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
47
|
+
type: dnsTypeEnum.describe("DNS record type."),
|
|
48
|
+
content: zod_1.z.string().describe("The record value (e.g. IP address, hostname, TXT value)."),
|
|
49
|
+
name: zod_1.z.string().optional().describe("Subdomain (e.g. 'www', '*' for wildcard, blank for root). Do not include the domain itself."),
|
|
50
|
+
ttl: zod_1.z.number().optional().describe("Time to live in seconds. Minimum is typically 600."),
|
|
51
|
+
prio: zod_1.z.number().optional().describe("Priority for MX and SRV records. Defaults to 0."),
|
|
52
|
+
notes: zod_1.z.string().optional().describe("Optional notes (not served in DNS)."),
|
|
53
|
+
}),
|
|
54
|
+
handler: async (args) => {
|
|
55
|
+
const { domain, ...body } = args;
|
|
56
|
+
return (0, client_js_1.porkbunRequest)(`/dns/create/${domain}`, body);
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "porkbun_dns_edit",
|
|
61
|
+
description: "Edit a specific DNS record by its numeric ID.",
|
|
62
|
+
inputSchema: zod_1.z.object({
|
|
63
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
64
|
+
id: zod_1.z.string().describe("Numeric DNS record ID."),
|
|
65
|
+
type: dnsTypeEnum.describe("DNS record type."),
|
|
66
|
+
content: zod_1.z.string().describe("The new record value."),
|
|
67
|
+
name: zod_1.z.string().optional().describe("Subdomain. Do not include the domain itself."),
|
|
68
|
+
ttl: zod_1.z.number().optional().describe("Time to live in seconds."),
|
|
69
|
+
prio: zod_1.z.number().optional().describe("Priority for MX/SRV records."),
|
|
70
|
+
notes: zod_1.z.string().optional().describe("Notes. Pass empty string to clear; omit to leave unchanged."),
|
|
71
|
+
}),
|
|
72
|
+
handler: async (args) => {
|
|
73
|
+
const { domain, id, ...body } = args;
|
|
74
|
+
return (0, client_js_1.porkbunRequest)(`/dns/edit/${domain}/${id}`, body);
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "porkbun_dns_edit_by_name_type",
|
|
79
|
+
description: "Replace the content of all DNS records matching a given subdomain and type.",
|
|
80
|
+
inputSchema: zod_1.z.object({
|
|
81
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
82
|
+
type: zod_1.z.string().describe("DNS record type (e.g. 'A')."),
|
|
83
|
+
subdomain: zod_1.z.string().optional().describe("Subdomain portion. Omit for root domain."),
|
|
84
|
+
content: zod_1.z.string().describe("New record value to set on all matching records."),
|
|
85
|
+
ttl: zod_1.z.number().optional().describe("Time to live in seconds."),
|
|
86
|
+
prio: zod_1.z.number().optional().describe("Priority."),
|
|
87
|
+
notes: zod_1.z.string().optional().describe("Notes. Pass empty string to clear; omit to leave unchanged."),
|
|
88
|
+
}),
|
|
89
|
+
handler: async (args) => {
|
|
90
|
+
const { domain, type, subdomain, ...body } = args;
|
|
91
|
+
const sub = subdomain || "";
|
|
92
|
+
return (0, client_js_1.porkbunRequest)(`/dns/editByNameType/${domain}/${type}/${sub}`, body);
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "porkbun_dns_delete",
|
|
97
|
+
description: "Delete a specific DNS record by its numeric ID.",
|
|
98
|
+
inputSchema: zod_1.z.object({
|
|
99
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
100
|
+
id: zod_1.z.string().describe("Numeric DNS record ID."),
|
|
101
|
+
}),
|
|
102
|
+
handler: async (args) => {
|
|
103
|
+
return (0, client_js_1.porkbunRequest)(`/dns/delete/${args.domain}/${args.id}`);
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "porkbun_dns_delete_by_name_type",
|
|
108
|
+
description: "Delete all DNS records matching a given subdomain and type.",
|
|
109
|
+
inputSchema: zod_1.z.object({
|
|
110
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
111
|
+
type: zod_1.z.string().describe("DNS record type (e.g. 'A')."),
|
|
112
|
+
subdomain: zod_1.z.string().optional().describe("Subdomain portion. Omit for root domain."),
|
|
113
|
+
}),
|
|
114
|
+
handler: async (args) => {
|
|
115
|
+
const sub = args.subdomain || "";
|
|
116
|
+
return (0, client_js_1.porkbunRequest)(`/dns/deleteByNameType/${args.domain}/${args.type}/${sub}`);
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "porkbun_dns_create_dnssec",
|
|
121
|
+
description: "Create a DNSSEC DS or key record at the registry.",
|
|
122
|
+
inputSchema: zod_1.z.object({
|
|
123
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
124
|
+
keyTag: zod_1.z.string().describe("DNSSEC key tag."),
|
|
125
|
+
alg: zod_1.z.string().describe("DS Data algorithm number (e.g. '13' for ECDSA P-256)."),
|
|
126
|
+
digestType: zod_1.z.string().describe("Digest type number (e.g. '2' for SHA-256)."),
|
|
127
|
+
digest: zod_1.z.string().describe("Hex-encoded digest value."),
|
|
128
|
+
maxSigLife: zod_1.z.string().optional().describe("Maximum signature lifetime in seconds (optional)."),
|
|
129
|
+
keyDataFlags: zod_1.z.string().optional().describe("Key data flags (optional)."),
|
|
130
|
+
keyDataProtocol: zod_1.z.string().optional().describe("Key data protocol (optional)."),
|
|
131
|
+
keyDataAlgo: zod_1.z.string().optional().describe("Key data algorithm (optional)."),
|
|
132
|
+
keyDataPubKey: zod_1.z.string().optional().describe("Key data public key in base64 (optional)."),
|
|
133
|
+
}),
|
|
134
|
+
handler: async (args) => {
|
|
135
|
+
const { domain, ...body } = args;
|
|
136
|
+
return (0, client_js_1.porkbunRequest)(`/dns/createDnssecRecord/${domain}`, body);
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "porkbun_dns_get_dnssec",
|
|
141
|
+
description: "Retrieve DNSSEC records associated with the domain at the registry.",
|
|
142
|
+
inputSchema: zod_1.z.object({
|
|
143
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
144
|
+
}),
|
|
145
|
+
handler: async (args) => {
|
|
146
|
+
return (0, client_js_1.porkbunRequest)(`/dns/getDnssecRecords/${args.domain}`);
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: "porkbun_dns_delete_dnssec",
|
|
151
|
+
description: "Delete a DNSSEC record from the registry by key tag.",
|
|
152
|
+
inputSchema: zod_1.z.object({
|
|
153
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
154
|
+
keytag: zod_1.z.string().describe("The DNSSEC key tag value."),
|
|
155
|
+
}),
|
|
156
|
+
handler: async (args) => {
|
|
157
|
+
return (0, client_js_1.porkbunRequest)(`/dns/deleteDnssecRecord/${args.domain}/${args.keytag}`);
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
];
|
|
161
|
+
//# sourceMappingURL=dns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dns.js","sourceRoot":"","sources":["../../src/tools/dns.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA8C;AAE9C,MAAM,WAAW,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAEjG,QAAA,QAAQ,GAAG;IACtB;QACE,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,0FAA0F;QACvG,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;SACrE,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAwB,EAAE,EAAE;YAC1C,OAAO,IAAA,0BAAc,EAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACxD,CAAC;KACF;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,mDAAmD;QAChE,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;YAC/C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;SAClD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAoC,EAAE,EAAE;YACtD,OAAO,IAAA,0BAAc,EAAC,iBAAiB,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,EAAE,EAAE,C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AE,sDAAsD;QACnE,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;YAC/C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;SACzD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAwC,EAAE,EAAE;YAC1D,OAAO,IAAA,0BAAc,EAAC,2BAA2B,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACjF,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const domainTools: ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
includeLabels: z.ZodOptional<z.ZodEnum<{
|
|
8
|
+
yes: "yes";
|
|
9
|
+
no: "no";
|
|
10
|
+
}>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
handler: (args: {
|
|
13
|
+
start?: number;
|
|
14
|
+
includeLabels?: string;
|
|
15
|
+
}) => Promise<unknown>;
|
|
16
|
+
} | {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
inputSchema: z.ZodObject<{
|
|
20
|
+
domain: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
handler: (args: {
|
|
23
|
+
domain: string;
|
|
24
|
+
}) => Promise<unknown>;
|
|
25
|
+
} | {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
inputSchema: z.ZodObject<{
|
|
29
|
+
domain: z.ZodString;
|
|
30
|
+
ns: z.ZodArray<z.ZodString>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
handler: (args: {
|
|
33
|
+
domain: string;
|
|
34
|
+
ns: string[];
|
|
35
|
+
}) => Promise<unknown>;
|
|
36
|
+
} | {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
inputSchema: z.ZodObject<{
|
|
40
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
41
|
+
status: z.ZodEnum<{
|
|
42
|
+
on: "on";
|
|
43
|
+
off: "off";
|
|
44
|
+
}>;
|
|
45
|
+
domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
handler: (args: {
|
|
48
|
+
domain?: string;
|
|
49
|
+
status: string;
|
|
50
|
+
domains?: string[];
|
|
51
|
+
}) => Promise<unknown>;
|
|
52
|
+
} | {
|
|
53
|
+
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
inputSchema: z.ZodObject<{
|
|
56
|
+
domain: z.ZodString;
|
|
57
|
+
cost: z.ZodNumber;
|
|
58
|
+
agreeToTerms: z.ZodEnum<{
|
|
59
|
+
yes: "yes";
|
|
60
|
+
1: "1";
|
|
61
|
+
}>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
handler: (args: {
|
|
64
|
+
domain: string;
|
|
65
|
+
cost: number;
|
|
66
|
+
agreeToTerms: string;
|
|
67
|
+
}) => Promise<unknown>;
|
|
68
|
+
} | {
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
inputSchema: z.ZodObject<{
|
|
72
|
+
domain: z.ZodString;
|
|
73
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
74
|
+
location: z.ZodString;
|
|
75
|
+
type: z.ZodEnum<{
|
|
76
|
+
temporary: "temporary";
|
|
77
|
+
permanent: "permanent";
|
|
78
|
+
}>;
|
|
79
|
+
includePath: z.ZodEnum<{
|
|
80
|
+
yes: "yes";
|
|
81
|
+
no: "no";
|
|
82
|
+
}>;
|
|
83
|
+
wildcard: z.ZodEnum<{
|
|
84
|
+
yes: "yes";
|
|
85
|
+
no: "no";
|
|
86
|
+
}>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
handler: (args: {
|
|
89
|
+
domain: string;
|
|
90
|
+
subdomain?: string;
|
|
91
|
+
location: string;
|
|
92
|
+
type: string;
|
|
93
|
+
includePath: string;
|
|
94
|
+
wildcard: string;
|
|
95
|
+
}) => Promise<unknown>;
|
|
96
|
+
} | {
|
|
97
|
+
name: string;
|
|
98
|
+
description: string;
|
|
99
|
+
inputSchema: z.ZodObject<{
|
|
100
|
+
domain: z.ZodString;
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
handler: (args: {
|
|
104
|
+
domain: string;
|
|
105
|
+
id: string;
|
|
106
|
+
}) => Promise<unknown>;
|
|
107
|
+
} | {
|
|
108
|
+
name: string;
|
|
109
|
+
description: string;
|
|
110
|
+
inputSchema: z.ZodObject<{
|
|
111
|
+
domain: z.ZodString;
|
|
112
|
+
subdomain: z.ZodString;
|
|
113
|
+
ips: z.ZodArray<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
handler: (args: {
|
|
116
|
+
domain: string;
|
|
117
|
+
subdomain: string;
|
|
118
|
+
ips: string[];
|
|
119
|
+
}) => Promise<unknown>;
|
|
120
|
+
} | {
|
|
121
|
+
name: string;
|
|
122
|
+
description: string;
|
|
123
|
+
inputSchema: z.ZodObject<{
|
|
124
|
+
domain: z.ZodString;
|
|
125
|
+
subdomain: z.ZodString;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
handler: (args: {
|
|
128
|
+
domain: string;
|
|
129
|
+
subdomain: string;
|
|
130
|
+
}) => Promise<unknown>;
|
|
131
|
+
})[];
|
|
132
|
+
//# sourceMappingURL=domain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../src/tools/domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,WAAW;;;;;;;;;;oBAQE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;oBAa1C;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;;;;;;;;oBAWlB;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,EAAE,CAAA;KAAE;;;;;;;;;;;;oBAYhC;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE;;;;;;;;;;;;oBA0BvD;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;oBAkBtD;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;;;;;;;;oBA2B7G;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE;;;;;;;;;oBAY9B;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE;;;;;;;;oBAuBpD;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAc9D,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.domainTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const client_js_1 = require("../client.js");
|
|
6
|
+
exports.domainTools = [
|
|
7
|
+
{
|
|
8
|
+
name: "porkbun_domain_list_all",
|
|
9
|
+
description: "List all domains in your Porkbun account. Returns up to 1000 domains per call, ordered by expiration date. Use 'start' to paginate.",
|
|
10
|
+
inputSchema: zod_1.z.object({
|
|
11
|
+
start: zod_1.z.number().optional().describe("Zero-based offset for pagination (default 0). Increment by 1000 to get next page."),
|
|
12
|
+
includeLabels: zod_1.z.enum(["yes", "no"]).optional().describe("Return label metadata for each domain. Defaults to 'no'."),
|
|
13
|
+
}),
|
|
14
|
+
handler: async (args) => {
|
|
15
|
+
return (0, client_js_1.porkbunRequest)("/domain/listAll", {
|
|
16
|
+
...(args.start !== undefined && { start: args.start }),
|
|
17
|
+
...(args.includeLabels && { includeLabels: args.includeLabels }),
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "porkbun_domain_get_ns",
|
|
23
|
+
description: "Get the authoritative nameservers for a domain.",
|
|
24
|
+
inputSchema: zod_1.z.object({
|
|
25
|
+
domain: zod_1.z.string().describe("The domain name (e.g. 'example.com')."),
|
|
26
|
+
}),
|
|
27
|
+
handler: async (args) => {
|
|
28
|
+
return (0, client_js_1.porkbunRequest)(`/domain/getNs/${args.domain}`);
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "porkbun_domain_update_ns",
|
|
33
|
+
description: "Update the nameservers for a domain at the registry.",
|
|
34
|
+
inputSchema: zod_1.z.object({
|
|
35
|
+
domain: zod_1.z.string().describe("The domain name (e.g. 'example.com')."),
|
|
36
|
+
ns: zod_1.z.array(zod_1.z.string()).describe("Ordered array of nameserver hostnames (e.g. ['ns1.example.com', 'ns2.example.com'])."),
|
|
37
|
+
}),
|
|
38
|
+
handler: async (args) => {
|
|
39
|
+
return (0, client_js_1.porkbunRequest)(`/domain/updateNs/${args.domain}`, { ns: args.ns });
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "porkbun_domain_update_auto_renew",
|
|
44
|
+
description: "Update the auto-renew setting for one or more domains.",
|
|
45
|
+
inputSchema: zod_1.z.object({
|
|
46
|
+
domain: zod_1.z.string().optional().describe("A single domain to update (optional if using 'domains' array)."),
|
|
47
|
+
status: zod_1.z.enum(["on", "off"]).describe("Auto-renew status to set."),
|
|
48
|
+
domains: zod_1.z.array(zod_1.z.string()).optional().describe("Array of additional domain names to update."),
|
|
49
|
+
}),
|
|
50
|
+
handler: async (args) => {
|
|
51
|
+
const path = args.domain ? `/domain/updateAutoRenew/${args.domain}` : "/domain/updateAutoRenew/";
|
|
52
|
+
return (0, client_js_1.porkbunRequest)(path, {
|
|
53
|
+
status: args.status,
|
|
54
|
+
...(args.domains && { domains: args.domains }),
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "porkbun_domain_check",
|
|
60
|
+
description: "Check if a domain is available for registration and get current pricing. Rate limited: ~1 check per 10 seconds per account.",
|
|
61
|
+
inputSchema: zod_1.z.object({
|
|
62
|
+
domain: zod_1.z.string().describe("The domain to check (e.g. 'example.com')."),
|
|
63
|
+
}),
|
|
64
|
+
handler: async (args) => {
|
|
65
|
+
return (0, client_js_1.porkbunRequest)(`/domain/checkDomain/${args.domain}`);
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "porkbun_domain_create",
|
|
70
|
+
description: "Register a domain using account credit. Requires verified email/phone, sufficient credit, and agreement to terms. Cost must match current price in pennies (USD cents).",
|
|
71
|
+
inputSchema: zod_1.z.object({
|
|
72
|
+
domain: zod_1.z.string().describe("The domain to register (e.g. 'example.com')."),
|
|
73
|
+
cost: zod_1.z.number().describe("Registration cost in pennies (USD cents). Must match the current price from porkbun_domain_check."),
|
|
74
|
+
agreeToTerms: zod_1.z.enum(["yes", "1"]).describe("Must be 'yes' or '1' to confirm agreement to Porkbun terms."),
|
|
75
|
+
}),
|
|
76
|
+
handler: async (args) => {
|
|
77
|
+
return (0, client_js_1.porkbunRequest)(`/domain/create/${args.domain}`, {
|
|
78
|
+
cost: args.cost,
|
|
79
|
+
agreeToTerms: args.agreeToTerms,
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "porkbun_domain_add_url_forward",
|
|
85
|
+
description: "Add a URL forward for a domain or subdomain.",
|
|
86
|
+
inputSchema: zod_1.z.object({
|
|
87
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
88
|
+
subdomain: zod_1.z.string().optional().describe("Subdomain to forward (omit for root domain)."),
|
|
89
|
+
location: zod_1.z.string().describe("Destination URL to forward to."),
|
|
90
|
+
type: zod_1.z.enum(["temporary", "permanent"]).describe("'permanent' = HTTP 301, 'temporary' = default redirect code."),
|
|
91
|
+
includePath: zod_1.z.enum(["yes", "no"]).describe("Whether to append the request URI path to the destination."),
|
|
92
|
+
wildcard: zod_1.z.enum(["yes", "no"]).describe("Whether to also forward all subdomains."),
|
|
93
|
+
}),
|
|
94
|
+
handler: async (args) => {
|
|
95
|
+
return (0, client_js_1.porkbunRequest)(`/domain/addUrlForward/${args.domain}`, {
|
|
96
|
+
...(args.subdomain && { subdomain: args.subdomain }),
|
|
97
|
+
location: args.location,
|
|
98
|
+
type: args.type,
|
|
99
|
+
includePath: args.includePath,
|
|
100
|
+
wildcard: args.wildcard,
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "porkbun_domain_get_url_forwarding",
|
|
106
|
+
description: "List all active URL forwards for a domain.",
|
|
107
|
+
inputSchema: zod_1.z.object({
|
|
108
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
109
|
+
}),
|
|
110
|
+
handler: async (args) => {
|
|
111
|
+
return (0, client_js_1.porkbunRequest)(`/domain/getUrlForwarding/${args.domain}`);
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "porkbun_domain_delete_url_forward",
|
|
116
|
+
description: "Delete a specific URL forward by ID.",
|
|
117
|
+
inputSchema: zod_1.z.object({
|
|
118
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
119
|
+
id: zod_1.z.string().describe("URL forward record ID."),
|
|
120
|
+
}),
|
|
121
|
+
handler: async (args) => {
|
|
122
|
+
return (0, client_js_1.porkbunRequest)(`/domain/deleteUrlForward/${args.domain}/${args.id}`);
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "porkbun_domain_create_glue",
|
|
127
|
+
description: "Create a glue record (host object) for a nameserver hostname under the domain.",
|
|
128
|
+
inputSchema: zod_1.z.object({
|
|
129
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
130
|
+
subdomain: zod_1.z.string().describe("The subdomain portion (e.g. 'ns1' for ns1.example.com)."),
|
|
131
|
+
ips: zod_1.z.array(zod_1.z.string()).describe("Array of IP addresses (IPv4 and/or IPv6) for the host record."),
|
|
132
|
+
}),
|
|
133
|
+
handler: async (args) => {
|
|
134
|
+
return (0, client_js_1.porkbunRequest)(`/domain/createGlue/${args.domain}/${args.subdomain}`, { ips: args.ips });
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "porkbun_domain_update_glue",
|
|
139
|
+
description: "Update the IP addresses of a glue record. Replaces all existing IPs.",
|
|
140
|
+
inputSchema: zod_1.z.object({
|
|
141
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
142
|
+
subdomain: zod_1.z.string().describe("The subdomain portion (e.g. 'ns1')."),
|
|
143
|
+
ips: zod_1.z.array(zod_1.z.string()).describe("New array of IP addresses to set."),
|
|
144
|
+
}),
|
|
145
|
+
handler: async (args) => {
|
|
146
|
+
return (0, client_js_1.porkbunRequest)(`/domain/updateGlue/${args.domain}/${args.subdomain}`, { ips: args.ips });
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: "porkbun_domain_delete_glue",
|
|
151
|
+
description: "Delete a glue record (host object) for a subdomain.",
|
|
152
|
+
inputSchema: zod_1.z.object({
|
|
153
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
154
|
+
subdomain: zod_1.z.string().describe("The subdomain portion (e.g. 'ns1')."),
|
|
155
|
+
}),
|
|
156
|
+
handler: async (args) => {
|
|
157
|
+
return (0, client_js_1.porkbunRequest)(`/domain/deleteGlue/${args.domain}/${args.subdomain}`);
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "porkbun_domain_get_glue",
|
|
162
|
+
description: "Retrieve all glue records (host objects) registered under the domain.",
|
|
163
|
+
inputSchema: zod_1.z.object({
|
|
164
|
+
domain: zod_1.z.string().describe("The domain name."),
|
|
165
|
+
}),
|
|
166
|
+
handler: async (args) => {
|
|
167
|
+
return (0, client_js_1.porkbunRequest)(`/domain/getGlue/${args.domain}`);
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
];
|
|
171
|
+
//# sourceMappingURL=domain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.js","sourceRoot":"","sources":["../../src/tools/domain.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA8C;AAEjC,QAAA,WAAW,GAAG;IACzB;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,qIAAqI;QAClJ,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mFAAmF,CAAC;YAC1H,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;SACrH,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAgD,EAAE,EAAE;YAClE,OAAO,IAAA,0BAAc,EAAC,iBAAiB,EAAE;gBACvC,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AAC,sBAAsB,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QAC/E,CAAC;KACF;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,uEAAuE;QACpF,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;SAChD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAwB,EAAE,EAAE;YAC1C,OAAO,IAAA,0BAAc,EAAC,mBAAmB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAC1D,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const emailTools: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
emailAddress: z.ZodString;
|
|
7
|
+
password: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
handler: (args: {
|
|
10
|
+
emailAddress: string;
|
|
11
|
+
password: string;
|
|
12
|
+
}) => Promise<unknown>;
|
|
13
|
+
}[];
|
|
14
|
+
//# sourceMappingURL=email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/tools/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU;;;;;;;oBAQG;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;GAOnE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emailTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const client_js_1 = require("../client.js");
|
|
6
|
+
exports.emailTools = [
|
|
7
|
+
{
|
|
8
|
+
name: "porkbun_email_set_password",
|
|
9
|
+
description: "Set the password for an email hosting account associated with a domain managed by your API key.",
|
|
10
|
+
inputSchema: zod_1.z.object({
|
|
11
|
+
emailAddress: zod_1.z.string().describe("The full email address (e.g. 'user@example.com')."),
|
|
12
|
+
password: zod_1.z.string().describe("The new password. Must pass Porkbun password validation rules."),
|
|
13
|
+
}),
|
|
14
|
+
handler: async (args) => {
|
|
15
|
+
return (0, client_js_1.porkbunRequest)("/email/setPassword", {
|
|
16
|
+
emailAddress: args.emailAddress,
|
|
17
|
+
password: args.password,
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/tools/email.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA8C;AAEjC,QAAA,UAAU,GAAG;IACxB;QACE,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,iGAAiG;QAC9G,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;YACtF,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gEAAgE,CAAC;SAChG,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAgD,EAAE,EAAE;YAClE,OAAO,IAAA,0BAAc,EAAC,oBAAoB,EAAE;gBAC1C,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const marketplaceTools: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
handler: (args: {
|
|
10
|
+
start?: number;
|
|
11
|
+
limit?: number;
|
|
12
|
+
}) => Promise<unknown>;
|
|
13
|
+
}[];
|
|
14
|
+
//# sourceMappingURL=marketplace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/tools/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;;oBAQH;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;GAO3D,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.marketplaceTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const client_js_1 = require("../client.js");
|
|
6
|
+
exports.marketplaceTools = [
|
|
7
|
+
{
|
|
8
|
+
name: "porkbun_marketplace_list",
|
|
9
|
+
description: "List domains currently on the Porkbun marketplace. Up to 5000 domains per request. Results are paginated.",
|
|
10
|
+
inputSchema: zod_1.z.object({
|
|
11
|
+
start: zod_1.z.number().optional().describe("Offset to start retrieving from (default 0)."),
|
|
12
|
+
limit: zod_1.z.number().optional().describe("Number of domains to return (default 1000, max 5000)."),
|
|
13
|
+
}),
|
|
14
|
+
handler: async (args) => {
|
|
15
|
+
return (0, client_js_1.porkbunRequest)("/marketplace/getAll", {
|
|
16
|
+
...(args.start !== undefined && { start: args.start }),
|
|
17
|
+
...(args.limit !== undefined && { limit: args.limit }),
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=marketplace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.js","sourceRoot":"","sources":["../../src/tools/marketplace.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA8C;AAEjC,QAAA,gBAAgB,GAAG;IAC9B;QACE,IAAI,EAAE,0BAA0B;QAChC,WAAW,EAAE,2GAA2G;QACxH,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;YACrF,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;SAC/F,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAwC,EAAE,EAAE;YAC1D,OAAO,IAAA,0BAAc,EAAC,qBAAqB,EAAE;gBAC3C,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;gBACtD,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;aACvD,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const pricingTools: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
tlds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
handler: (args: {
|
|
9
|
+
tlds?: string[];
|
|
10
|
+
}) => Promise<unknown>;
|
|
11
|
+
}[];
|
|
12
|
+
//# sourceMappingURL=pricing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/tools/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;oBAOC;QAAE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE;GAI5C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pricingTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const client_js_1 = require("../client.js");
|
|
6
|
+
exports.pricingTools = [
|
|
7
|
+
{
|
|
8
|
+
name: "porkbun_get_pricing",
|
|
9
|
+
description: "Retrieve domain pricing for all supported TLDs or a filtered subset. No authentication required. Prices are in USD.",
|
|
10
|
+
inputSchema: zod_1.z.object({
|
|
11
|
+
tlds: zod_1.z.array(zod_1.z.string()).optional().describe("Optional array of TLDs to filter (e.g. ['com', 'net']). Omit for all TLDs."),
|
|
12
|
+
}),
|
|
13
|
+
handler: async (args) => {
|
|
14
|
+
return (0, client_js_1.porkbunRequestNoAuth)("/pricing/get", args.tlds ? { tlds: args.tlds } : {});
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
//# sourceMappingURL=pricing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/tools/pricing.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAoD;AAEvC,QAAA,YAAY,GAAG;IAC1B;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,qHAAqH;QAClI,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4EAA4E,CAAC;SAC5H,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAyB,EAAE,EAAE;YAC3C,OAAO,IAAA,gCAAoB,EAAC,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACpF,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const sslTools: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
domain: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
handler: (args: {
|
|
9
|
+
domain: string;
|
|
10
|
+
}) => Promise<unknown>;
|
|
11
|
+
}[];
|
|
12
|
+
//# sourceMappingURL=ssl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssl.d.ts","sourceRoot":"","sources":["../../src/tools/ssl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,QAAQ;;;;;;oBAOK;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;GAI3C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sslTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const client_js_1 = require("../client.js");
|
|
6
|
+
exports.sslTools = [
|
|
7
|
+
{
|
|
8
|
+
name: "porkbun_ssl_retrieve",
|
|
9
|
+
description: "Retrieve the Let's Encrypt SSL certificate bundle for a domain. Returns the certificate chain, private key, and public key in PEM format.",
|
|
10
|
+
inputSchema: zod_1.z.object({
|
|
11
|
+
domain: zod_1.z.string().describe("The domain name (e.g. 'example.com')."),
|
|
12
|
+
}),
|
|
13
|
+
handler: async (args) => {
|
|
14
|
+
return (0, client_js_1.porkbunRequest)(`/ssl/retrieve/${args.domain}`);
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
//# sourceMappingURL=ssl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssl.js","sourceRoot":"","sources":["../../src/tools/ssl.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA8C;AAEjC,QAAA,QAAQ,GAAG;IACtB;QACE,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,2IAA2I;QACxJ,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;SACrE,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAwB,EAAE,EAAE;YAC1C,OAAO,IAAA,0BAAc,EAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACxD,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/tools/utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;qBAKE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;GAY/C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.utilityTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const client_js_1 = require("../client.js");
|
|
6
|
+
exports.utilityTools = [
|
|
7
|
+
{
|
|
8
|
+
name: "porkbun_ping",
|
|
9
|
+
description: "Test API credentials and get your public IP address. Returns IP and whether credentials are valid.",
|
|
10
|
+
inputSchema: zod_1.z.object({}),
|
|
11
|
+
handler: async (_args) => {
|
|
12
|
+
return (0, client_js_1.porkbunRequest)("/ping");
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: "porkbun_get_ip",
|
|
17
|
+
description: "Get your public IP address. No credentials required.",
|
|
18
|
+
inputSchema: zod_1.z.object({}),
|
|
19
|
+
handler: async (_args) => {
|
|
20
|
+
return (0, client_js_1.porkbunRequestNoAuth)("/ip");
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
//# sourceMappingURL=utility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/tools/utility.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAoE;AAEvD,QAAA,YAAY,GAAG;IAC1B;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,oGAAoG;QACjH,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,EAAE,KAA4B,EAAE,EAAE;YAC9C,OAAO,IAAA,0BAAc,EAAC,OAAO,CAAC,CAAC;QACjC,CAAC;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,sDAAsD;QACnE,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,EAAE,KAA4B,EAAE,EAAE;YAC9C,OAAO,IAAA,gCAAoB,EAAC,KAAK,CAAC,CAAC;QACrC,CAAC;KACF;CACF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "porkbun-mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for Porkbun API v3 — domain registration, DNS management, SSL certificates, and more",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"porkbun-mcp-server": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/**/*",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"dev": "ts-node src/index.ts",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"test:watch": "vitest",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"mcp",
|
|
23
|
+
"porkbun",
|
|
24
|
+
"dns",
|
|
25
|
+
"domain",
|
|
26
|
+
"ssl",
|
|
27
|
+
"claude",
|
|
28
|
+
"model-context-protocol"
|
|
29
|
+
],
|
|
30
|
+
"author": "Eyalm321",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/Eyalm321/porkbun-mcp.git"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/Eyalm321/porkbun-mcp#readme",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/Eyalm321/porkbun-mcp/issues"
|
|
38
|
+
},
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
42
|
+
"zod": "^4.3.6"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^25.5.2",
|
|
46
|
+
"ts-node": "^10.9.2",
|
|
47
|
+
"typescript": "^6.0.2",
|
|
48
|
+
"vitest": "^4.1.2"
|
|
49
|
+
}
|
|
50
|
+
}
|