@buygolinks/mcp 0.1.0 → 0.2.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 +4 -0
- package/package.json +1 -1
- package/src/index.js +65 -1
package/README.md
CHANGED
|
@@ -66,6 +66,10 @@ Most MCP clients use the same shape. Point them at the `npx -y @buygolinks/mcp`
|
|
|
66
66
|
| `list_links` | List your links with click counts. |
|
|
67
67
|
| `get_link_stats` | Per-link analytics (by day, country, device, browser, hour, weekday). |
|
|
68
68
|
| `get_overview_stats` | Account-wide analytics. |
|
|
69
|
+
| `list_domains` | List your branded custom short-link domains with provisioning + SSL status. |
|
|
70
|
+
| `create_domain` | Register a new branded domain (e.g. `go.acme.com`). Returns the CNAME target. |
|
|
71
|
+
| `verify_domain` | Force a fresh Cloudflare status check after DNS is added. |
|
|
72
|
+
| `delete_domain` | Remove a branded domain. |
|
|
69
73
|
|
|
70
74
|
## Example prompts
|
|
71
75
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buygolinks/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "MCP server for buygolinks.com — create and manage branded short links with Amazon affiliate geo-routing from any MCP-compatible AI agent (Claude Desktop, Cursor, Cline, Continue, Hermes).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/index.js
CHANGED
|
@@ -115,10 +115,55 @@ const TOOLS = [
|
|
|
115
115
|
},
|
|
116
116
|
},
|
|
117
117
|
},
|
|
118
|
+
{
|
|
119
|
+
name: 'list_domains',
|
|
120
|
+
description:
|
|
121
|
+
'List the user\'s branded custom short-link domains (e.g. go.acme.com). Returns each domain with its provisioning status (pending DNS / active / failed), SSL status, and the CNAME target the user needs to point their hostname at. Also returns the plan tier and the number of domains the plan allows.',
|
|
122
|
+
inputSchema: { type: 'object', properties: {} },
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'create_domain',
|
|
126
|
+
description:
|
|
127
|
+
'Register a new branded custom domain so short links can resolve at the user\'s own hostname instead of buygolinks.com. After creation, the user must add a CNAME record at their DNS provider pointing the hostname at the returned cname_target. SSL is auto-issued by Cloudflare once DNS resolves. Free plan does not allow custom domains.',
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
hostname: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'The hostname to register, e.g. "go.acme.com". Must be a valid public hostname; the buygolinks.com apex and its subdomains are reserved.',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
required: ['hostname'],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'verify_domain',
|
|
141
|
+
description:
|
|
142
|
+
'Force a re-check of a custom domain\'s status against Cloudflare. Use after the user has added the CNAME record to advance the domain from "pending" to "active". Returns the refreshed domain row.',
|
|
143
|
+
inputSchema: {
|
|
144
|
+
type: 'object',
|
|
145
|
+
properties: {
|
|
146
|
+
domain_id: { type: 'number', description: 'The numeric id of the domain (from list_domains / create_domain).' },
|
|
147
|
+
},
|
|
148
|
+
required: ['domain_id'],
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'delete_domain',
|
|
153
|
+
description:
|
|
154
|
+
'Remove a custom domain. Deletes the Cloudflare hostname binding and the local record. Short links served via this domain stop resolving immediately.',
|
|
155
|
+
inputSchema: {
|
|
156
|
+
type: 'object',
|
|
157
|
+
properties: {
|
|
158
|
+
domain_id: { type: 'number', description: 'The numeric id of the domain to remove.' },
|
|
159
|
+
},
|
|
160
|
+
required: ['domain_id'],
|
|
161
|
+
},
|
|
162
|
+
},
|
|
118
163
|
];
|
|
119
164
|
|
|
120
165
|
const server = new Server(
|
|
121
|
-
{ name: 'buygolinks', version: '0.
|
|
166
|
+
{ name: 'buygolinks', version: '0.2.0' },
|
|
122
167
|
{ capabilities: { tools: {} } },
|
|
123
168
|
);
|
|
124
169
|
|
|
@@ -155,6 +200,25 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
155
200
|
result = await api(`/api/stats/overview${days}`);
|
|
156
201
|
break;
|
|
157
202
|
}
|
|
203
|
+
case 'list_domains': {
|
|
204
|
+
result = await api('/api/domains');
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
case 'create_domain': {
|
|
208
|
+
result = await api('/api/domains', {
|
|
209
|
+
method: 'POST',
|
|
210
|
+
body: JSON.stringify({ hostname: args.hostname }),
|
|
211
|
+
});
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
case 'verify_domain': {
|
|
215
|
+
result = await api(`/api/domains/${Number(args.domain_id)}/verify`, { method: 'POST' });
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
case 'delete_domain': {
|
|
219
|
+
result = await api(`/api/domains/${Number(args.domain_id)}`, { method: 'DELETE' });
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
158
222
|
default:
|
|
159
223
|
throw new Error(`unknown tool: ${name}`);
|
|
160
224
|
}
|