monacloud-mcp 0.10.2 → 0.10.3
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/server.js +11 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
import { readConfig } from './config.js';
|
|
4
5
|
import { AuthManager } from './auth.js';
|
|
5
6
|
import { CloudClients } from './clients.js';
|
|
7
|
+
// serverInfo.version đọc từ package.json (từng hardcode 0.8.1 → client báo sai bản)
|
|
8
|
+
const PKG_VERSION = (() => {
|
|
9
|
+
try {
|
|
10
|
+
return String(createRequire(import.meta.url)('../package.json').version);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return '0.0.0';
|
|
14
|
+
}
|
|
15
|
+
})();
|
|
6
16
|
import { errorResult, runTool, textResult, toAgentError } from './errors.js';
|
|
7
17
|
import { requestJson, unwrapData } from './http.js';
|
|
8
18
|
import { createMonaPayClient, importedMonaPayTools, normalizeImportedResult } from './monapay.js';
|
|
@@ -93,7 +103,7 @@ export function createServer(dependencies = {}) {
|
|
|
93
103
|
const auth = new AuthManager(config, env, fetchImpl);
|
|
94
104
|
const clients = new CloudClients(config, auth, fetchImpl);
|
|
95
105
|
const catalog = new TemplateCatalog(config, fetchImpl);
|
|
96
|
-
const server = new McpServer({ name: 'monacloud-mcp', version:
|
|
106
|
+
const server = new McpServer({ name: 'monacloud-mcp', version: PKG_VERSION },
|
|
97
107
|
// Codex chỉ chắc chắn đọc 512 ký tự đầu của instructions → luật quan trọng nhất đặt trước, mô tả hệ đặt sau.
|
|
98
108
|
{ instructions: `Tên miền khi người dùng CHƯA có tài khoản: cloud_domain_search (không cần login) → cloud_domain_reserve (email + sđt) → đưa QR + claim_url, KHÔNG bảo đi đăng ký/mở web; có tài khoản rồi thì cloud_domain_claim/cloud_domain_buy. Ví thiếu tiền: AI tự gọi cloud_topup, in nguyên khối qr_ascii (QR VietQR) cho người dùng quét bằng app ngân hàng ngay trong terminal, rồi cloud_topup_status tới khi paid; không bảo người dùng mở console để nạp. Dùng cloud_* cho tài khoản, ví và hạ tầng; monapay_* cho thu tiền; mail_* để gửi email giao dịch (MONA Mail); agent_* cho catalog. Không bao giờ yêu cầu mật khẩu sản phẩm. Đọc → ước tính → hỏi duyệt nếu chưa được duyệt → làm. Dừng chờ người dùng ở: quét QR nạp, duyệt chi phí, thêm DNS, OTP hoặc KYC.\n${ENTITY}\n${APP_FLOW}` });
|
|
99
109
|
server.registerTool('cloud_whoami', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monacloud-mcp",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
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",
|