{
  "markdown": "# SYKE — Your Codebase Has a Pulse\n\n**AI code impact analysis MCP server.** SYKE monitors every file your AI touches, maps dependency graphs, detects cascading breakage, and gates builds before damage spreads.\n\nWorks with **Claude Code**, **Cursor**, **Windsurf**, and any MCP-compatible AI coding agent.\n\n![SYKE Dependency Graph](https://syke.cloud/images/graph-overview.png)\n\n![SYKE Impact Analysis](https://syke.cloud/images/impact-analysis.png)\n\n![SYKE Node Detail](https://syke.cloud/images/node-detail.png)\n\n## How It Works\n\n1. **On startup**, SYKE scans your source directory and builds a complete dependency graph using static import analysis.\n2. **Your AI agent modifies files freely** — no interruptions during normal work.\n3. **Before build/deploy**, the AI calls `gate_build` to check if all changes are safe.\n4. **If dependencies break**, SYKE detects cascading failures and blocks the build with a `FAIL` verdict.\n5. **The dashboard** shows a real-time visualization of your dependency graph with risk indicators.\n\n> **SYKE is a safety net, not a gatekeeper.** It doesn't block your AI while working — it catches what your AI missed before you ship.\n\n## Quick Start\n\n### 1. Create config file\n\nCreate `~/.syke/config.json`:\n\n```json\n{\n  \"licenseKey\": \"SYKE-XXXX-XXXX-XXXX-XXXX\",\n  \"geminiKey\": \"your-gemini-api-key\"\n}\n```\n\n> Get your license key at [syke.cloud/dashboard](https://syke.cloud/dashboard/). You only need ONE AI key. Supported: `geminiKey`, `openaiKey`, `anthropicKey`.\n\n### 2. Register MCP server\n\n**Claude Code:**\n\n```bash\nclaude mcp add syke -- npx @syke1/mcp-server@latest\n```\n\n**Cursor** (`.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"syke\": {\n      \"command\": \"npx\",\n      \"args\": [\"@syke1/mcp-server@latest\"]\n    }\n  }\n}\n```\n\n**Windsurf** (`~/.codeium/windsurf/mcp_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"syke\": {\n      \"command\": \"npx\",\n      \"args\": [\"@syke1/mcp-server@latest\"]\n    }\n  }\n}\n```\n\n> **Windows note:** If `npx` is not found, use the full path: `\"command\": \"C:\\\\Program Files\\\\nodejs\\\\npx.cmd\"`\n\n### 3. Add build gate to your project\n\nAdd this line to your project's `CLAUDE.md` (or equivalent AI instruction file):\n\n```\nAfter completing code changes, always run the gate_build MCP tool before committing or deploying.\n```\n\nThis ensures your AI agent automatically runs SYKE's safety check after every task — no manual prompting needed.\n\n### 4. Restart your AI agent\n\nSYKE auto-detects your project language and builds the dependency graph on startup. Open `http://localhost:3333` to see your live dashboard.\n\n## Features\n\n### 8 MCP Tools\n\n| Tool | Tier | Description |\n|------|------|-------------|\n| `gate_build` | Free | **Mandatory pre-build check.** Returns PASS/WARN/FAIL verdict before any build or deploy. |\n| `check_safe` | Free | Quick one-line safety verdict: HIGH/MEDIUM/LOW/NONE risk. |\n| `get_dependencies` | Free | Lists internal imports (forward dependencies) of a file. |\n| `analyze_impact` | **Pro** | Full impact analysis with SCC, risk scoring, and git coupling. |\n| `get_hub_files` | **Pro** | Ranks files by PageRank importance score. |\n| `refresh_graph` | **Pro** | Re-scans all source files and rebuilds the dependency graph. |\n| `ai_analyze` | **Pro** | AI semantic analysis (Gemini/OpenAI/Claude) of a file and its dependents. |\n| `check_warnings` | **Pro** | Real-time monitoring alerts for file changes that may break dependents. |\n\n### Multi-AI Provider Support\n\nSYKE supports three AI providers for semantic analysis. Bring your own key:\n\n| Provider | Model | Config Key | Env Variable |\n|----------|-------|-----------|-------------|\n| Google Gemini | `gemini-2.5-flash` | `geminiKey` | `GEMINI_KEY` |\n| OpenAI | `gpt-4o-mini` | `openaiKey` | `OPENAI_KEY` |\n| Anthropic | `claude-sonnet-4-20250514` | `anthropicKey` | `ANTHROPIC_KEY` |\n\n**Auto-selection:** SYKE uses the first available key (Gemini > OpenAI > Anthropic).\n**Force provider:** Set `aiProvider` in config (or `SYKE_AI_PROVIDER` env var) to override.\n\n### Advanced Graph Algorithms\n\nSYKE goes beyond simple dependency counting. Five production-grade algorithms work together to deliver precise, fast, and context-rich impact analysis — all running **locally with zero AI token cost**.\n\n#### 1. SCC Condensation + Topological Sort\n\nCircular dependencies are the #1 source of misleading impact analysis. SYKE uses **Tarjan's algorithm** to detect all Strongly Connected Components, condenses them into a clean DAG, then runs topological sort to compute correct cascade levels.\n\n```\nBefore: \"47 files affected\" (inflated by cycles)\nAfter:  \"3 files in circular cluster (Level 0) → 5 files (Level 1) → 4 files (Level 2)\"\n```\n\n- O(V+E) computation — runs in single-digit milliseconds\n- Every SCC with size > 1 is flagged as a circular dependency cluster\n- Cascade levels are accurate even in heavily cyclic codebases\n\n#### 2. Composite Risk Scoring\n\nFive signals combined into a single 0–1 risk score:\n\n| Signal | Weight | What it measures |\n|--------|--------|-----------------|\n| **Fan-in** | 30% | How many files depend on this one |\n| **Stability Index** | 20% | I = Ce/(Ca+Ce) — lower = foundation file = riskier to change |\n| **Cyclomatic Complexity** | 20% | Internal branching complexity (regex-based, 8 languages) |\n| **Cascade Depth** | 15% | How many layers deep the impact propagates |\n| **PageRank** | 15% | Recursive importance in the dependency graph |\n\n```\nauth_service.ts → Risk: 0.82 (CRITICAL)\n  Fan-in: 24, Stability: 0.12, Complexity: 47, Cascade: 4 levels, PageRank: 99th\n\nstring_utils.ts → Risk: 0.31 (LOW)\n  Fan-in: 18, Stability: 0.85, Complexity: 3, Cascade: 1 level, PageRank: 42nd\n```\n\nAI agents can now make threshold decisions: proceed if < 0.3, warn if 0.3–0.7, block if > 0.7.\n\n#### 3. Historical Change Coupling\n\nStatic imports miss **hidden dependencies** — files that always change together but have no import relationship. SYKE mines your git history (last 500 commits) to find these logical couplings.\n\n```\nauth_service.ts changed →\n  [Dependency Graph] auth_provider.ts, login_screen.ts\n  [Git Coupling — Hidden Dependencies]\n    config/auth_config.json (85% confidence, 12 co-changes)\n    styles/auth.css (72% confidence, 8 co-changes)\n```\n\n- Catches 15–30% of impacted files that static analysis misses entirely\n- Filters mega-commits (>20 files) to avoid noise\n- 5-minute cache with auto-refresh\n\n#### 4. PageRank for File Importance\n\nSimple fan-in counts treat all dependents equally. **PageRank** computes recursive importance — a file imported by many *important* files ranks higher than one imported by many leaf files.\n\n```\nBefore: utils.ts ranked #1 (25 dependents — but all are leaf components)\nAfter:  auth.ts ranked #1 (20 dependents — 15 of which are core modules)\n```\n\n- Standard Power Iteration with damping factor 0.85\n- Precomputed at startup, incrementally updated on file changes\n- Every file gets a rank position and percentile (e.g., \"rank #3 of 245, 99th percentile\")\n\n#### 5. Incremental Graph Updates + Memoized Queries\n\nFor large codebases (10K+ files), full graph rebuilds are too slow. SYKE now updates **only the changed file's edges** and invalidates **only the affected cache entries**.\n\n```\nBefore: 1 file changed → re-parse all 500 files → 2+ seconds\nAfter:  1 file changed → re-parse 1 file → edge diff → 50ms\n        Same file queried again → cache hit → O(1) instant\n```\n\n- Reverse index enables O(affected) cache invalidation instead of O(cache_size)\n- SCC and PageRank recompute after edge changes (still < 100ms for 10K files)\n- 500-entry LRU cache with hit/miss diagnostics\n\n### Language Support\n\nAuto-detected, zero-config: **Dart/Flutter**, **TypeScript/JavaScript**, **Python**, **Go**, **Rust**, **Java**, **C++**, **Ruby**.\n\n### Web Dashboard\n\nLive dependency graph visualization at `localhost:3333` with:\n- Interactive 3D node graph (click any file to see its connections)\n- Real-time cascade monitoring\n- Risk level indicators\n- Server offline detection with auto-reconnect\n\n## Configuration\n\nSYKE reads from `~/.syke/config.json` (primary) with environment variable overrides:\n\n| Config Key | Env Variable | Description | Required |\n|-----------|-------------|-------------|----------|\n| `licenseKey` | `SYKE_LICENSE_KEY` | Pro license key from dashboard | No (Free tier works without) |\n| `geminiKey` | `GEMINI_KEY` | Google Gemini API key for `ai_analyze` | No (any one AI key) |\n| `openaiKey` | `OPENAI_KEY` | OpenAI API key for `ai_analyze` | No (any one AI key) |\n| `anthropicKey` | `ANTHROPIC_KEY` | Anthropic API key for `ai_analyze` | No (any one AI key) |\n| `aiProvider` | `SYKE_AI_PROVIDER` | Force AI provider: `gemini`, `openai`, or `anthropic` | No (auto-selects) |\n| `port` | `SYKE_WEB_PORT` | Dashboard port (default: 3333) | No |\n\n**Full config example** (`~/.syke/config.json`):\n\n```json\n{\n  \"licenseKey\": \"SYKE-XXXX-XXXX-XXXX-XXXX\",\n  \"geminiKey\": \"AIza...\",\n  \"openaiKey\": \"\",\n  \"anthropicKey\": \"\",\n  \"port\": 3333\n}\n```\n\n## Recommended Workflow\n\n```\nYou (developer)          AI Agent            SYKE\n     |                      |                  |\n     |-- \"Add feature X\" -->|                  |\n     |                      |-- modifies files |\n     |                      |-- modifies files |\n     |                      |-- modifies files |\n     |                      |                  |\n     |                      |-- gate_build --->|\n     |                      |                  |-- scans graph\n     |                      |                  |-- checks impact\n     |                      |<-- PASS/FAIL ----|\n     |                      |                  |\n     |<-- \"Done. Safe to    |                  |\n     |    build.\" ----------|                  |\n```\n\n## Founding 100 — Free Pro for Early Adopters\n\nWe're giving the **first 100 developers** full Pro access for **30 days** — no credit card, no strings.\n\n**What you get:**\n- All 8 MCP tools with advanced algorithms (SCC, PageRank, Risk Scoring, Git Coupling)\n- Unlimited files, multi-project support\n- Real-time cascade monitoring + web dashboard\n- AI semantic analysis (BYOK — Gemini, OpenAI, or Claude)\n\n**How to claim:**\n1. Sign up at [syke.cloud](https://syke.cloud)\n2. Star this repo\n3. Click \"I Starred\" in your [dashboard](https://syke.cloud/dashboard/) → 30 days Pro unlocked\n\nSpots are limited. Once they're gone, they're gone.\n\n## Source CodeThis repository contains the **Free tier source code** — the core dependency graph engine, language plugins, and 3 free MCP tools (`gate_build`, `check_safe`, `get_dependencies`).Pro and Cortex features (advanced algorithms, AI analysis, real-time monitoring, web dashboard) are included in the [npm package](https://www.npmjs.com/package/@syke1/mcp-server) as compiled code.\n## License\n\n[Elastic License 2.0 (ELv2)](LICENSE)\n\nYou can use, modify, and distribute SYKE freely, with two limitations:\n\n1. **No managed service** — You cannot offer SYKE as a hosted/managed service to third parties.\n2. **No license key circumvention** — You cannot remove, disable, or bypass the license key functionality.\n",
  "bytes": 11084,
  "sha": "091fa4d388c3fa5a4fdbe15e53aaac007765ad49ebae2a5b88e7b914caee08b2",
  "repo_slug": "khalomsky/syke",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_khalomsky_syke_cc883b12/readme"
}