@nyx-intelligence/val-mcp 0.2.0 → 0.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/dist/index.js +17 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46,11 +46,27 @@ async function runCli(args) {
|
|
|
46
46
|
}
|
|
47
47
|
// ───────────────────────── MCP server ─────────────────────────
|
|
48
48
|
async function runServer() {
|
|
49
|
+
// License gate — no active subscription, no tools.
|
|
50
|
+
const apiBase = process.env.VAL_API_BASE || "https://val.nyx-intelligence.com";
|
|
51
|
+
try {
|
|
52
|
+
const res = await fetch(`${apiBase}/api/license/validate`, {
|
|
53
|
+
headers: { Authorization: `Bearer ${process.env.VAL_LICENSE_KEY || ""}` },
|
|
54
|
+
});
|
|
55
|
+
const lic = (await res.json());
|
|
56
|
+
if (!lic.valid) {
|
|
57
|
+
console.error("Val: no active subscription for this VAL_LICENSE_KEY. Subscribe at https://val.nyx-intelligence.com");
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
console.error("Val: could not verify your license (check VAL_LICENSE_KEY and connectivity).");
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
49
65
|
const { McpServer } = await import("@modelcontextprotocol/sdk/server/mcp.js");
|
|
50
66
|
const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
|
|
51
67
|
const { chromium } = await import("playwright");
|
|
52
68
|
const { z } = await import("zod");
|
|
53
|
-
const server = new McpServer({ name: "val", version: "0.
|
|
69
|
+
const server = new McpServer({ name: "val", version: "0.3.0" });
|
|
54
70
|
const text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
55
71
|
// ── Passive crawl ──
|
|
56
72
|
server.registerTool("val_scan", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyx-intelligence/val-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Val — a 100% MCP QA agent for vibecoders. Drives a real browser to catch UX bugs (broken links, 404s, console errors, broken images) so your coding agent can fix them.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|