# sem

Parses code with tree-sitter to track changes at the entity level instead of raw lines. Helps coding agents inspect callers and target affected tests.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 3422
- Author: Ataraxy-Labs
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Ataraxy-Labs/sem
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/sem

## What it does

The tool operates directly on Git repositories. It parses files via tree-sitter to track functions and classes as distinct entities. Agents inspect modifications structurally instead of parsing raw line numbers.

The server translates core commands into agent tools. Using `sem find`, agents locate callers and code references. The `sem impact` command detects which test files require execution after an edit, while `sem check` runs compiler or test verification only where changes propagate.

A system with GNU Parallel already contains a `/usr/bin/sem` binary. That causes a PATH collision unless you set a shell alias or invoke the package through npx.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add sem -- npx -y @ataraxy-labs/sem
```

### Codex

**Platform CLI**
```bash
codex mcp add sem -- npx -y @ataraxy-labs/sem
```

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add sem npx -y @ataraxy-labs/sem
```

## When to use it
- locate callers and references for a specific function
- find tests affected by uncommitted changes in an entity
- inspect Git diffs grouped by altered classes and methods
- run compiler and linter checks on modified code paths only

## Example prompts
- Find all callers of `parse_config` across the repository using sem find.
- Run sem impact on uncommitted changes to check which tests need to run.
- Execute sem check to verify lint and type checks for affected files.

## Similar
- [GitDiagram](https://affpapa.org/en/nevibecode/mcp/gitdiagram.md) — MCP server · ★ 18446
- [Repowise](https://affpapa.org/en/nevibecode/mcp/repowise.md) — MCP server · ★ 7891
- [Octocode MCP - AI Context Platform](https://affpapa.org/en/nevibecode/mcp/octocode-mcp-ai-context-platform.md) — MCP server · ★ 955
- [projectmem](https://affpapa.org/en/nevibecode/mcp/projectmem.md) — MCP server · ★ 866
- [Memorix](https://affpapa.org/en/nevibecode/mcp/memorix.md) — MCP server · ★ 863
- [loki-mode](https://affpapa.org/en/nevibecode/mcp/loki-mode.md) — MCP server · ★ 1107

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