SuperAPIAI Directory

neurocode

github.com · AI coding

NeuroCode is a lightweight, heterogeneous neuro-symbolic framework and Model Context Protocol (MCP) server, designed to enable small local language models (1.5B–14B parameters) to repair multi-file software engineering defects on consumer laptops (such as 4GB–8GB VRAM) without cloud API dependencies and to avoid VRAM overflow crashes. It builds an in-memory code property graph (CPG) using the host CPU and RAM, performs topological k-hop reachability closure computation, and solves a bounded 0/1 knapsack optimization problem to select highly relevant AST subtrees within the model token limit (B ≤ 1,200 tokens); the device GPU receives only bounded slice context and generates single-turn SEARCH/REPLACE diff patches, preventing secondary KV cache explosions and GPU OOM cliff failures. The project supports native parsing and deterministic mutation for 5 programming languages including TypeScript and JavaScript, provides an official stdio MCP server that can connect to Claude Desktop, Cursor, Continue.dev, or VS Code, and exposes multiple native MCP tools.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

NeuroCode is a lightweight neuro-symbolic framework and MCP server for resource-constrained environments. Its main purpose is to enable small local language models to complete multi-file software engineering defect repairs on consumer laptops without relying on cloud APIs and without VRAM overflow.

Main capabilities include:

  • Multilingual code property graphs and AST grafting: native parsing and deterministic mutation of 5 programming languages including TypeScript and JavaScript, using in-memory Tree-sitter AST syntax.
  • Heterogeneous cognitive division of labor: the host CPU and RAM use Tree-sitter and NetworkX to build an in-memory code property graph (CPG) in milliseconds, compute the topological k-hop reachability closure around fault candidates, and solve a bounded 0/1 knapsack optimization problem to select highly relevant AST subtrees within the model token limit (B ≤ 1,200 tokens); the device GPU receives only bounded slice context and generates single-turn SEARCH/REPLACE diff patches, avoiding exploratory token waste and secondary KV cache explosions.
  • MCP integration: provides an official stdio MCP server compliant with the 2024-11-05 specification, connectable to Claude Desktop, Cursor, Continue.dev, or VS Code. Exposed tools include neurocode_slice (CPG reachability slicing within the token budget), neurocode_graft (deterministic AST subtree grafting with automatic indentation alignment, optional test verification and automatic rollback), neurocode_trace (sub-millisecond execution call-chain path tracing), neurocode_map (zero-token architecture flowchart, Mermaid.js), neurocode_impact (structural blast radius check), neurocode_symbol (sub-millisecond AST symbol lookup), neurocode_validate_patch (in-memory pre-check of patch syntax errors), neurocode_seeds (static root cause candidate entity discovery), neurocode_repair_ollama (single-turn patch generation streamed to the local Ollama daemon), neurocode_hardware_health (reports GPU VRAM headroom, CPU cores, and /dev/shm tmpfs zero-wear status).
  • VS Code extension: provides status bar telemetry (real-time VRAM headroom and /dev/shm RAM health metrics), context slicing (right-click extraction of reachability closure under 1,200 tokens), one-click copy prompt, and autonomous diff viewer.

Usage:

  • Install via PyPI, or install locally from source (git clone https://github.com/Arkz-Deepak/neurocode.git && cd neurocode && pip install -e .).
  • Configure the MCP settings of Claude Desktop, Cursor, or Continue.dev to connect to the server.
  • Install the VS Code extension from the Visual Studio Marketplace, or download the .vsix binary file.
  • Use the CLI to extract token-bounded slices, repair code via the local Ollama daemon, and interactively use Copilot on a laptop GPU.

Applicable scenarios:

  • Multi-file software engineering defect repair on consumer-grade laptops (e.g., 4GB–8GB VRAM).
  • Code repair and patch generation that require localization and no cloud API dependency.
  • Integration with tools such as Claude Desktop, Cursor, Continue.dev, and VS Code for code slicing, symbol lookup, impact analysis, and patch validation.

Limitations:

  • Primarily targeted at small local language models (1.5B–14B parameters); no explicit support information is provided for models of other sizes.
  • The token budget is strictly limited to B ≤ 1,200 tokens, which may affect context completeness in complex scenarios.
  • Physical laptop edge validation is based on specific hardware (AMD Ryzen 7 7435HS + NVIDIA RTX 3050 Laptop GPU, 4.0 GB VRAM); performance on other hardware has not yet been provided.
  • Academic reproducibility requires reference to the frozen release tag v0.1.1; the master branch is an actively maintained multilingual production version.
  • Details such as fees, pricing, and platform support scope have not yet been provided.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools