webcake-storefront-mcp 1.31.4 → 1.31.5
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 +7 -3
- package/README.vi.md +7 -3
- package/dist/changelog.json +7 -7
- package/dist/server.js +12 -1
- package/dist/tools/collections.js +24 -3
- package/dist/web-guide.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./assets/logo.svg" alt="WebCake Storefront MCP" width="96" height="96">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">WebCake Storefront MCP</h1>
|
|
2
6
|
|
|
3
7
|
**English** · [Tiếng Việt](./README.vi.md)
|
|
4
8
|
|
|
@@ -78,7 +82,7 @@ An MCP (Model Context Protocol) server that teaches AI agents the **WebCake/Stor
|
|
|
78
82
|
page source; `build_page` creates the page and saves it, and `publish_site` makes the whole site live.
|
|
79
83
|
|
|
80
84
|
Beyond page authoring, it exposes your real store: pages & custom code, products, orders, collections,
|
|
81
|
-
blog articles, promotions, combos, themes, customers, and automation — **~
|
|
85
|
+
blog articles, promotions, combos, themes, customers, and automation — **~280 tools** in total.
|
|
82
86
|
|
|
83
87
|
| Method | Best for | Auth |
|
|
84
88
|
|--------|----------|------|
|
|
@@ -166,7 +170,7 @@ in chat via `update_auth` and `switch_site` — saved to a local config file at
|
|
|
166
170
|
|
|
167
171
|
## 🧰 The tools at a glance
|
|
168
172
|
|
|
169
|
-
~
|
|
173
|
+
~280 tools. The headline group **builds pages**; the rest read and edit your live store.
|
|
170
174
|
|
|
171
175
|
| Group | Tools | Needs |
|
|
172
176
|
|-------|-------|-------|
|
package/README.vi.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./assets/logo.svg" alt="WebCake Storefront MCP" width="96" height="96">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">WebCake Storefront MCP</h1>
|
|
2
6
|
|
|
3
7
|
[English](./README.md) · **Tiếng Việt**
|
|
4
8
|
|
|
@@ -78,7 +82,7 @@ WebCake/StoreCake (BuilderX)** và kết nối tới backend. AI tạo nguồn t
|
|
|
78
82
|
`build_page` tạo + lưu trang, `publish_site` đưa cả site lên live.
|
|
79
83
|
|
|
80
84
|
Ngoài dựng trang, nó mở ra cả store thật: trang & custom code, sản phẩm, đơn hàng, collection,
|
|
81
|
-
bài blog, khuyến mãi, combo, theme, khách hàng, automation — **~
|
|
85
|
+
bài blog, khuyến mãi, combo, theme, khách hàng, automation — **~280 tool** tổng cộng.
|
|
82
86
|
|
|
83
87
|
| Cách | Hợp cho | Auth |
|
|
84
88
|
|--------|----------|------|
|
|
@@ -165,7 +169,7 @@ trong chat bằng `update_auth` và `switch_site` — lưu vào file cấu hình
|
|
|
165
169
|
|
|
166
170
|
## 🧰 Bộ công cụ tổng quan
|
|
167
171
|
|
|
168
|
-
~
|
|
172
|
+
~280 tool. Nhóm chủ lực **dựng trang**; phần còn lại đọc và sửa store thật của bạn.
|
|
169
173
|
|
|
170
174
|
| Nhóm | Tool | Cần |
|
|
171
175
|
|-------|-------|-------|
|
package/dist/changelog.json
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "1.31.5",
|
|
4
|
+
"d": "26/06/2026",
|
|
5
|
+
"type": "Added",
|
|
6
|
+
"en": "Column definitions accepted by create_collection and update_collection_columns now support five new optional fields: note (help text for the…",
|
|
7
|
+
"vi": "Định nghĩa cột được chấp nhận bởi create_collection và update_collection_columns nay hỗ trợ thêm năm trường tùy chọn mới: note (ghi chú/mô tả cho…"
|
|
8
|
+
},
|
|
2
9
|
{
|
|
3
10
|
"v": "1.31.4",
|
|
4
11
|
"d": "26/06/2026",
|
|
@@ -33,12 +40,5 @@
|
|
|
33
40
|
"type": "Added",
|
|
34
41
|
"en": "New create_collection tool creates a custom data table by accepting a name and a schema array of field definitions (with types such as string,…",
|
|
35
42
|
"vi": "Tool mới create_collection tạo bảng dữ liệu tùy chỉnh bằng cách nhận tham số name và mảng schema chứa định nghĩa các trường (với các kiểu dữ liệu…"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"v": "1.30.0",
|
|
39
|
-
"d": "26/06/2026",
|
|
40
|
-
"type": "Added",
|
|
41
|
-
"en": "New list_customers tool browses or searches the site's customer list; accepts page, limit, and term (name/phone/email keyword) and returns a compact…",
|
|
42
|
-
"vi": "Tool mới list_customers duyệt hoặc tìm kiếm danh sách khách hàng của site; nhận các tham số page, limit và term (từ khóa tên/điện thoại/email) và…"
|
|
43
43
|
}
|
|
44
44
|
]
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
1
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
3
|
import { installTools, buildToolGroupIndex } from "./tools/registry.js";
|
|
4
|
+
/** Server version, read from package.json so it always tracks the published release. */
|
|
5
|
+
export const SERVER_VERSION = (() => {
|
|
6
|
+
try {
|
|
7
|
+
const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
8
|
+
return typeof pkg.version === "string" ? pkg.version : "0.0.0";
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return "0.0.0";
|
|
12
|
+
}
|
|
13
|
+
})();
|
|
3
14
|
const INSTRUCTIONS = `You are an AI assistant connected to the WebCake/StoreCake storefront platform via MCP tools.
|
|
4
15
|
|
|
5
16
|
IMPORTANT: When the user asks ANY question about their website, store, products, orders, pages, or code — you MUST use the available tools to look up real data before answering. Never guess.
|
|
@@ -25,7 +36,7 @@ function makeResult(data) {
|
|
|
25
36
|
/** Build a fully-wired MCP server bound to the given API client. */
|
|
26
37
|
export function createServer(api, opts = {}) {
|
|
27
38
|
const toolsSpec = opts.tools ?? process.env.WEBCAKE_TOOLS;
|
|
28
|
-
const server = new McpServer({ name: "webcake-storefront", version:
|
|
39
|
+
const server = new McpServer({ name: "webcake-storefront", version: SERVER_VERSION }, { instructions: `${INSTRUCTIONS}\n\n${buildToolGroupIndex(toolsSpec)}` });
|
|
29
40
|
const handle = async (fn) => {
|
|
30
41
|
try {
|
|
31
42
|
return makeResult(await fn());
|
|
@@ -40,18 +40,39 @@ export function registerCollectionTools(server, api, handle) {
|
|
|
40
40
|
return api.queryCollectionRecords(table_name, query);
|
|
41
41
|
}));
|
|
42
42
|
// ── Table-management tools (VERIFIED live: create table, edit columns, delete table). ──
|
|
43
|
-
//
|
|
43
|
+
// Custom-column types (matches the builderx_spa column editor; backend accepts these + more):
|
|
44
|
+
// text | rich_text | url | integer | float | decimal | boolean | reference | color |
|
|
45
|
+
// image | media_gallery | video | audio | document | date | naive_datetime | time |
|
|
46
|
+
// address | object | array.
|
|
47
|
+
// (string/binary_id/map are backend aliases of text/reference/object; binary_id & naive_datetime
|
|
48
|
+
// are reserved for SYSTEM columns like id/inserted_at — don't pick them for custom fields.)
|
|
44
49
|
const COLUMN = z.object({
|
|
45
50
|
name: z.string().describe("Column name (snake_case)."),
|
|
46
|
-
type: z
|
|
51
|
+
type: z
|
|
52
|
+
.string()
|
|
53
|
+
.describe("text | rich_text | url | integer | float | decimal | boolean | reference | color | image | media_gallery | video | audio | document | date | naive_datetime | time | address | object | array"),
|
|
47
54
|
display_name: z.string().optional(),
|
|
48
55
|
is_required: z.boolean().optional(),
|
|
49
56
|
is_unique: z.boolean().optional(),
|
|
57
|
+
note: z.string().optional().describe("Help text / description for the column."),
|
|
58
|
+
default: z.any().optional().describe("Default value for the column."),
|
|
59
|
+
reference: z
|
|
60
|
+
.string()
|
|
61
|
+
.optional()
|
|
62
|
+
.describe("For type 'reference' only: the referenced table_name, or a system entity (customer | product | article | blog | variation)."),
|
|
63
|
+
reference_type: z
|
|
64
|
+
.enum(["system", "collection"])
|
|
65
|
+
.optional()
|
|
66
|
+
.describe("For type 'reference' only: 'system' (built-in entity) or 'collection' (another custom table)."),
|
|
67
|
+
date_default_type: z
|
|
68
|
+
.enum(["empty", "added", "specific"])
|
|
69
|
+
.optional()
|
|
70
|
+
.describe("For type 'date'/'naive_datetime' only: how the default date is set."),
|
|
50
71
|
});
|
|
51
72
|
server.tool("create_collection", "Create a new collection (custom data TABLE). It starts with the system columns (id/inserted_at/updated_at/creator_id); pass `columns` to add custom fields. NOTE: to WRITE records into it, use an HTTP function (webcake-data: db.model(table).create({...})) — the dashboard has no direct record-insert API. See get_http_function for the SDK guide.", {
|
|
52
73
|
name: z.string().describe("Display name."),
|
|
53
74
|
table_name: z.string().optional().describe("Table name (snake_case, unique). Defaults to name."),
|
|
54
|
-
columns: z.array(COLUMN).optional().describe("Custom columns to add, e.g. [{name:'email',type:'
|
|
75
|
+
columns: z.array(COLUMN).optional().describe("Custom columns to add, e.g. [{name:'email',type:'text'},{name:'amount',type:'integer'}]."),
|
|
55
76
|
}, ({ name, table_name, columns }) => handle(async () => {
|
|
56
77
|
const tn = (table_name || name).trim();
|
|
57
78
|
const created = await api.createCollection({ name, table_name: tn });
|
package/dist/web-guide.js
CHANGED
|
@@ -872,7 +872,7 @@ export function guideHtml(origin, lang = "vi") {
|
|
|
872
872
|
<details style="margin-top:18px;padding:0">
|
|
873
873
|
<summary>${L === "vi" ? "Dành cho người dùng nâng cao / lập trình viên" : "For advanced users / developers"}</summary>
|
|
874
874
|
<p>${L === "vi" ? "Danh sách đầy đủ các công cụ và lệnh kỹ thuật:" : "Full list of tools and technical commands:"}</p>
|
|
875
|
-
<pre>${L === "vi" ? "~
|
|
875
|
+
<pre>${L === "vi" ? "~280 tool: get_build_guide · list_elements · get_element · new_element · new_section · new_page_skeleton · validate_page · build_page · add_section · list_pages · get_page_source · search_page_elements · update_page_element · create_page · update_page · update_page_source · publish_site · list_cms_files · get_http_function · edit_http_function · run_function · debug_function · get_current_context · list_my_sites · switch_site · update_auth · toggle_confirm_mode · send_mail · …và nhiều hơn nữa" : "~280 tools: get_build_guide · list_elements · get_element · new_element · new_section · new_page_skeleton · validate_page · build_page · add_section · list_pages · get_page_source · search_page_elements · update_page_element · create_page · update_page · update_page_source · publish_site · list_cms_files · get_http_function · edit_http_function · run_function · debug_function · get_current_context · list_my_sites · switch_site · update_auth · toggle_confirm_mode · send_mail · …and more"}</pre>
|
|
876
876
|
</details>
|
|
877
877
|
</div>
|
|
878
878
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webcake-storefront-mcp",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.5",
|
|
4
4
|
"description": "MCP server for the WebCake/StoreCake storefront builder — page CRUD, page authoring, products, orders, and more",
|
|
5
5
|
"mcpName": "io.github.vuluu2k/webcake-storefront-mcp",
|
|
6
6
|
"license": "MIT",
|