@syke1/mcp-server 1.1.4 → 1.1.6

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
@@ -46,6 +46,24 @@ Works with **Claude Code**, **Cursor**, **Windsurf**, and any MCP-compatible AI
46
46
  }
47
47
  ```
48
48
 
49
+ **Windsurf** (`~/.codeium/windsurf/mcp_config.json`):
50
+
51
+ ```json
52
+ {
53
+ "mcpServers": {
54
+ "syke": {
55
+ "command": "npx",
56
+ "args": ["@syke1/mcp-server@latest"],
57
+ "env": {
58
+ "SYKE_LICENSE_KEY": "your-key-here"
59
+ }
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ > **Windows note:** If `npx` is not found, use the full path: `"command": "C:\\Program Files\\nodejs\\npx.cmd"`
66
+
49
67
  ### 2. Restart your AI agent
50
68
 
51
69
  SYKE auto-detects your project language and builds the dependency graph on startup.
package/dist/index.js CHANGED
@@ -34,8 +34,12 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  };
35
35
  })();
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
+ // Silence dotenv stdout output (v17+ writes to stdout, corrupting MCP stdio protocol)
38
+ const origStdoutWrite = process.stdout.write.bind(process.stdout);
39
+ process.stdout.write = (() => true);
37
40
  const dotenv = __importStar(require("dotenv"));
38
41
  dotenv.config();
42
+ process.stdout.write = origStdoutWrite;
39
43
  const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
40
44
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
41
45
  const child_process_1 = require("child_process");
@@ -1150,6 +1150,11 @@ async function detectCycles() {
1150
1150
 
1151
1151
  try {
1152
1152
  const res = await fetch("/api/cycles");
1153
+ if (!res.ok) {
1154
+ const err = await res.json().catch(() => ({}));
1155
+ document.getElementById("cycles-content").innerHTML = `<div class="no-cycles" style="color:#667">${err.error || "Cycle detection requires Pro."} <a href="${err.upgrade || 'https://syke.cloud/dashboard/'}" target="_blank" style="color:#00d4ff">Upgrade</a></div>`;
1156
+ return;
1157
+ }
1153
1158
  const data = await res.json();
1154
1159
 
1155
1160
  if (data.count === 0) {
@@ -1304,7 +1309,14 @@ function toggleAutoRotate() {
1304
1309
  // ═══════════════════════════════════════════
1305
1310
  async function loadHubFiles() {
1306
1311
  try {
1307
- const r = await fetch("/api/hub-files?top=15"); const d = await r.json();
1312
+ const r = await fetch("/api/hub-files?top=15");
1313
+ if (!r.ok) {
1314
+ const err = await r.json().catch(() => ({}));
1315
+ const c = document.getElementById("hub-content");
1316
+ if (c) c.innerHTML = `<div class="placeholder" style="padding:12px;font-size:11px;color:var(--text-muted,#667)">${err.error || "Hub files require Pro."} <a href="${err.upgrade || 'https://syke.cloud/dashboard/'}" target="_blank" style="color:#00d4ff">Upgrade</a></div>`;
1317
+ return;
1318
+ }
1319
+ const d = await r.json();
1308
1320
  const c = document.getElementById("hub-content"); let h = "";
1309
1321
  d.hubs.forEach((hub,i) => {
1310
1322
  h += `<div class="hub-item" data-file="${hub.relativePath}">
@@ -1883,11 +1895,24 @@ window.syke = {
1883
1895
  // ═══════════════════════════════════════════
1884
1896
  let sseSource = null;
1885
1897
  let sseReconnectTimer = null;
1898
+ let sseBlocked = false;
1886
1899
  const realtimeLog = []; // recent events for panel
1887
1900
 
1888
- function initSSE() {
1901
+ async function initSSE() {
1889
1902
  if (sseSource) { sseSource.close(); sseSource = null; }
1890
1903
 
1904
+ // Pre-check: if Free tier, SSE will 403 — don't attempt connection
1905
+ try {
1906
+ const probe = await fetch("/api/events");
1907
+ if (probe.status === 403) {
1908
+ updateSSEStatus("PRO ONLY", "offline");
1909
+ sseBlocked = true;
1910
+ return;
1911
+ }
1912
+ // Close the successful probe connection (we'll open EventSource next)
1913
+ if (probe.body) probe.body.cancel().catch(() => {});
1914
+ } catch(e) { /* network error, try SSE anyway */ }
1915
+
1891
1916
  sseSource = new EventSource("/api/events");
1892
1917
 
1893
1918
  sseSource.addEventListener("connected", (e) => {
@@ -2065,10 +2090,11 @@ function initSSE() {
2065
2090
  });
2066
2091
 
2067
2092
  sseSource.onerror = () => {
2068
- console.warn("[SYKE:SSE] Connection error, reconnecting...");
2093
+ console.warn("[SYKE:SSE] Connection error");
2069
2094
  updateSSEStatus("OFFLINE", "offline");
2070
2095
  sseSource.close();
2071
2096
  sseSource = null;
2097
+ if (sseBlocked) return; // Don't reconnect if Pro-only block
2072
2098
  if (sseReconnectTimer) clearTimeout(sseReconnectTimer);
2073
2099
  sseReconnectTimer = setTimeout(initSSE, 3000);
2074
2100
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syke1/mcp-server",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "AI code impact analysis MCP server — dependency graphs, cascade detection, and a mandatory build gate for AI coding agents",
5
5
  "main": "dist/index.js",
6
6
  "bin": {