# Arkz-Deepak/neurocode [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/Arkz-Deepak/neurocode  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/arkz-deepak-neurocode

## Description
In-memory Code Property Graph context slicer for local models (Ollama, Cursor, Claude Desktop): extracts sub-1,200 token reachability closures for autonomous repository bug repair on consumer edge hardware (4GB–8GB VRAM) without cloud API dependency.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "neurocode": {
    "command": "uvx",
    "args": ["neurocode-ai"]
  }
}
```

## Documentation

## What Arkz-Deepak/neurocode does

Arkz-Deepak/neurocode is an MCP server and command-line toolkit for local code analysis and repository repair. It converts supported source files into an in-memory Code Property Graph (CPG), combining syntax-tree structure with relationships between symbols, callers, and callees. Agents can request a focused reachability slice rather than placing complete files in a model context.

The slicing process is designed around a token ceiling of 1,200 tokens. A bounded 0/1 knapsack selection chooses relevant AST subtrees around candidate faults, while graph traversal supplies cross-file relationships. The project targets local language models in the 1.5B–14B parameter range and consumer hardware with approximately 4GB–8GB of VRAM.

Supported languages and extensions are Python (`.py`), TypeScript (`.ts`, `.tsx`), JavaScript (`.js`, `.jsx`, `.mjs`, `.cjs`), Go (`.go`), and Rust (`.rs`).

## How it works

Tree-sitter grammars parse the repository on the host CPU, and NetworkX is used for the in-memory graph. NeuroCode calculates a topological k-hop closure around relevant code entities, then sends only the selected slice to the model. This separates deterministic repository analysis from neural patch generation and keeps the model input within the configured budget.

For repair, the system can request a single-turn `SEARCH/REPLACE` patch from a local Ollama daemon. AST grafting applies deterministic subtree changes with indentation alignment, and optional test verification can trigger an automatic rollback. Patch validation can check syntax in memory before changes are written to disk.

The package also includes a CLI. `neurocode slice` extracts issue-focused context, while `neurocode repair` can use an Ollama model and apply the resulting repair. `neurocode-copilot` starts the interactive local workflow.

## Setup and configuration

Install the package from PyPI with:

```bash
pip install neurocode-ai
```

A source installation is also available through an editable checkout:

```bash
git clone https://github.com/Arkz-Deepak/neurocode.git
cd neurocode
pip install -e .
```

The MCP entry point is `neurocode-mcp`. Configure it as a stdio server in an MCP client. For Claude Desktop, add a server entry whose `command` points to the executable, such as `/absolute/path/to/neurocode/.venv/bin/neurocode-mcp`. Cursor uses the same command in `.cursor/mcp.json` or its MCP settings. Continue.dev can register it in the `experimental.modelContextProtocolServers` list.

For local model repair, run an Ollama daemon and select a model such as `qwen2.5-coder:7b` with the CLI's `--provider ollama` and `--model` options.

## Tools and capabilities

The MCP interface exposes these tools:

- `neurocode_slice`: Selects a token-bounded CPG reachability slice.
- `neurocode_graft`: Applies an AST subtree graft with indentation alignment and optional test verification with rollback.
- `neurocode_trace`: Traces execution call-chain paths between functions and symbols.
- `neurocode_map`: Produces a Mermaid.js architecture flowchart without consuming model tokens.
- `neurocode_impact`: Reports upstream callers and downstream callees for a structural blast-radius view.
- `neurocode_symbol`: Finds symbols, file locations, line spans, and callers.
- `neurocode_validate_patch`: Performs in-memory syntax checks before disk writes.
- `neurocode_seeds`: Finds static root-cause candidate entities.
- `neurocode_repair_ollama`: Streams a repair patch from a local Ollama service.
- `neurocode_hardware_health`: Reports GPU VRAM headroom, CPU cores, and `/dev/shm` status.

A companion Visual Studio Code extension adds status-bar hardware indicators, file or code-block slicing, prompt copying, and a side-by-side local-Ollama diff viewer.

_Full upstream README: https://allmcps.com/mcp/arkz-deepak-neurocode/readme_

