@wix/mcp 1.0.1 → 1.0.2

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 CHANGED
@@ -29,6 +29,9 @@ args: ["/Users/absolute/path/to/build/bin.js"]
29
29
  ### enable experimental tools:
30
30
  `--experimental=WIX_API,CLI_COMMAND` - enable specific experimental tools (disabled by default)
31
31
 
32
+ ### choose a CLI mode:
33
+ `--cli=wix-one` - specifies to use Wix One CLI mode (if not specified, default CLI mode is used)
34
+
32
35
  ### choose a logger:
33
36
  `--logger=mcp` - log to MCP server (default)
34
37
  `--logger=file` - log to file (in `~/wix-mcp-log.txt`)
@@ -76,7 +76,8 @@ export function addApiCallTool(server, getSiteAccessToken, getAccountAccessToken
76
76
  };
77
77
  });
78
78
  server.tool('ManageWixSite', `Use account level API in order to create a site, update a site and publish site.
79
- ALWAYS use "SearchWixRESTDocumentation" to search for the API you should invoke, NEVER GUESS THE SITE API URL`, {
79
+ ALWAYS use "SearchWixRESTDocumentation" to search for the API you should invoke, NEVER GUESS THE SITE API URL
80
+ You should ALWAYS check the rest docs - "SearchWixRESTDocumentation" for the specific API you want to call, don't just call it without knowing what it does, CHECK THE DOCS`, {
80
81
  url: z
81
82
  .string()
82
83
  .describe('The url of the api to call - ALWAYS get the information from the Wix REST docs DONT GUESS IT, the URL MUST BE ABSOLUTE URL'),
package/build/bin.js CHANGED
@@ -71,10 +71,11 @@ if (docsTools.length > 0) {
71
71
  logger.log('Adding docs tools:', docsTools);
72
72
  addDocsTools(server, docsTools);
73
73
  }
74
+ const isWixOne = parsedArgs['cli'] === 'wix-one';
74
75
  const cliTools = activeTools.filter((tool) => VALID_CLI_TOOLS.includes(tool));
75
76
  if (cliTools.length > 0) {
76
- logger.log('Adding cli tools:', cliTools);
77
- addCliTools(server, cliTools);
77
+ logger.log('Adding cli tools:', cliTools, 'isWixOne:', isWixOne);
78
+ addCliTools(server, cliTools, isWixOne);
78
79
  }
79
80
  try {
80
81
  const portals = parsedArgs['portals']?.split(',') || [];
@@ -1,4 +1,4 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  export declare const VALID_CLI_TOOLS: readonly ["WIX_API", "CLI_COMMAND", "CLI_COMMAND_INTERACTIVE_MODE"];
3
3
  export type CLITool = (typeof VALID_CLI_TOOLS)[number];
4
- export declare function addCliTools(server: McpServer, allowedTools?: CLITool[]): void;
4
+ export declare function addCliTools(server: McpServer, allowedTools?: CLITool[], isWixOne?: boolean): void;
@@ -13,7 +13,7 @@ export function addCliTools(server, allowedTools = [
13
13
  'WIX_API',
14
14
  'CLI_COMMAND',
15
15
  'CLI_COMMAND_INTERACTIVE_MODE'
16
- ]) {
16
+ ], isWixOne = false) {
17
17
  if (allowedTools.includes('WIX_API')) {
18
18
  server.tool('CallWixAPI', 'Call Wix apis on an app. Use this to create, read, update, and delete data and other Wix entities in your Wix app.', {
19
19
  appPath: z
@@ -240,7 +240,7 @@ export function addCliTools(server, allowedTools = [
240
240
  // Format generate command with proper arguments
241
241
  commandName = 'npx';
242
242
  commandArgs = [
243
- 'wix',
243
+ isWixOne ? 'wix-one' : 'wix',
244
244
  'app',
245
245
  'generate',
246
246
  '-t',
@@ -255,6 +255,9 @@ export function addCliTools(server, allowedTools = [
255
255
  commandName = commandParts[0];
256
256
  commandArgs = commandParts.slice(1);
257
257
  }
258
+ if (isWixOne && commandName === 'wix') {
259
+ commandName = 'wix-one';
260
+ }
258
261
  try {
259
262
  logger.log(`Executing Wix CLI command: ${commandName} ${commandArgs.join(' ')}`);
260
263
  // Execute with timeout
@@ -130,11 +130,13 @@ export const addDocsTools = (server, allowedTools = [
130
130
  });
131
131
  }
132
132
  if (allowedTools.includes('BUSINESS_SOLUTIONS')) {
133
- server.tool('SearchWixSampleFlowsDocumentation', [
134
- 'Searches the official Wix Business solutions Sample flows documentations.',
135
- 'This tool provides guidance when there is a need to perform several actions over the Wix platform, and a sample flow is needed',
136
- 'For example, various ways to setup a new business, or an end to end user of user flow',
137
- 'Once the information is retrieved you can use Wix REST API docs in order to query the specific APIs you need to use in each step'
133
+ server.tool('WixBusinessFlowsDocumentation', [
134
+ 'This tool provides step-by-step recipes for setting up complex Wix business solutions that involve multiple API calls.',
135
+ 'It excels at guiding the creation of features like booking systems with payments.',
136
+ 'For example, it can guide the setup of a service in Wix Bookings where customers can pay using Wix Payments, such as creating a bookable yoga class',
137
+ 'It searches the Wix Business Solutions documentation for these integrated workflows involving services, bookings, payments, stores, blogs, and more.',
138
+ 'Before attempting to implement a multi step API calls on Wix, YOU MUST TRY THIS TOOL FIRST.',
139
+ 'If the result includes a link to another article, use ReadFullDocsArticle tool to fetch the full article.'
138
140
  ].join('\n'), {
139
141
  searchTerm: z
140
142
  .string()
@@ -152,7 +154,8 @@ export const addDocsTools = (server, allowedTools = [
152
154
  const result = await runSemanticSearchAndFormat({
153
155
  toolName: 'BUSINESS_SOLUTIONS',
154
156
  toolParams: {
155
- searchTerm: 'Sample Flow for: ' + searchTerm
157
+ searchTerm: '**RECIPE**: Business Recipes - full setup flow for::: ' +
158
+ searchTerm
156
159
  },
157
160
  maxResults: Math.max(1, Math.min(maxResults ?? 5, 15))
158
161
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A Model Context Protocol server for Wix AI tools",
5
5
  "type": "module",
6
6
  "bin": "./bin.js",
@@ -63,5 +63,5 @@
63
63
  ]
64
64
  }
65
65
  },
66
- "falconPackageHash": "45d0dbf4ab7e282591f50831a041971ab0ea17988030cb5d68ab0d86"
66
+ "falconPackageHash": "bebb972f9d803a633e2609035dfd5fc65e5498fe3690a8393291520b"
67
67
  }