@mindfiredigital/ignix-lite-mcp 1.0.0 โ†’ 1.3.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 ADDED
@@ -0,0 +1,108 @@
1
+ # @mindfiredigital/ignix-lite-mcp
2
+
3
+ An agent-optimized, Model Context Protocol (MCP) server for **Ignix-Lite**-the browser-native, classless, accessible CSS component library.
4
+
5
+ This MCP server equips AI coding agents with the runtime capabilities to discover, construct, validate, theme, and visually audit Ignix-Lite markup.
6
+
7
+ ---
8
+
9
+ ## ๐Ÿš€ Key Features
10
+
11
+ - **Intent-to-UI (`how_to_build`):** Translates natural language descriptions (e.g., `"a confirmation modal with a red delete button"`) directly into semantic Emmet abbreviations and full HTML.
12
+ - **Structured Validation (`validate`):** Audits HTML elements against Ignix-Lite specifications and returns exact, copy-pasteable corrections on validation errors.
13
+ - **WCAG 2.2 Accessibility Audit (`check_a11y`):** Evaluates elements offline for 15+ WCAG AA criteria and suggests precise fixes.
14
+ - **Generative Theming (`generate_theme`):** Automatically computes contrast-compliant light/dark mode CSS custom variables from a single brand color.
15
+ - **Headless Visual Preview (`preview`):** Generates high-quality PNG screenshots of rendered components on-the-fly.
16
+ - **Token Receipt System (`get_token_summary`):** Provides token consumption receipts for every tool call to track agent context budget.
17
+ - **Multi-Agent Handoff Protocol (`create_handoff` / `apply_handoff`):** Allows multiple agents to exchange, modify, and patch layouts using lightweight selector diffs.
18
+
19
+ ---
20
+
21
+ ## ๐Ÿ“ฆ Installation
22
+
23
+ ```bash
24
+ npm install -g @mindfiredigital/ignix-lite-cli
25
+ ```
26
+
27
+ > The MCP server is bundled with the CLI. You do **not** need to install the MCP package separately.
28
+
29
+ ---
30
+
31
+ ## โš™๏ธ Configuration โ€” Zero Manual Steps
32
+
33
+ Use the CLI to auto-configure your editor in one command:
34
+
35
+ ```bash
36
+ ignix-lite mcp setup claude # Claude Desktop
37
+ ignix-lite mcp setup claude-code # Claude Code CLI
38
+ ignix-lite mcp setup gemini # Gemini CLI
39
+ ignix-lite mcp setup cursor # Cursor editor
40
+ ```
41
+
42
+ The CLI writes directly to your editor's config file. After running:
43
+
44
+ | Client | Next Step |
45
+ | --------------------------- | ---------------------------------------------- |
46
+ | `claude` / `claude-desktop` | Restart Claude Desktop |
47
+ | `claude-code` | Open any project with `claude` |
48
+ | `gemini` | Start a new `gemini` session |
49
+ | `cursor` | Reload Cursor (`Ctrl+Shift+P` โ†’ Reload Window) |
50
+
51
+ **Or start the server manually** (for testing or custom integrations):
52
+
53
+ ```bash
54
+ ignix-lite mcp start
55
+ ```
56
+
57
+ ---
58
+
59
+ ## ๐Ÿ› ๏ธ Tool Catalogue
60
+
61
+ | Tool | Parameters | Description |
62
+ | ------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------ |
63
+ | `list_components` | _None_ | Lists all 27 available components (button, dialog, card, etc.). |
64
+ | `get_manifest` | `name: string` | Returns the full JSON specification, properties, slots, and do/don't rules for a component. |
65
+ | `get_emmet` | `name: string` | Returns the default Emmet shorthand pattern for a component. |
66
+ | `how_to_build` | `description: string` | Converts a plain English description into the best-fit Emmet and HTML output. |
67
+ | `validate` | `html: string` | Validates HTML structure against Ignix-Lite rules, returning structured errors with exact fixes. |
68
+ | `check_a11y` | `html: string` | Evaluates markup for accessibility and WCAG 2.2 AA compliance. |
69
+ | `generate_theme` | `prompt: string` | Generates a complete `:root` CSS custom property theme based on color keywords or hex values. |
70
+ | `preview` | `input: string, options?: object` | headlessly renders Emmet or HTML to a base64 PNG data URL. |
71
+ | `get_token_summary` | `context_window?: number` | Returns session stats showing total tokens used by the MCP server. |
72
+ | `create_handoff` | `rendered_html: string, metadata?: object` | Creates a state snapshot envelope for multi-agent layout exchange. |
73
+ | `apply_handoff` | `handoff_id: string, changes: array` | Patches an existing handoff snapshot with partial component changes. |
74
+
75
+ ---
76
+
77
+ ## ๐Ÿงช Local Development
78
+
79
+ Clone the main repository, install dependencies, and build the packages:
80
+
81
+ ```bash
82
+ # Clone the repository
83
+ git clone https://github.com/mindfiredigital/ignix-lite.git
84
+ cd ignix-lite
85
+
86
+ # Install dependencies and build all packages
87
+ pnpm install
88
+ pnpm build
89
+ ```
90
+
91
+ Run the server in development mode:
92
+
93
+ ```bash
94
+ cd packages/mcp
95
+ pnpm dev
96
+ ```
97
+
98
+ To test tools locally, you can use the MCP Inspector:
99
+
100
+ ```bash
101
+ npx @modelcontextprotocol/inspector node dist/server.js
102
+ ```
103
+
104
+ ---
105
+
106
+ ## ๐Ÿ“„ License
107
+
108
+ MIT License. Designed and maintained by **Mindfire Digital**.
package/dist/server.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- declare function startServer(): string;
2
1
 
3
- export { startServer };
2
+ export { }
package/dist/server.js CHANGED
@@ -1,2 +1,336 @@
1
- function r(){return"MCP server is running"}export{r as startServer};
1
+ #!/usr/bin/env node
2
+
3
+ // src/server.ts
4
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
5
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
6
+ import {
7
+ ListToolsRequestSchema,
8
+ CallToolRequestSchema
9
+ } from "@modelcontextprotocol/sdk/types.js";
10
+
11
+ // src/context/api-context.ts
12
+ import { readFileSync, existsSync } from "fs";
13
+ import path from "path";
14
+ import { fileURLToPath } from "url";
15
+ var __filename = fileURLToPath(import.meta.url);
16
+ var __dirname = path.dirname(__filename);
17
+ var apiPath = path.resolve(__dirname, "../../../api-full.txt");
18
+ if (!existsSync(apiPath)) {
19
+ apiPath = path.resolve(__dirname, "../../../../api-full.txt");
20
+ }
21
+ var apiContext = readFileSync(apiPath, "utf8");
22
+
23
+ // src/server.ts
24
+ import {
25
+ listComponents,
26
+ getManifest,
27
+ getEmmet,
28
+ validateHtml,
29
+ howToBuild,
30
+ generateTheme,
31
+ auditA11y,
32
+ preview,
33
+ getTokenSummary,
34
+ recordCall,
35
+ createHandoff,
36
+ applyHandoff
37
+ } from "@mindfiredigital/ignix-lite-engine";
38
+ var server = new Server(
39
+ {
40
+ name: "ignix-lite",
41
+ version: "2.0.0"
42
+ },
43
+ {
44
+ capabilities: {
45
+ tools: {}
46
+ }
47
+ }
48
+ );
49
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
50
+ tools: [
51
+ {
52
+ name: "list_components",
53
+ description: "List all ignix-lite components",
54
+ inputSchema: {
55
+ type: "object",
56
+ properties: {}
57
+ }
58
+ },
59
+ {
60
+ name: "get_manifest",
61
+ description: "Get component manifest",
62
+ inputSchema: {
63
+ type: "object",
64
+ properties: {
65
+ name: {
66
+ type: "string"
67
+ }
68
+ },
69
+ required: ["name"]
70
+ }
71
+ },
72
+ {
73
+ name: "get_emmet",
74
+ description: "Get emmet pattern",
75
+ inputSchema: {
76
+ type: "object",
77
+ properties: {
78
+ name: {
79
+ type: "string"
80
+ }
81
+ },
82
+ required: ["name"]
83
+ }
84
+ },
85
+ {
86
+ name: "validate",
87
+ description: "Validate ignix-lite html",
88
+ inputSchema: {
89
+ type: "object",
90
+ properties: {
91
+ html: {
92
+ type: "string"
93
+ }
94
+ },
95
+ required: ["html"]
96
+ }
97
+ },
98
+ {
99
+ name: "how_to_build",
100
+ description: "Convert plain english to ignix-lite UI",
101
+ inputSchema: {
102
+ type: "object",
103
+ properties: {
104
+ description: {
105
+ type: "string"
106
+ }
107
+ },
108
+ required: ["description"]
109
+ }
110
+ },
111
+ {
112
+ name: "generate_theme",
113
+ description: "Generate ignix theme tokens",
114
+ inputSchema: {
115
+ type: "object",
116
+ properties: {
117
+ prompt: {
118
+ type: "string"
119
+ }
120
+ },
121
+ required: ["prompt"]
122
+ }
123
+ },
124
+ {
125
+ name: "check_a11y",
126
+ description: "Check accessibility",
127
+ inputSchema: {
128
+ type: "object",
129
+ properties: {
130
+ html: {
131
+ type: "string"
132
+ }
133
+ },
134
+ required: ["html"]
135
+ }
136
+ },
137
+ {
138
+ name: "preview",
139
+ description: "Render visual preview to PNG",
140
+ inputSchema: {
141
+ type: "object",
142
+ properties: {
143
+ input: {
144
+ type: "string"
145
+ },
146
+ options: {
147
+ type: "object",
148
+ properties: {
149
+ width: {
150
+ type: "number"
151
+ },
152
+ theme: {
153
+ type: "string"
154
+ },
155
+ scale: {
156
+ type: "number"
157
+ }
158
+ }
159
+ }
160
+ },
161
+ required: ["input"]
162
+ }
163
+ },
164
+ {
165
+ name: "get_token_summary",
166
+ description: "Get session token summary and budget details",
167
+ inputSchema: {
168
+ type: "object",
169
+ properties: {
170
+ context_window: {
171
+ type: "number",
172
+ description: "Optional model context window size"
173
+ }
174
+ }
175
+ }
176
+ },
177
+ {
178
+ name: "create_handoff",
179
+ description: "Create multi-agent handoff snapshot",
180
+ inputSchema: {
181
+ type: "object",
182
+ properties: {
183
+ rendered_html: {
184
+ type: "string"
185
+ },
186
+ metadata: {
187
+ type: "object"
188
+ }
189
+ },
190
+ required: ["rendered_html"]
191
+ }
192
+ },
193
+ {
194
+ name: "apply_handoff",
195
+ description: "Apply changes to an existing handoff snapshot",
196
+ inputSchema: {
197
+ type: "object",
198
+ properties: {
199
+ handoff_id: {
200
+ type: "string"
201
+ },
202
+ changes: {
203
+ type: "array",
204
+ items: {
205
+ type: "object",
206
+ properties: {
207
+ selector: {
208
+ type: "string"
209
+ },
210
+ action: {
211
+ type: "string",
212
+ enum: ["update", "add", "remove"]
213
+ },
214
+ emmet: {
215
+ type: "string"
216
+ },
217
+ html: {
218
+ type: "string"
219
+ }
220
+ },
221
+ required: ["selector", "action"]
222
+ }
223
+ }
224
+ },
225
+ required: ["handoff_id", "changes"]
226
+ }
227
+ }
228
+ ]
229
+ }));
230
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
231
+ const { name, arguments: args } = request.params;
232
+ console.error("TOOL CALLED:", name);
233
+ let response;
234
+ switch (name) {
235
+ case "list_components":
236
+ response = listComponents();
237
+ break;
238
+ case "get_manifest":
239
+ response = getManifest(args);
240
+ break;
241
+ case "get_emmet":
242
+ response = getEmmet(args);
243
+ break;
244
+ case "validate": {
245
+ const validateArgs = args;
246
+ const result = validateHtml(validateArgs.html ?? "");
247
+ response = {
248
+ content: [
249
+ {
250
+ type: "text",
251
+ text: JSON.stringify({
252
+ ...result,
253
+ tokens_used: 50
254
+ })
255
+ }
256
+ ]
257
+ };
258
+ break;
259
+ }
260
+ case "how_to_build": {
261
+ const intentArgs = args;
262
+ response = await howToBuild(intentArgs.description ?? "");
263
+ break;
264
+ }
265
+ case "generate_theme":
266
+ response = generateTheme(args);
267
+ break;
268
+ case "check_a11y": {
269
+ const a11yArgs = args;
270
+ const result = auditA11y(a11yArgs.html ?? "");
271
+ response = {
272
+ content: [
273
+ {
274
+ type: "text",
275
+ text: JSON.stringify({
276
+ ...result,
277
+ tokens_used: Math.min(60, 20 + result.issues.length * 3)
278
+ })
279
+ }
280
+ ]
281
+ };
282
+ break;
283
+ }
284
+ case "preview": {
285
+ const previewArgs = args;
286
+ response = await preview(previewArgs);
287
+ break;
288
+ }
289
+ case "get_token_summary": {
290
+ const tokenArgs = args;
291
+ response = getTokenSummary(tokenArgs);
292
+ break;
293
+ }
294
+ case "create_handoff": {
295
+ const handoffArgs = args;
296
+ response = createHandoff(handoffArgs);
297
+ break;
298
+ }
299
+ case "apply_handoff": {
300
+ const applyArgs = args;
301
+ response = applyHandoff(applyArgs);
302
+ break;
303
+ }
304
+ default:
305
+ response = {
306
+ content: [
307
+ {
308
+ type: "text",
309
+ text: JSON.stringify({
310
+ error: `Unknown tool: ${name}`
311
+ })
312
+ }
313
+ ]
314
+ };
315
+ break;
316
+ }
317
+ if (response && response.content && response.content[0] && response.content[0].text) {
318
+ try {
319
+ const parsed = JSON.parse(response.content[0].text);
320
+ if (parsed && typeof parsed.tokens_used === "number") {
321
+ recordCall(name, parsed.tokens_used);
322
+ }
323
+ } catch {
324
+ }
325
+ }
326
+ return response;
327
+ });
328
+ async function start() {
329
+ console.error("API loaded");
330
+ console.error(apiContext.length);
331
+ const transport = new StdioServerTransport();
332
+ await server.connect(transport);
333
+ console.error("Ignix MCP started");
334
+ }
335
+ start();
2
336
  //# sourceMappingURL=server.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/server.ts"],"sourcesContent":["export function startServer() {\n return 'MCP server is running'\n}\n"],"mappings":"AAAO,SAASA,GAAc,CAC5B,MAAO,uBACT","names":["startServer"]}
1
+ {"version":3,"sources":["../src/server.ts","../src/context/api-context.ts"],"sourcesContent":["import { Server } from '@modelcontextprotocol/sdk/server/index.js'\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'\nimport {\n ListToolsRequestSchema,\n CallToolRequestSchema\n} from '@modelcontextprotocol/sdk/types.js'\n\nimport type { MCPResponse } from './types.js'\nimport { apiContext } from './context/api-context.js'\nimport {\n listComponents,\n getManifest,\n getEmmet,\n validateHtml,\n howToBuild,\n generateTheme,\n auditA11y,\n preview,\n getTokenSummary,\n recordCall,\n createHandoff,\n applyHandoff\n} from '@mindfiredigital/ignix-lite-engine'\n\ntype ValidateArgs = {\n html?: string\n}\n\ntype IntentArgs = {\n description?: string\n}\n\ntype A11yArgs = {\n html?: string\n}\n\ntype PreviewArgs = {\n input: string\n options?: {\n width?: number\n theme?: string\n scale?: number\n }\n}\n\ntype CreateHandoffArgs = {\n rendered_html: string\n metadata?: Record<string, unknown>\n}\n\ntype ApplyHandoffArgs = {\n handoff_id: string\n changes: Array<{\n selector: string\n action: 'update' | 'add' | 'remove'\n emmet?: string\n html?: string\n }>\n}\n\nconst server = new Server(\n {\n name: 'ignix-lite',\n version: '2.0.0'\n },\n {\n capabilities: {\n tools: {}\n }\n }\n)\n\nserver.setRequestHandler(ListToolsRequestSchema, async () => ({\n tools: [\n {\n name: 'list_components',\n description: 'List all ignix-lite components',\n inputSchema: {\n type: 'object',\n properties: {}\n }\n },\n {\n name: 'get_manifest',\n description: 'Get component manifest',\n inputSchema: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n }\n },\n required: ['name']\n }\n },\n {\n name: 'get_emmet',\n description: 'Get emmet pattern',\n inputSchema: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n }\n },\n required: ['name']\n }\n },\n {\n name: 'validate',\n description: 'Validate ignix-lite html',\n inputSchema: {\n type: 'object',\n properties: {\n html: {\n type: 'string'\n }\n },\n required: ['html']\n }\n },\n {\n name: 'how_to_build',\n description: 'Convert plain english to ignix-lite UI',\n inputSchema: {\n type: 'object',\n properties: {\n description: {\n type: 'string'\n }\n },\n required: ['description']\n }\n },\n {\n name: 'generate_theme',\n description: 'Generate ignix theme tokens',\n inputSchema: {\n type: 'object',\n properties: {\n prompt: {\n type: 'string'\n }\n },\n required: ['prompt']\n }\n },\n {\n name: 'check_a11y',\n description: 'Check accessibility',\n inputSchema: {\n type: 'object',\n properties: {\n html: {\n type: 'string'\n }\n },\n required: ['html']\n }\n },\n {\n name: 'preview',\n description: 'Render visual preview to PNG',\n inputSchema: {\n type: 'object',\n properties: {\n input: {\n type: 'string'\n },\n options: {\n type: 'object',\n properties: {\n width: {\n type: 'number'\n },\n theme: {\n type: 'string'\n },\n scale: {\n type: 'number'\n }\n }\n }\n },\n required: ['input']\n }\n },\n {\n name: 'get_token_summary',\n description: 'Get session token summary and budget details',\n inputSchema: {\n type: 'object',\n properties: {\n context_window: {\n type: 'number',\n description: 'Optional model context window size'\n }\n }\n }\n },\n {\n name: 'create_handoff',\n description: 'Create multi-agent handoff snapshot',\n inputSchema: {\n type: 'object',\n properties: {\n rendered_html: {\n type: 'string'\n },\n metadata: {\n type: 'object'\n }\n },\n required: ['rendered_html']\n }\n },\n {\n name: 'apply_handoff',\n description: 'Apply changes to an existing handoff snapshot',\n inputSchema: {\n type: 'object',\n properties: {\n handoff_id: {\n type: 'string'\n },\n changes: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n selector: {\n type: 'string'\n },\n action: {\n type: 'string',\n enum: ['update', 'add', 'remove']\n },\n emmet: {\n type: 'string'\n },\n html: {\n type: 'string'\n }\n },\n required: ['selector', 'action']\n }\n }\n },\n required: ['handoff_id', 'changes']\n }\n }\n ]\n}))\n\nserver.setRequestHandler(CallToolRequestSchema, async (request) => {\n const { name, arguments: args } = request.params\n console.error('TOOL CALLED:', name)\n let response: MCPResponse\n\n switch (name) {\n case 'list_components':\n response = listComponents()\n break\n\n case 'get_manifest':\n response = getManifest(args)\n break\n\n case 'get_emmet':\n response = getEmmet(args)\n break\n\n case 'validate': {\n const validateArgs = args as ValidateArgs\n const result = validateHtml(validateArgs.html ?? '')\n response = {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n ...result,\n tokens_used: 50\n })\n }\n ]\n }\n break\n }\n\n case 'how_to_build': {\n const intentArgs = args as IntentArgs\n response = await howToBuild(intentArgs.description ?? '')\n break\n }\n\n case 'generate_theme':\n response = generateTheme(args)\n break\n\n case 'check_a11y': {\n const a11yArgs = args as A11yArgs\n const result = auditA11y(a11yArgs.html ?? '')\n response = {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n ...result,\n tokens_used: Math.min(60, 20 + result.issues.length * 3)\n })\n }\n ]\n }\n break\n }\n\n case 'preview': {\n const previewArgs = args as PreviewArgs\n response = await preview(previewArgs)\n break\n }\n\n case 'get_token_summary': {\n const tokenArgs = args as { context_window?: number }\n response = getTokenSummary(tokenArgs)\n break\n }\n\n case 'create_handoff': {\n const handoffArgs = args as CreateHandoffArgs\n response = createHandoff(handoffArgs)\n break\n }\n\n case 'apply_handoff': {\n const applyArgs = args as ApplyHandoffArgs\n response = applyHandoff(applyArgs)\n break\n }\n\n default:\n response = {\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n error: `Unknown tool: ${name}`\n })\n }\n ]\n }\n break\n }\n\n // Intercept and record tokens_used if present in the response\n if (\n response &&\n response.content &&\n response.content[0] &&\n response.content[0].text\n ) {\n try {\n const parsed = JSON.parse(response.content[0].text)\n if (parsed && typeof parsed.tokens_used === 'number') {\n recordCall(name, parsed.tokens_used)\n }\n } catch {\n // Ignore if response text is not valid JSON\n }\n }\n\n return response\n})\n\nasync function start() {\n console.error('API loaded')\n console.error(apiContext.length)\n const transport = new StdioServerTransport()\n await server.connect(transport)\n console.error('Ignix MCP started')\n}\n\nstart()\n","import { readFileSync, existsSync } from 'fs'\nimport path from 'path'\nimport { fileURLToPath } from 'url'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = path.dirname(__filename)\n\n// Dynamically handle both bundled dist/ and source src/context/ contexts\nlet apiPath = path.resolve(__dirname, '../../../api-full.txt')\nif (!existsSync(apiPath)) {\n apiPath = path.resolve(__dirname, '../../../../api-full.txt')\n}\n\nexport const apiContext = readFileSync(apiPath, 'utf8')\n"],"mappings":";;;AAAA,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,cAAc,kBAAkB;AACzC,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAE9B,IAAM,aAAa,cAAc,YAAY,GAAG;AAChD,IAAM,YAAY,KAAK,QAAQ,UAAU;AAGzC,IAAI,UAAU,KAAK,QAAQ,WAAW,uBAAuB;AAC7D,IAAI,CAAC,WAAW,OAAO,GAAG;AACxB,YAAU,KAAK,QAAQ,WAAW,0BAA0B;AAC9D;AAEO,IAAM,aAAa,aAAa,SAAS,MAAM;;;ADJtD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAsCP,IAAM,SAAS,IAAI;AAAA,EACjB;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,cAAc;AAAA,MACZ,OAAO,CAAC;AAAA,IACV;AAAA,EACF;AACF;AAEA,OAAO,kBAAkB,wBAAwB,aAAa;AAAA,EAC5D,OAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,aAAa;AAAA,MACb,aAAa;AAAA,QACX,MAAM;AAAA,QACN,YAAY,CAAC;AAAA,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5
+ import { encoding_for_model } from "tiktoken";
6
+ import path from "path";
7
+ var encoder = encoding_for_model("gpt-4");
8
+ var files = ["../../api-full.txt"];
9
+ for (const file of files) {
10
+ const text = readFileSync(path.resolve(file), "utf-8");
11
+ console.log(file, "=", encoder.encode(text).length, "tokens");
12
+ }
13
+ //# sourceMappingURL=check-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/check-api.ts"],"sourcesContent":["import { readFileSync } from 'fs'\nimport { encoding_for_model } from 'tiktoken'\nimport path from 'path'\n\nconst encoder = encoding_for_model('gpt-4')\n\nconst files = ['../../api-full.txt']\n\nfor (const file of files) {\n const text = readFileSync(path.resolve(file), 'utf-8')\n\n console.log(file, '=', encoder.encode(text).length, 'tokens')\n}\n"],"mappings":";;;AAAA,SAAS,oBAAoB;AAC7B,SAAS,0BAA0B;AACnC,OAAO,UAAU;AAEjB,IAAM,UAAU,mBAAmB,OAAO;AAE1C,IAAM,QAAQ,CAAC,oBAAoB;AAEnC,WAAW,QAAQ,OAAO;AACxB,QAAM,OAAO,aAAa,KAAK,QAAQ,IAAI,GAAG,OAAO;AAErD,UAAQ,IAAI,MAAM,KAAK,QAAQ,OAAO,IAAI,EAAE,QAAQ,QAAQ;AAC9D;","names":[]}
package/package.json CHANGED
@@ -1,24 +1,46 @@
1
1
  {
2
2
  "name": "@mindfiredigital/ignix-lite-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "type": "module",
6
- "main": "index.js",
6
+ "main": "./dist/server.js",
7
+ "bin": {
8
+ "ignix-lite-mcp": "./dist/server.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "README.md"
13
+ ],
14
+ "scripts": {
15
+ "test": "vitest run",
16
+ "dev": "tsup src/server.ts --watch --format esm --no-clean",
17
+ "lint": "eslint .",
18
+ "format": "prettier --write .",
19
+ "build": "tsup"
20
+ },
7
21
  "keywords": [],
8
22
  "author": "",
9
23
  "license": "ISC",
24
+ "publishConfig": {
25
+ "registry": "https://registry.npmjs.org",
26
+ "access": "public"
27
+ },
10
28
  "devDependencies": {
11
- "tsup": "^8.5.1",
12
- "vitest": "^4.1.4",
29
+ "@types/node": "^25.6.0",
30
+ "copyfiles": "^2.4.1",
13
31
  "eslint": "^10.2.0",
14
32
  "prettier": "^3.8.3",
15
- "typescript": "^5.4.5"
33
+ "tiktoken": "^1.0.22",
34
+ "tsup": "^8.5.1",
35
+ "typescript": "^5.4.5",
36
+ "vitest": "^4.1.4"
16
37
  },
17
- "scripts": {
18
- "test": "vitest run",
19
- "dev": "tsup src/server.ts --watch",
20
- "lint": "eslint .",
21
- "format": "prettier --write .",
22
- "build": "tsup"
38
+ "dependencies": {
39
+ "@mindfiredigital/ignix-lite-engine": "workspace:*",
40
+ "@modelcontextprotocol/sdk": "^1.29.0",
41
+ "emmet": "^2.4.11",
42
+ "node-html-parser": "^7.1.0",
43
+ "playwright": "^1.60.0",
44
+ "zod": "^4.4.3"
23
45
  }
24
46
  }
@@ -1,22 +0,0 @@
1
-
2
- > @mindfiredigital/ignix-lite-mcp@1.0.0 build /home/runner/work/ignix-lite/ignix-lite/packages/mcp
3
- > tsup
4
-
5
- CLI Building entry: src/server.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.5.1
8
- CLI Using tsup config: /home/runner/work/ignix-lite/ignix-lite/packages/mcp/tsup.config.ts
9
- CLI Target: esnext
10
- CLI Cleaning output folder
11
- ESM Build start
12
- CJS Build start
13
- ESM dist/server.js 103.00 B
14
- ESM dist/server.js.map 206.00 B
15
- ESM โšก๏ธ Build success in 26ms
16
- CJS dist/server.cjs 592.00 B
17
- CJS dist/server.cjs.map 307.00 B
18
- CJS โšก๏ธ Build success in 24ms
19
- DTS Build start
20
- DTS โšก๏ธ Build success in 2127ms
21
- DTS dist/server.d.ts 65.00 B
22
- DTS dist/server.d.cts 65.00 B
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 mindfire-test
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/dist/server.cjs DELETED
@@ -1,2 +0,0 @@
1
- "use strict";var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var a=(e,r)=>{for(var t in r)i(e,t,{get:r[t],enumerable:!0})},c=(e,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of o(r))!v.call(e,n)&&n!==t&&i(e,n,{get:()=>r[n],enumerable:!(s=u(r,n))||s.enumerable});return e};var f=e=>c(i({},"__esModule",{value:!0}),e);var p={};a(p,{startServer:()=>g});module.exports=f(p);function g(){return"MCP server is running"}0&&(module.exports={startServer});
2
- //# sourceMappingURL=server.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/server.ts"],"sourcesContent":["export function startServer() {\n return 'MCP server is running'\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAAO,SAASE,GAAc,CAC5B,MAAO,uBACT","names":["server_exports","__export","startServer","__toCommonJS"]}
package/dist/server.d.cts DELETED
@@ -1,3 +0,0 @@
1
- declare function startServer(): string;
2
-
3
- export { startServer };
package/src/server.ts DELETED
@@ -1,3 +0,0 @@
1
- export function startServer() {
2
- return 'MCP server is running'
3
- }
@@ -1,8 +0,0 @@
1
- import { describe, it, expect } from 'vitest'
2
- import { startServer } from '../src/server'
3
-
4
- describe('MCP build test', () => {
5
- it('should return correct message', () => {
6
- expect(startServer()).toBe('MCP server is running')
7
- })
8
- })
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "./dist"
5
- },
6
- "include": ["src"]
7
- }
package/tsup.config.ts DELETED
@@ -1,10 +0,0 @@
1
- import { defineConfig } from 'tsup'
2
-
3
- export default defineConfig({
4
- entry: ['src/server.ts'],
5
- format: ['esm', 'cjs'],
6
- dts: true,
7
- clean: true,
8
- sourcemap: true,
9
- minify: true
10
- })