# Neurarch

> Neurarch is a free MCP server for ai models and llm tooling. Size GPU training jobs and lint PyTorch models inside your coding agent, offline. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI, self-hosted
- **Website:** https://www.neurarch.com/mcp
- **Repository:** https://github.com/neurarch-ai/neurarch-mcp
- **MCP Registry name:** io.github.neurarch-ai/neurarch-mcp
- **Categories:** AI models and LLM tooling, developer tools
- **Listing updated:** 2026-11-15

## About

The pitch is to know what a job needs before it takes a GPU reservation. Given a model, batch and card, the sizing tool reports peak memory, the smallest card that holds it, the largest batch per card, a two-card split when one is not enough and the cost of a run. After a CUDA out-of-memory error, a diagnosis tool reads the message against the same estimate and names the likely cause with the least invasive fix first.

It reads a PyTorch .py file, a model.neurarch.json saved from the Neurarch app, a graph from the neurarch-trace package, or a HuggingFace config. Source files give exact layers and parameter counts but unknown tensor shapes. The README says memory is a calibrated estimate, with median error 7% above 1 GB on held-out architectures, so treat it as a fit check.

A Claude Code plugin adds a hook that sizes a python train.py launch before it runs and blocks one that will not fit. The README requires Node.js 20 or newer, and the site says no API key is needed.

## Features

- **Training job sizing:** Estimates peak memory, smallest fitting card, largest batch and run cost.
- **OOM diagnosis:** Reads a CUDA out-of-memory message and names the cause with a fix.
- **Model linting:** Runs structural checks on a model before training.
- **Fix suggestions:** Turns lint findings into diffs labelled exact or proposal.
- **Hugging Face import:** Builds a graph from a Hub config.json without downloading weights.
- **Launch hook:** A Claude Code hook blocks training launches that will not fit.

## Good for

- Check whether a model fits a T4 or L40S before launching
- Find the right card count for a large model
- Diagnose a CUDA out-of-memory error
- Find which layers hold most of the parameter budget
- Block an agent-launched job that will not fit

## Install

### Claude Code (Terminal)

```sh
claude mcp add neurarch-mcp -- npx -y neurarch-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "neurarch-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "neurarch-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "neurarch-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "neurarch-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "neurarch-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "neurarch-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "neurarch-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "neurarch-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "neurarch-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "neurarch-mcp"
      ]
    }
  }
}
```

## Tools

- `size_training_job`: Estimates peak memory, smallest card, largest batch and run cost.
- `diagnose_oom`: Reads a CUDA out-of-memory message and names the cause.
- `lint_model`: Structural checks on a model.
- `check_design`: Design checks run by the CI bot.
- `suggest_fix`: Turns lint findings into unified diffs.
- `history`: What the same structure measured the last time it ran.
- `load_hf_model`: Builds a graph from a HuggingFace config.

## FAQ

### Does it need an API key?

No. The site says it works offline with no API key; only a named Hugging Face id opens a network connection.

### How accurate is the memory figure?

It is a calibrated estimate, not a measurement. The README reports a median error of 7% above 1 GB on held-out architectures.

### What does it need to run?

Node.js 20 or newer; clients launch it through npx.

### Which inputs work best?

A .neurarch.json or neurarch-trace graph carries explicit structure. Plain .py parsing leaves tensor shapes unknown.

### Is Neurarch free?

Yes. Neurarch is free to use.

### How do I add Neurarch to Claude Code?

Run this command in your terminal: claude mcp add neurarch-mcp -- npx -y neurarch-mcp

### What are the best alternatives to Neurarch?

The closest alternatives to Neurarch are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/neurarch
