@syncfusion/javascript-assistant 0.1.0 → 1.0.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 +231 -203
- package/dist/index.js +1 -1
- package/dist/tools/javascript.js +15 -15
- package/dist/utils/helpbot.js +8 -1
- package/license +2 -0
- package/package.json +4 -8
package/README.md
CHANGED
|
@@ -1,203 +1,231 @@
|
|
|
1
|
-
# SyncfusionJavaScriptAssistant MCP Server
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The SyncfusionJavaScriptAssistant is a specialized [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server designed to enhance development with Syncfusion's Javascript control libraries. It integrates seamlessly with [MCP-compatible clients](https://modelcontextprotocol.io/clients) to provide intelligent assistance for building Javascript applications with Syncfusion<sup style="font-size:70%">®</sup> controls.
|
|
6
|
-
|
|
7
|
-
### Key Features
|
|
8
|
-
|
|
9
|
-
* Intelligent code generation for Syncfusion<sup style="font-size:70%">®</sup> Javascript controls.
|
|
10
|
-
* Detailed control documentation and usage examples.
|
|
11
|
-
* Troubleshooting assistance for common integration challenges.
|
|
12
|
-
|
|
13
|
-
## Prerequisites
|
|
14
|
-
|
|
15
|
-
Before using SyncfusionJavaScriptAssistant, ensure you have:
|
|
16
|
-
|
|
17
|
-
* Required [node](https://nodejs.org/en/) version >= 18
|
|
18
|
-
* A [compatible MCP client](https://modelcontextprotocol.io/clients) (VS Code with GitHub Copilot, [Syncfusion<sup style="font-size:70%">®</sup> CodeStudio](https://www.syncfusion.com/code-studio/), etc.)
|
|
19
|
-
* An active Syncfusion<sup style="font-size:70%">®</sup> license (any of the following):
|
|
20
|
-
- [Commercial License](https://www.syncfusion.com/sales/unlimitedlicense)
|
|
21
|
-
- [Free Community License](https://www.syncfusion.com/products/communitylicense)
|
|
22
|
-
- [Free Trial](https://www.syncfusion.com/account/manage-trials/start-trials)
|
|
23
|
-
* An active [API KEY](https://syncfusion.com/account/api-key)
|
|
24
|
-
|
|
25
|
-
## Unlimited Access
|
|
26
|
-
|
|
27
|
-
Syncfusion<sup style="font-size:70%">®</sup> offers unlimited access to this MCP server. There are no restrictions on:
|
|
28
|
-
|
|
29
|
-
* Number of requests
|
|
30
|
-
* Controls usage
|
|
31
|
-
* Query caps
|
|
32
|
-
* Usage duration
|
|
33
|
-
|
|
34
|
-
This ensures users can fully leverage Syncfusion<sup style="font-size:70%">®</sup> controls to enhance their development experience without limitations.
|
|
35
|
-
|
|
36
|
-
## Installation
|
|
37
|
-
|
|
38
|
-
Before you can invoke the `SyncfusionJavaScriptAssistant` MCP server, you need to configure your MCP client with these core settings. The **Generic MCP Server Settings** shown below are identical across all clients:
|
|
39
|
-
|
|
40
|
-
### Generic MCP Server Settings
|
|
41
|
-
|
|
42
|
-
- **npm package name**: `@syncfusion/javascript-assistant`
|
|
43
|
-
- **Type**: stdio (standard input/output transport)
|
|
44
|
-
- **Command**: npx
|
|
45
|
-
- **Arguments**: -y
|
|
46
|
-
- **Server name**: SyncfusionJavaScriptAssistant
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"mcpServers": {
|
|
123
|
-
"syncfusion-javascript-assistant": {
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
1
|
+
# SyncfusionJavaScriptAssistant MCP Server
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The SyncfusionJavaScriptAssistant is a specialized [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server designed to enhance development with Syncfusion's Javascript control libraries. It integrates seamlessly with [MCP-compatible clients](https://modelcontextprotocol.io/clients) to provide intelligent assistance for building Javascript applications with Syncfusion<sup style="font-size:70%">®</sup> controls.
|
|
6
|
+
|
|
7
|
+
### Key Features
|
|
8
|
+
|
|
9
|
+
* Intelligent code generation for Syncfusion<sup style="font-size:70%">®</sup> Javascript controls.
|
|
10
|
+
* Detailed control documentation and usage examples.
|
|
11
|
+
* Troubleshooting assistance for common integration challenges.
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
Before using SyncfusionJavaScriptAssistant, ensure you have:
|
|
16
|
+
|
|
17
|
+
* Required [node](https://nodejs.org/en/) version >= 18
|
|
18
|
+
* A [compatible MCP client](https://modelcontextprotocol.io/clients) (VS Code with GitHub Copilot, [Syncfusion<sup style="font-size:70%">®</sup> CodeStudio](https://www.syncfusion.com/code-studio/), etc.)
|
|
19
|
+
* An active Syncfusion<sup style="font-size:70%">®</sup> license (any of the following):
|
|
20
|
+
- [Commercial License](https://www.syncfusion.com/sales/unlimitedlicense)
|
|
21
|
+
- [Free Community License](https://www.syncfusion.com/products/communitylicense)
|
|
22
|
+
- [Free Trial](https://www.syncfusion.com/account/manage-trials/start-trials)
|
|
23
|
+
* An active [API KEY](https://syncfusion.com/account/api-key)
|
|
24
|
+
|
|
25
|
+
## Unlimited Access
|
|
26
|
+
|
|
27
|
+
Syncfusion<sup style="font-size:70%">®</sup> offers unlimited access to this MCP server. There are no restrictions on:
|
|
28
|
+
|
|
29
|
+
* Number of requests
|
|
30
|
+
* Controls usage
|
|
31
|
+
* Query caps
|
|
32
|
+
* Usage duration
|
|
33
|
+
|
|
34
|
+
This ensures users can fully leverage Syncfusion<sup style="font-size:70%">®</sup> controls to enhance their development experience without limitations.
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
Before you can invoke the `SyncfusionJavaScriptAssistant` MCP server, you need to configure your MCP client with these core settings. The **Generic MCP Server Settings** shown below are identical across all clients:
|
|
39
|
+
|
|
40
|
+
### Generic MCP Server Settings
|
|
41
|
+
|
|
42
|
+
- **npm package name**: `@syncfusion/javascript-assistant`
|
|
43
|
+
- **Type**: stdio (standard input/output transport)
|
|
44
|
+
- **Command**: npx
|
|
45
|
+
- **Arguments**: -y
|
|
46
|
+
- **Server name**: SyncfusionJavaScriptAssistant
|
|
47
|
+
|
|
48
|
+
#### API Key Configuration
|
|
49
|
+
|
|
50
|
+
Login to your [Syncfusion account](http://syncfusion.com/account/) and generate an API Key from the [API Key page](https://www.syncfusion.com/account/api-key). Replace `YOUR_API_KEY_FILE_PATH` or `YOUR_API_KEY` in the configuration files with your generated key.
|
|
51
|
+
|
|
52
|
+
There are two options:
|
|
53
|
+
|
|
54
|
+
* **Using an API Key File (Recommended)**
|
|
55
|
+
|
|
56
|
+
Store your API key in a separate file and reference its path in the `Syncfusion_API_Key_Path` environment parameter. This approach is more secure as you don't expose the key directly in configuration files.
|
|
57
|
+
|
|
58
|
+
**Supported file formats:** `.txt` or `.key` file
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
"env": {
|
|
62
|
+
"Syncfusion_API_Key_Path": "YOUR_API_KEY_FILE_PATH" // "D:\\syncfusion-key.txt" (or) "D:\\syncfusion-key.key"
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
* **Direct API Key**
|
|
67
|
+
|
|
68
|
+
Paste your `Syncfusion_API_Key` directly in the configuration file's environment parameter.
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
"env": {
|
|
72
|
+
"Syncfusion_API_Key": "YOUR_API_KEY"
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Below are setup instructions for popular MCP clients:
|
|
77
|
+
|
|
78
|
+
### Syncfusion<sup style="font-size:70%">®</sup> Code Studio
|
|
79
|
+
|
|
80
|
+
* In [Code Studio](https://www.syncfusion.com/code-studio/), open MCP Marketplace and navigate to the `Custom Servers` tab.
|
|
81
|
+
* Enter the Server Name as `javascript-mcp`, choose Server Type as npm package, and set the NPM Package name to `@syncfusion/javascript-assistant`.
|
|
82
|
+
* Add an environment variable as `Syncfusion_API_Key` and value as your [Syncfusion API key](https://syncfusion.com/account/api-key), then click **Install Server**.
|
|
83
|
+
* Once installed, the server will appear in the User Installed Server list, and will be added to the **config.yaml** file.
|
|
84
|
+
* The server is now ready for use in Code Studio. For more details, refer to the [Code Studio documentation](https://help.syncfusion.com/code-studio/reference/configure-properties/mcp/customservers#npm-server).
|
|
85
|
+
|
|
86
|
+
### VS Code (GitHub Copilot MCP)
|
|
87
|
+
|
|
88
|
+
* To configure an MCP server for a specific workspace, you can create a `.vscode/mcp.json` file in your workspace folder.
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"servers": {
|
|
93
|
+
"syncfusion-javascript-assistant": {
|
|
94
|
+
"type": "stdio",
|
|
95
|
+
"command": "npx",
|
|
96
|
+
"args": [
|
|
97
|
+
"-y",
|
|
98
|
+
"@syncfusion/javascript-assistant@latest"
|
|
99
|
+
],
|
|
100
|
+
"env": {
|
|
101
|
+
"Syncfusion_API_Key_Path": "YOUR_API_KEY_FILE_PATH",
|
|
102
|
+
// or
|
|
103
|
+
"Syncfusion_API_Key": "YOUR_API_KEY"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
* After updating the configuration in mcp.json, you'll notice a "Start" option at the top of the config. This allows you to easily start the SyncfusionJavaScriptAssistant server directly from the settings interface without additional commands.
|
|
111
|
+
|
|
112
|
+
* Confirm the server is active by checking for a message like: `SyncfusionJavaScriptAssistant is running...` in the output.
|
|
113
|
+
|
|
114
|
+
* For additional guidance, refer to the [VS Code documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers#_add-an-mcp-server).
|
|
115
|
+
|
|
116
|
+
### Cursor
|
|
117
|
+
|
|
118
|
+
To configure an MCP server for a specific workspace, you can create a `.cursor/mcp.json` file in your workspace folder.
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"mcpServers": {
|
|
123
|
+
"syncfusion-javascript-assistant": {
|
|
124
|
+
"type": "stdio",
|
|
125
|
+
"command": "npx",
|
|
126
|
+
"args": [
|
|
127
|
+
"-y",
|
|
128
|
+
"@syncfusion/javascript-assistant@latest"
|
|
129
|
+
],
|
|
130
|
+
"env": {
|
|
131
|
+
"Syncfusion_API_Key_Path": "YOUR_API_KEY_FILE_PATH",
|
|
132
|
+
// or
|
|
133
|
+
"Syncfusion_API_Key": "YOUR_API_KEY"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
For more details, refer to the [Cursor documentation](https://cursor.com/docs/context/mcp#using-mcp-json).
|
|
141
|
+
|
|
142
|
+
### JetBrains IDEs
|
|
143
|
+
|
|
144
|
+
* Go to Settings -> Tools -> AI Assistant -> Model Context Protocol (MCP).
|
|
145
|
+
* Click + Add to add a new MCP server configuration.
|
|
146
|
+
* In the New MCP Server dialog, switch the dropdown as `As JSON` and add the following config:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"mcpServers": {
|
|
151
|
+
"syncfusion-javascript-assistant": {
|
|
152
|
+
"command": "npx.cmd",
|
|
153
|
+
"args": [
|
|
154
|
+
"-y",
|
|
155
|
+
"@syncfusion/javascript-assistant@latest"
|
|
156
|
+
],
|
|
157
|
+
"env": {
|
|
158
|
+
"Syncfusion_API_Key_Path": "YOUR_API_KEY_FILE_PATH",
|
|
159
|
+
// or
|
|
160
|
+
"Syncfusion_API_Key": "YOUR_API_KEY"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
* Click OK and Apply.
|
|
168
|
+
|
|
169
|
+
For further assistance, see the [JetBrains documentation](https://www.jetbrains.com/help/ai-assistant/mcp.html#connect-to-an-mcp-server).
|
|
170
|
+
|
|
171
|
+
> For more detailed information about configuring MCP servers in various clients, refer to the official documentations, e.g., [Windsurf](https://docs.windsurf.com/windsurf/cascade/mcp#mcp-config-json)
|
|
172
|
+
|
|
173
|
+
## Usage
|
|
174
|
+
|
|
175
|
+
To activate the SyncfusionJavaScriptAssistant MCP server:
|
|
176
|
+
|
|
177
|
+
1. Start your prompt with one of the following:
|
|
178
|
+
* 'SyncfusionJavaScriptAssistant'
|
|
179
|
+
* '/syncfusion-javascript-assistant'
|
|
180
|
+
* '/syncfusion-javascript'
|
|
181
|
+
* '@syncfusion-javascript'
|
|
182
|
+
* '@ask_syncfusion_javascript'
|
|
183
|
+
* 'ej2-javascript'
|
|
184
|
+
|
|
185
|
+
In VS Code, use `#SyncfusionJavaScriptAssistant` for direct invocation.
|
|
186
|
+
|
|
187
|
+
2. Grant permission for the server to run (for the session, workspace, or always).
|
|
188
|
+
3. For best results, start a new chat for each new topic to maintain clean context.
|
|
189
|
+
|
|
190
|
+
### Mode availability
|
|
191
|
+
|
|
192
|
+
Syncfusion<sup style="font-size:70%">®</sup> MCP Servers provide full access to all AI interaction modes — Ask/Chat, Edit, and Agent — across supported MCP clients.
|
|
193
|
+
|
|
194
|
+
### Best Practices for Effective Usage
|
|
195
|
+
|
|
196
|
+
1. `Be specific`: Mention both platform and control (e.g., "How do I create a Syncfusion JavaScript Grid with paging and filtering?").
|
|
197
|
+
2. `Provide context`: Include details about your use case for more targeted solutions.
|
|
198
|
+
3. `Use descriptive queries`: Avoid vague questions that lack necessary context.
|
|
199
|
+
4. `Start fresh for new topics`: Begin a new chat session when switching controls or topics.
|
|
200
|
+
|
|
201
|
+
### Example Queries
|
|
202
|
+
|
|
203
|
+
Here are some effective ways to use SyncfusionJavaScriptAssistant:
|
|
204
|
+
|
|
205
|
+
* "Create a Syncfusion JavaScript Grid control with paging, sorting and filtering."
|
|
206
|
+
* "How do I implement data binding with Syncfusion JavaScript scheduler?"
|
|
207
|
+
* "Show me how to create a dashboard with multiple Syncfusion controls."
|
|
208
|
+
|
|
209
|
+
## Troubleshooting
|
|
210
|
+
|
|
211
|
+
If you encounter issues:
|
|
212
|
+
|
|
213
|
+
* Verify your API key is correctly configured.
|
|
214
|
+
* Ensure the MCP server is enabled in your client's tools selection.
|
|
215
|
+
* Check that you're using a compatible MCP client version.
|
|
216
|
+
* Try restarting your development environment.
|
|
217
|
+
|
|
218
|
+
## Support
|
|
219
|
+
|
|
220
|
+
Product support is available through the following mediums.
|
|
221
|
+
|
|
222
|
+
* [Support ticket](https://support.syncfusion.com/support/tickets/create) - Guaranteed Response in 24 hours | Unlimited tickets | Holiday support
|
|
223
|
+
* [Community forum](https://www.syncfusion.com/forums/essential-js2)
|
|
224
|
+
* [Request feature or report bug](https://www.syncfusion.com/feedback/javascript)
|
|
225
|
+
* Live chat
|
|
226
|
+
|
|
227
|
+
## License
|
|
228
|
+
This is a commercial product and requires a paid license for possession or use. Syncfusion<sup>®</sup> licensed software, including this control, is subject to the terms and conditions of [Syncfusion's EULA](https://www.syncfusion.com/eula/es/). To acquire a license, you can purchase [here](https://www.syncfusion.com/sales/products) or start a free 30-day trial [here](https://www.syncfusion.com/account/manage-trials/start-trials).
|
|
229
|
+
A free [community license](https://www.syncfusion.com/products/communitylicense) is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers.
|
|
230
|
+
© Copyright 2025 Syncfusion<sup>®</sup> Inc. All Rights Reserved. The Syncfusion<sup>®</sup> Essential Studio<sup>®</sup> license and copyright applies to this distribution.
|
|
231
|
+
The Syncfusion<sup>®</sup> Essential<sup>®</sup> Studio license and copyright applies to this distribution.
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ toolRegistry.register(SyncfusionJavaScriptAssistantTool);
|
|
|
8
8
|
async function runServer() {
|
|
9
9
|
const server = new McpServer({
|
|
10
10
|
name: "SyncfusionJavaScriptAssistant",
|
|
11
|
-
version: "
|
|
11
|
+
version: "1.0.0"
|
|
12
12
|
});
|
|
13
13
|
for (const tool of toolRegistry.getAll()) {
|
|
14
14
|
server.tool(tool.name, tool.description, tool.inputSchema, tool.handler);
|
package/dist/tools/javascript.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { callSyncfusionHelpbotAPI } from "../utils/helpbot.js";
|
|
3
3
|
const TOOL_NAME = "SyncfusionJavaScriptAssistant";
|
|
4
|
-
const TOOL_DESCRIPTION = `
|
|
5
|
-
The ${TOOL_NAME} helps you with Syncfusion UI for JavaScript development questions and provides documentation references. This tool is useful when you need assistance with:
|
|
6
|
-
|
|
7
|
-
1. Understanding specific Syncfusion JavaScript controls like Grid, Chart, Scheduler, DatePicker, etc.
|
|
8
|
-
2. Implementation techniques for Syncfusion JavaScript controls.
|
|
9
|
-
|
|
10
|
-
Provide your detailed question in the 'query' parameter. When your question involves specific Syncfusion JavaScript controls it will detect control references for retrieving relevant documentation and assistance.
|
|
11
|
-
This tool understands the context based on the context MCP client will send the proper query to this server.
|
|
12
|
-
This tool can be automatically triggered when any of the following phrases are detected in the user's input:
|
|
13
|
-
- 'SyncfusionJavaScriptAssistant'
|
|
14
|
-
- '/syncfusion-javascript-assistant'
|
|
15
|
-
- '/syncfusion-javascript'
|
|
16
|
-
- '@syncfusion-javascript'
|
|
17
|
-
- '@ask_syncfusion_javascript'
|
|
18
|
-
- 'ej2-javascript'
|
|
4
|
+
const TOOL_DESCRIPTION = `
|
|
5
|
+
The ${TOOL_NAME} helps you with Syncfusion UI for JavaScript development questions and provides documentation references. This tool is useful when you need assistance with:
|
|
6
|
+
|
|
7
|
+
1. Understanding specific Syncfusion JavaScript controls like Grid, Chart, Scheduler, DatePicker, etc.
|
|
8
|
+
2. Implementation techniques for Syncfusion JavaScript controls.
|
|
9
|
+
|
|
10
|
+
Provide your detailed question in the 'query' parameter. When your question involves specific Syncfusion JavaScript controls it will detect control references for retrieving relevant documentation and assistance.
|
|
11
|
+
This tool understands the context based on the context MCP client will send the proper query to this server.
|
|
12
|
+
This tool can be automatically triggered when any of the following phrases are detected in the user's input:
|
|
13
|
+
- 'SyncfusionJavaScriptAssistant'
|
|
14
|
+
- '/syncfusion-javascript-assistant'
|
|
15
|
+
- '/syncfusion-javascript'
|
|
16
|
+
- '@syncfusion-javascript'
|
|
17
|
+
- '@ask_syncfusion_javascript'
|
|
18
|
+
- 'ej2-javascript'
|
|
19
19
|
`;
|
|
20
20
|
// Define the input schema shape for the tool
|
|
21
21
|
const inputSchema = {
|
package/dist/utils/helpbot.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
let apiKey;
|
|
4
|
+
if (process.env.Syncfusion_API_Key_Path) {
|
|
5
|
+
apiKey = readFileSync(process.env.Syncfusion_API_Key_Path, 'utf8');
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
apiKey = process.env.Syncfusion_API_Key || "";
|
|
9
|
+
}
|
|
3
10
|
export async function callSyncfusionHelpbotAPI(query, platform, controls) {
|
|
4
11
|
try {
|
|
5
12
|
const resp = await axios.post("https://helpbot.syncfusion.com/api/documents/search", { "query": `${query} ${controls}`, "platform": platform, "tool": "javascript-mcp" }, {
|
package/license
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
SyncfusionJavaScriptAssistant, part of the Essential JS 2 library, is available under the Syncfusion Essential Studio program and can be licensed under either the Syncfusion Community License Program or a Syncfusion commercial license. To be qualified for the Syncfusion Community License Program you must have a gross revenue of less than one (1) million U.S. dollars ($1,000,000.00 USD) per year and have less than five (5) developers in your organization, and agree to be bound by Syncfusion’s terms and conditions. Customers who do not qualify for the community license can contact sales@syncfusion.com for commercial licensing options. Under no circumstances can you use this product without (1) either a Community License or a commercial license and (2) without agreeing and abiding by Syncfusion’s license containing all terms and conditions. The Syncfusion license that contains the terms and conditions can be found at https://www.syncfusion.com/content/downloads/syncfusion_license.pdf
|
|
2
|
+
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/javascript-assistant",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "MCP server that provides efficient access to Syncfusion documentation, implementation guidelines, and code generation for JavaScript",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"license": "SEE LICENSE IN license",
|
|
6
7
|
"bin": {
|
|
7
8
|
"javascript-assistant": "./dist/index.js"
|
|
8
9
|
},
|
|
@@ -20,12 +21,7 @@
|
|
|
20
21
|
"assets"
|
|
21
22
|
],
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@modelcontextprotocol/sdk": "1.
|
|
24
|
-
"axios": "1.
|
|
25
|
-
},
|
|
26
|
-
"scripts": {
|
|
27
|
-
"build": "tsc",
|
|
28
|
-
"start": "tsc",
|
|
29
|
-
"inspector": "npx @modelcontextprotocol/inspector dist/index.js"
|
|
24
|
+
"@modelcontextprotocol/sdk": "1.23.0",
|
|
25
|
+
"axios": "1.13.2"
|
|
30
26
|
}
|
|
31
27
|
}
|