# Grasp — Code Architecture & Dependency Analysis

Gives your coding agent a dependency graph, architecture layers, vulnerability findings and a refactor plan for a GitHub repo or a local folder.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 30
- Author: ashfordeOU
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ashfordeOU/grasp/tree/HEAD/mcp
- Updated: 2026-09-07
- HTML: https://affpapa.org/en/nevibecode/mcp/grasp-code-architecture-dependency-analysis

## What it does

Grasp runs as an MCP server and wires its analysis engine into the agent. It reads GitHub repositories and local directories, then reports what hangs off what: dependency graphs, circular imports, architecture layers, dead code, metrics, git history, duplicates, monorepo workspaces and API surface maps.

A security suite checks dependencies against OSV.dev, looks for container and runtime CVEs via NIST NVD, runs local supply-chain integrity checks and Socket.dev behavioural analysis. For a quick pass there are `skip_container`, `skip_socket` and `skip_integrity` flags.

Later releases added a multimodal knowledge graph. You feed it code, Markdown, PDFs, spreadsheets, images through OCR or video with transcription by local Whisper, then ask questions in plain language. Parsing stays deterministic on tree-sitter. Entity and relationship extraction go through an LLM: the server picks up a local Ollama at `localhost:11434` first, and cloud keys are opt-in. With no LLM at all a bundled local extractor still works. Shared team access over HTTP is switched on with `GRASP_HTTP_MCP=1`.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add grasp -- npx -y grasp-mcp-server
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp -- npx -y grasp-mcp-server
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "command": "npx",
            "args": [
                "-y",
                "grasp-mcp-server"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "grasp-mcp-server"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp npx -y grasp-mcp-server
```

## When to use it
- see what breaks elsewhere before you refactor a module
- track down circular imports and dead code in a large repo
- scan project dependencies for known CVEs
- draft a migration plan and list the affected API surface
- split a monorepo into workspaces and layers

## Example prompts
- Analyze the `ashfordeOU/grasp` repo and draw the dependency graph with any cycles
- Run `grasp_vulnerabilities` on this project, skip the container and Socket checks
- Ingest the `./docs` folder and tell me how the auth flow works

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
