# sem [Health: Active]

**Category:** 🔄 Version Control  
**Repository:** https://github.com/Ataraxy-Labs/sem  
**GitHub Stars:** 3451  
**npm Downloads (last month):** 19  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sem

## Description
Entity-level code intelligence: semantic diff, impact analysis, blame, and context for AI agents

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "sem": {
    "command": "npx",
    "args": ["-y","sem"],
    "env": {
      "SEM_CACHE_DIR": ""
    }
  }
}
```

**Requires environment variables:** `SEM_CACHE_DIR` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What the sem MCP server does

The sem MCP server gives AI agents access to entity-aware code intelligence built on top of Git. Rather than treating a change as a set of line ranges, sem identifies functions, methods, and classes and reports which entities were added, modified, deleted, renamed, or moved.

It supports repository exploration, dependency-oriented impact analysis, project checks, and review preparation. An agent can locate a definition, inspect callers and references, search source text, determine which tests may be affected, or examine what changed across a commit range. The server is intended for repositories where an agent needs more context than a conventional text diff provides.

## How it works

sem parses source code with tree-sitter and creates an entity index. The first query in a repository builds the index; later queries read it from disk without requiring a background daemon. Entity data and the SQLite cache are stored outside the repository by default, so normal use does not add cache files to the working tree.

The MCP entry point serves the same operations available through the sem command-line interface. These operations can return structured JSON, which is useful when an agent needs to consume locations, relationships, impact results, or review information programmatically. sem can operate in Git repositories and can also compare arbitrary files outside Git, although the repository-oriented analysis is centered on Git projects.

## Setup and configuration

Install sem through the project’s shell installer, Homebrew, winget, Scoop, npm, Bun, Cargo, Docker, or a GitHub Release binary. After installation, run the MCP entry point from the repository that the agent should inspect.

The optional `SEM_CACHE_DIR` variable changes the root directory used for sem’s cache. Repository-local cache overrides are ignored. Cloud-backed queries are opt-in per repository; logging in alone does not upload a repository or send a query. The command name can conflict with GNU Parallel’s separate `/usr/bin/sem` binary, so verify the resolved executable with `sem --version` when both are installed.

## Tools and capabilities

The sem MCP server exposes the command family’s agent-relevant operations, including:

- Finding entity definitions and optionally showing callers, references, or surrounding context.
- Searching source text with grep-style matching.
- Calculating the entities and tests affected by a target or diff.
- Running the project’s compiler, type checker, linter, and tests through `check`.
- Producing a review certificate for a commit range with changed entities, callers, and related tests.
- Inspecting semantic diffs, code graphs, and entity history.

`find`, `grep`, `impact`, `check`, and `certify` are presented as the core questions for agent workflows: where code is, what a change touches, whether it passes project checks, and what a human should review. Context queries can include callers and callees within a token budget.

## Limitations and notes

Caller results can be marked incomplete. Context output may omit the target when its signature does not fit the requested budget. The `check` operation reports three outcomes: success, failure, or inability to decide. Cloud features have a separate consent flow and should not be treated as automatic repository upload.

It also does not establish that every language construct has complete relationship coverage, so agents should treat entity and caller analysis as indexed static analysis rather than a guaranteed complete runtime dependency model.

_Full upstream README: https://allmcps.com/mcp/sem/readme_

