monacloud-mcp 0.10.11 → 0.10.12
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/domains.js +65 -0
- package/dist/monapay.js +1 -1
- package/dist/remote.js +9 -4
- package/dist/server.d.ts +1 -0
- package/dist/server.js +1 -1
- package/docs/connectors-directory-submission.md +48 -0
- package/package.json +1 -1
package/dist/domains.js
CHANGED
|
@@ -50,6 +50,71 @@ export function registerDomainTools(server, clients) {
|
|
|
50
50
|
}
|
|
51
51
|
return results;
|
|
52
52
|
}));
|
|
53
|
+
server.registerTool('cloud_domain_tld_groups', {
|
|
54
|
+
annotations: toolAnnotationsForName('cloud_domain_tld_groups'),
|
|
55
|
+
title: 'Danh mục đuôi tên miền theo ngành',
|
|
56
|
+
description: 'Liệt kê các nhóm ngành của đuôi tên miền (Ăn uống, Công nghệ & AI, Quốc gia, Việt Nam...) kèm số lượng đuôi và khoảng giá VND mỗi nhóm. Gọi tool này TRƯỚC cloud_domain_tlds để biết slug ngành cần lọc. Không cần đăng nhập.',
|
|
57
|
+
inputSchema: z.object({}).strict(),
|
|
58
|
+
}, () => runTool(() => clients.vibecloudGuestOk('/api/domains/tlds/groups')));
|
|
59
|
+
server.registerTool('cloud_domain_tlds', {
|
|
60
|
+
annotations: toolAnnotationsForName('cloud_domain_tlds'),
|
|
61
|
+
title: 'Bảng giá đuôi tên miền',
|
|
62
|
+
description: 'Bảng giá đầy đủ các đuôi tên miền MONA Domain bán được, giá VND đã gồm VAT — giá năm đầu (price_vnd, đã tính khuyến mãi nếu registry đang chạy) và giá gia hạn mỗi năm (renew_vnd). Lọc theo ngành (group, lấy slug từ cloud_domain_tld_groups), theo từ khoá (q), hoặc theo ngân sách (max_price_vnd). Dùng khi người dùng hỏi "có những đuôi nào", "đuôi nào rẻ", "đuôi nào hợp ngành X". Đuôi .vn có needs_verification=true nghĩa là cần hồ sơ xác thực chủ thể. Không cần đăng nhập.',
|
|
63
|
+
inputSchema: z.object({
|
|
64
|
+
scope: z.enum(['popular', 'all']).optional()
|
|
65
|
+
.describe('popular = nhóm đuôi thông dụng (mặc định), all = toàn bộ danh sách.'),
|
|
66
|
+
group: z.string().max(40).optional()
|
|
67
|
+
.describe('Slug ngành từ cloud_domain_tld_groups (vd: "an-uong", "cong-nghe", "viet-nam").'),
|
|
68
|
+
q: z.string().max(40).optional().describe('Tìm trong tên đuôi và nhãn tiếng Việt (vd: "shop").'),
|
|
69
|
+
max_price_vnd: z.number().int().min(0).optional().describe('Chỉ lấy đuôi có giá năm đầu không quá số này.'),
|
|
70
|
+
sort: z.enum(['popular', 'price', 'tld']).optional().describe('Thứ tự sắp xếp. Mặc định popular.'),
|
|
71
|
+
limit: z.number().int().min(1).max(1000).optional().describe('Số dòng tối đa. Mặc định 200.'),
|
|
72
|
+
offset: z.number().int().min(0).optional().describe('Bỏ qua bao nhiêu dòng đầu, để lật trang.'),
|
|
73
|
+
}).strict(),
|
|
74
|
+
}, ({ scope, group, q, max_price_vnd, sort, limit, offset }) => runTool(() => {
|
|
75
|
+
const params = new URLSearchParams();
|
|
76
|
+
if (scope)
|
|
77
|
+
params.set('scope', scope);
|
|
78
|
+
if (group)
|
|
79
|
+
params.set('group', group);
|
|
80
|
+
if (q)
|
|
81
|
+
params.set('q', q);
|
|
82
|
+
if (max_price_vnd !== undefined)
|
|
83
|
+
params.set('max_price_vnd', String(max_price_vnd));
|
|
84
|
+
if (sort)
|
|
85
|
+
params.set('sort', sort);
|
|
86
|
+
if (limit !== undefined)
|
|
87
|
+
params.set('limit', String(limit));
|
|
88
|
+
if (offset !== undefined)
|
|
89
|
+
params.set('offset', String(offset));
|
|
90
|
+
const query = params.toString();
|
|
91
|
+
return clients.vibecloudGuestOk(`/api/domains/tlds${query ? `?${query}` : ''}`);
|
|
92
|
+
}));
|
|
93
|
+
server.registerTool('cloud_domain_suggest', {
|
|
94
|
+
annotations: toolAnnotationsForName('cloud_domain_suggest'),
|
|
95
|
+
title: 'Gợi ý tên miền còn trống',
|
|
96
|
+
description: 'Gợi ý những tên miền còn trống quanh một từ khoá, kèm giá VND đã gồm VAT. Từ khoá nhận tiếng Việt có dấu, tool tự bỏ dấu thành nhãn hợp lệ. Truyền industry (slug từ cloud_domain_tld_groups) để ưu tiên đuôi hợp ngành — vd quán cà phê sẽ ra .cafe và .coffee trước. Mọi kết quả đều đã tra trạng thái thật tại nhà đăng ký. Dùng khi tên người dùng muốn đã có người lấy, hoặc khi họ chưa nghĩ ra tên. Sau khi người dùng chọn thì gọi cloud_domain_buy (hoặc cloud_domain_reserve nếu chưa đăng nhập). Không cần đăng nhập.',
|
|
97
|
+
inputSchema: z.object({
|
|
98
|
+
keyword: z.string().min(1).max(63)
|
|
99
|
+
.describe('Tên muốn đặt hoặc từ khoá mô tả sản phẩm (vd: "Cà Phê Sạch", "myapp").'),
|
|
100
|
+
industry: z.string().max(40).optional()
|
|
101
|
+
.describe('Slug ngành từ cloud_domain_tld_groups để ưu tiên đuôi hợp ngành.'),
|
|
102
|
+
limit: z.number().int().min(1).max(30).optional().describe('Số gợi ý trả về. Mặc định 12.'),
|
|
103
|
+
max_price_vnd: z.number().int().min(0).optional().describe('Chặn trần giá năm đầu.'),
|
|
104
|
+
include_taken: z.boolean().optional().describe('true = giữ lại cả tên đã có người đăng ký.'),
|
|
105
|
+
}).strict(),
|
|
106
|
+
}, ({ keyword, industry, limit, max_price_vnd, include_taken }) => runTool(() => {
|
|
107
|
+
const params = new URLSearchParams({ keyword });
|
|
108
|
+
if (industry)
|
|
109
|
+
params.set('industry', industry);
|
|
110
|
+
if (limit !== undefined)
|
|
111
|
+
params.set('limit', String(limit));
|
|
112
|
+
if (max_price_vnd !== undefined)
|
|
113
|
+
params.set('max_price_vnd', String(max_price_vnd));
|
|
114
|
+
if (include_taken)
|
|
115
|
+
params.set('include_taken', 'true');
|
|
116
|
+
return clients.vibecloudGuestOk(`/api/domains/tlds/suggest?${params}`);
|
|
117
|
+
}));
|
|
53
118
|
server.registerTool('cloud_domain_registrant_get', {
|
|
54
119
|
annotations: toolAnnotationsForName('cloud_domain_registrant_get'),
|
|
55
120
|
title: 'Xem thông tin chủ thể đăng ký tên miền',
|
package/dist/monapay.js
CHANGED
|
@@ -4,7 +4,7 @@ import { MonaPayClient } from 'monapay-mcp/dist/client.js';
|
|
|
4
4
|
import { CloudError, errorResult } from './errors.js';
|
|
5
5
|
// cloud_subscription_update có thể huỷ gia hạn / dừng máy (cancel_action=stop) → xếp destructive để agent hỏi lại trước khi gọi.
|
|
6
6
|
const DESTRUCTIVE = /(?:^|_)(?:delete|remove|cancel|release|rotate|stop|destroy|reset|revoke|suspend)(?:_|$)|^cloud_subscription_update$/;
|
|
7
|
-
const READ_ONLY = /(?:^|_)(?:list|get|status|search|balance|ledger|health|whoami|usage|services|quote|detect|wait|logs|stats|templates|tlds|prices|packages)(?:_|$)/;
|
|
7
|
+
const READ_ONLY = /(?:^|_)(?:list|get|status|search|balance|ledger|health|whoami|usage|services|quote|detect|wait|logs|stats|templates|tlds|prices|packages|suggest|groups)(?:_|$)/;
|
|
8
8
|
const IDEMPOTENT_WRITE = /(?:^|_)(?:set|update|attach)(?:_|$)/;
|
|
9
9
|
/** Mechanical metadata shared by native tools and tools imported from monapay-mcp. */
|
|
10
10
|
export function toolAnnotationsForName(name) {
|
package/dist/remote.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { mkdirSync, mkdtempSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
3
4
|
import { join } from "node:path";
|
|
4
5
|
import cors from "cors";
|
|
5
6
|
import express from "express";
|
|
6
7
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
7
8
|
import { ProxyOAuthServerProvider } from "@modelcontextprotocol/sdk/server/auth/providers/proxyProvider.js";
|
|
8
9
|
import { mcpAuthRouter } from "@modelcontextprotocol/sdk/server/auth/router.js";
|
|
9
|
-
import { createServer as createMcpServer } from "./server.js";
|
|
10
|
+
import { createServer as createMcpServer, PKG_VERSION } from "./server.js";
|
|
10
11
|
import { createAccessTokenVerifier } from "./remote-verify.js";
|
|
11
12
|
const SCOPES = ["openid", "profile", "email", "offline_access", "vibecloud-api", "billing-api"];
|
|
12
13
|
// Keycloak DCR chỉ nhận tên client scope thật (openid/profile/email là mặc định, gửi kèm sẽ bị policy "Allowed Client Scopes" từ chối).
|
|
@@ -206,7 +207,7 @@ export async function createRemoteServer(options) {
|
|
|
206
207
|
res.set("Location", target.toString()).status(302).end();
|
|
207
208
|
});
|
|
208
209
|
app.get("/healthz", (_req, res) => {
|
|
209
|
-
res.json({ ok: true, version:
|
|
210
|
+
res.json({ ok: true, version: PKG_VERSION, sessions: sessions.size });
|
|
210
211
|
});
|
|
211
212
|
// RFC 9728 cho phép metadata theo path của resource (/.well-known/oauth-protected-resource/mcp) — Smithery/Claude thử URL này trước.
|
|
212
213
|
app.get(["/.well-known/oauth-protected-resource", "/.well-known/oauth-protected-resource/mcp"], (_req, res) => {
|
|
@@ -308,7 +309,11 @@ export async function createRemoteServer(options) {
|
|
|
308
309
|
sessionIdGenerator: randomUUID,
|
|
309
310
|
onsessioninitialized: (id) => { pendingSessionId = id; },
|
|
310
311
|
});
|
|
311
|
-
|
|
312
|
+
// Mỗi người dùng (sub MONA Pass) một thư mục cấu hình riêng: monapay_link ghi links.json, tuyệt đối không dùng chung
|
|
313
|
+
// ~/.config/monacloud của tiến trình (nếu dùng chung, credential MONA Pay của người này lọt sang phiên người khác).
|
|
314
|
+
const userDir = join(options.dataDir ?? mkdtempSync(join(tmpdir(), "mcp-remote-")), "users", auth.extra.sub.replace(/[^a-zA-Z0-9_-]/g, "_"));
|
|
315
|
+
mkdirSync(userDir, { recursive: true, mode: 0o700 });
|
|
316
|
+
const env = { ...process.env, ...options.env, MONACLOUD_TOKEN: auth.token, MONACLOUD_CONFIG_DIR: userDir };
|
|
312
317
|
const server = createServer({ env });
|
|
313
318
|
await server.connect(transport);
|
|
314
319
|
await transport.handleRequest(req, res, req.body);
|
package/dist/server.d.ts
CHANGED
package/dist/server.js
CHANGED
|
@@ -5,7 +5,7 @@ import { readConfig } from './config.js';
|
|
|
5
5
|
import { AuthManager } from './auth.js';
|
|
6
6
|
import { CloudClients } from './clients.js';
|
|
7
7
|
// serverInfo.version đọc từ package.json (từng hardcode 0.8.1 → client báo sai bản)
|
|
8
|
-
const PKG_VERSION = (() => {
|
|
8
|
+
export const PKG_VERSION = (() => {
|
|
9
9
|
try {
|
|
10
10
|
return String(createRequire(import.meta.url)('../package.json').version);
|
|
11
11
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Nộp Claude Connectors Directory — bản điền sẵn (Mon dán vào portal)
|
|
2
|
+
|
|
3
|
+
Portal: https://claude.ai/admin-settings/directory/submissions/new — **cần tài khoản Claude Team/Enterprise, vai Owner**. Cá nhân không có mục này. Tài liệu: https://claude.com/docs/connectors/building/submission
|
|
4
|
+
|
|
5
|
+
Điều kiện kỹ thuật đã đạt (19/09/2026): server HTTPS `https://mcp.monacloud.vn/mcp` (Streamable HTTP) · OAuth 2.0 + PKCE + Dynamic Client Registration (`/.well-known/oauth-authorization-server`, `/register`) · 177 tool đều có `title` + `readOnlyHint`/`destructiveHint` (monacloud-mcp ≥ 0.10.11) · chính sách quyền riêng tư https://monacloud.vn/chinh-sach-quyen-rieng-tu (EN: https://monacloud.vn/en/privacy) · Smithery đã quét thành công (177 tool, 3 prompt, 2 resource).
|
|
6
|
+
|
|
7
|
+
## 2. Connection
|
|
8
|
+
- Server URL: `https://mcp.monacloud.vn/mcp` · Transport: Streamable HTTP · Universal URL (một URL cho mọi người dùng).
|
|
9
|
+
|
|
10
|
+
## 4. Listing
|
|
11
|
+
- Name (≤100): `MONA Cloud`
|
|
12
|
+
- Tagline (≤55): `Domains .vn, deploy, Postgres, VietQR pay for Vietnam`
|
|
13
|
+
- Description (≤2000, tiếng Anh):
|
|
14
|
+
MONA Cloud gives Claude the tools Vietnamese builders need to ship a product end to end. Search and buy .vn and 370+ international domains priced in VND with VAT, reserve a name for 30 minutes and pay by VietQR from any Vietnamese banking app, then point DNS and SSL at your app. Deploy the app you are working on to MONA Cloud (a Vercel-style host billed in VND), create Postgres, Auth and Storage bases (a Supabase-style backend), send transactional email with MONA Mail, and accept bank-transfer payments with MONA Pay, all from one MONA Pass account and one VND wallet. When the wallet runs low, Claude shows a VietQR code; you scan it and continue. MONA Cloud is operated by The MONA Group (Vietnam, since 2016, 14,000+ projects). Domain search and quotes work before you sign in; buying, deploying and paying use your MONA Pass login.
|
|
15
|
+
- Categories: Developer Tools · Cloud & Infrastructure · Domains/Hosting · Payments (chọn 1–5 theo danh mục portal)
|
|
16
|
+
- Documentation URL: https://monacloud.vn/docs/mcp-va-sdk (thêm: https://monadomain.vn/docs, https://github.com/themonagroup/monacloud-mcp/blob/main/docs/remote.md)
|
|
17
|
+
- Privacy policy URL: https://monacloud.vn/en/privacy
|
|
18
|
+
- Support contact: info@themona.global · hotline 1900 636 648
|
|
19
|
+
- Icon: `~/mona-hub/brand/mona/monacloud/fav-monacloud.svg` (PNG 512: https://monadomain.vn/icon-512.png)
|
|
20
|
+
- Slug: `mona-cloud`
|
|
21
|
+
|
|
22
|
+
## 5. Use cases
|
|
23
|
+
- Primary use cases: (1) buy and configure a .vn or international domain for the app being built, in VND; (2) deploy the current project and databases to MONA Cloud and manage them; (3) accept VietQR bank-transfer payments and send transactional email from the app.
|
|
24
|
+
- Prerequisites: a free MONA Pass account (created on first login, Google/GitHub/email). Paid actions need VND in the wallet; Claude shows a VietQR to top up. .vn domains require the registrant's identity per Vietnamese law (Claude fills the form, the user verifies once).
|
|
25
|
+
- Reads and writes data: both.
|
|
26
|
+
|
|
27
|
+
## Example prompts (≥3, mỗi prompt đụng tool khác nhau)
|
|
28
|
+
1. "Buy a domain for this app, prefer .vn, budget 800,000 VND." → cloud_domain_search → cloud_domain_reserve → cloud_domain_claim/cloud_domain_buy
|
|
29
|
+
2. "Deploy this folder to MONA Cloud and give me the URL." → cloud_app_detect → cloud_app_create → cloud_app_status
|
|
30
|
+
3. "Create a Postgres base for this project and put the connection string in .env." → cloud_base_create → cloud_base_credentials
|
|
31
|
+
4. "Point mydomain.vn at the deployed app with SSL." → cloud_domain_attach → cloud_domain_dns_list
|
|
32
|
+
5. "Check my wallet balance and top up 200,000 VND." → cloud_balance → cloud_topup → cloud_topup_status
|
|
33
|
+
|
|
34
|
+
## 6. Company
|
|
35
|
+
- The MONA Group (Công ty TNHH MONA MEDIA), https://mona.media — contact: Vy Nguyễn Khánh Hùng, mon@themona.global
|
|
36
|
+
|
|
37
|
+
## 7. Authentication
|
|
38
|
+
- OAuth 2.0 with **dynamic client registration** (RFC 7591) at `https://mcp.monacloud.vn/register`; authorization server metadata at `https://mcp.monacloud.vn/.well-known/oauth-authorization-server`; PKCE S256; refresh tokens (offline_access). Identity provider: MONA Pass (Keycloak) at pass.monacloud.vn.
|
|
39
|
+
|
|
40
|
+
## 8. Data handling
|
|
41
|
+
- Underlying API is our own (api.monacloud.vn, billing.monacloud.vn, MONA Pass). No personal health data. No sponsored content. Domain registration data is passed to the registrar/VNNIC as required by law (see privacy policy).
|
|
42
|
+
|
|
43
|
+
## 9. Test & launch
|
|
44
|
+
- Test account: tài khoản MONA Pass riêng cho reviewer — lấy trong `~/.config/mona/monapass-e2e.env` (user `mon+mcp-e2e@themona.global`). Trước khi nộp: nạp ví test ~200.000đ để reviewer chạy được tool có phí ở sandbox (`MONACLOUD_SANDBOX` không áp cho remote → nêu rõ tool nào tính tiền).
|
|
45
|
+
- Steps for reviewer: Add custom connector → URL above → sign in with the test account → run `cloud_whoami`, `cloud_balance`, `cloud_domain_search` (q="monatest", tlds="vn,com"), `cloud_domain_reserve` (creates a 30-minute hold, no charge), `cloud_app_detect` on any folder.
|
|
46
|
+
- Confirm: every tool exercised via `support/e2e-remote.mjs` + MCP Inspector (19/09/2026).
|
|
47
|
+
|
|
48
|
+
## 10. Compliance — 7 xác nhận (đọc và tick trong portal).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monacloud-mcp",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.12",
|
|
4
4
|
"description": "MCP server for MONA Cloud — deploy apps (Vercel alternative), Supabase-compatible Postgres/Auth/Storage bases (Supabase alternative), VND wallet, MONA Pay & Mail — for AI agents (Claude, Cursor, Codex) in Vietnam.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://monacloud.vn",
|