# DevLens MCP server

> Enables AI agents to query a precomputed code graph of TypeScript, Python, Java, Go, and Rust repositories to understand call flows, impact, and security.

- Repository: https://github.com/devlensio/devlensOSS
- Page: https://hostedmcp.org/servers/devlensio/devlensoss
- Transport: stdio
- Stars: 70
- License: AGPL-3.0
- Latest version: 0.7.2

## Install

### Claude Code

```sh
claude mcp add devlensoss -- npx -y @devlensio/cli
```

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

```json
{
  "mcpServers": {
    "devlensoss": {
      "command": "npx",
      "args": [
        "-y",
        "@devlensio/cli"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "devlensoss": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@devlensio/cli"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"devlensoss","type":"stdio","command":"npx","args":["-y","@devlensio/cli"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "devlensoss": {
      "command": "npx",
      "args": [
        "-y",
        "@devlensio/cli"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add devlensoss -- npx -y @devlensio/cli
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.devlensoss]
command = "npx"
args = ["-y", "@devlensio/cli"]
```

### Gemini CLI

```sh
gemini mcp add -s user devlensoss npx -- -y @devlensio/cli
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "devlensoss": {
      "command": "npx",
      "args": [
        "-y",
        "@devlensio/cli"
      ]
    }
  }
}
```

## FAQ

### What languages does DevLens support?

DevLens supports TypeScript/JavaScript, Python, Java, Go, and Rust using native semantic parsers.

### How does DevLens help reduce token usage for AI agents?

It returns task-shaped packets containing only the relevant files and symbols within a specified token budget, rather than requiring the agent to read entire files.

### Can I use DevLens for commercial purposes?

Yes, DevLens is licensed under AGPL-3.0 and includes commercial use.
