# DevLens

DevLens builds a graph of your repository so an agent can locate relevant code, follow calls, and inspect change impact. Use it when working through an unfamiliar codebase.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 60
- Author: devlensio
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/devlensio/devlensOSS
- Updated: 2026-10-04
- HTML: https://affpapa.org/en/nevibecode/mcp/devlens

## What it does

DevLens analyzes a repository and builds a graph of code entities, their links, and summaries. An MCP-connected agent can query for files and symbols relevant to a task, trace calls, and inspect the potential reach of a change. The server also provides per-node security analysis and understands route relationships in Next.js.

Install the CLI, then run `devlens analyze . --summarize` from your project. This creates the graph and search index. Model setup is needed for AI-generated summaries; structural analysis can run offline without an API key. The repository must be analyzed before the agent can query its graph.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add devlens -- npx -y @devlensio/cli
```

### Codex

**Platform CLI**
```bash
codex mcp add devlens -- npx -y @devlensio/cli
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "devlens": {
            "command": "npx",
            "args": [
                "-y",
                "@devlensio/cli"
            ]
        }
    }
}
```

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add devlens npx -y @devlensio/cli
```

## When to use it
- locate files and symbols for a task
- trace a function's call flow
- inspect the reach of a code change
- check code nodes for security risks

## Example prompts
- Find the files and symbols involved in authorization.
- Trace the calls made by this function.
- Show which parts of the project could be affected by changing this symbol.

## 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
