Sem logo

Sem

Entity-level Git analysis for agents, covering semantic diffs, code relationships, impact, checks, and review context.

Install Sem

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "sem": {
      "command": "npx",
      "args": [
        "-y",
        "sem"
      ],
      "env": {
        "SEM_CACHE_DIR": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Entity-level Git analysis through the sem MCP server lets agents inspect functions, classes, and methods instead of only changed lines. It exposes sem’s discovery, impact, validation, and review operations as MCP tools, with JSON output available for the underlying commands. Reach for it when an agent needs callers, references, affected tests, semantic diffs, or commit-range review context in a Git repository. sem builds an on-disk index from parsed source code and works without repository setup.

Use cases

  • Find definitions and callers before editing code
  • Calculate affected tests for an entity or diff
  • Review semantic changes across a commit range
  • Check whether a change passes project tooling

Key features

  • Entity-level semantic diffs
  • Caller, reference, and context lookup
  • Impact analysis with affected tests
  • Project compiler, linter, type-checker, and test checks
  • Commit-range review certificates
  • MCP tools with structured JSON output

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

51/56 checks healthy over the last 92d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · sem (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3.5kStargazers on the source repository.
npm downloads19Package downloads in the last 30 days.
Last commitTodayMost recent push to the default branch.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Sem works

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.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Sem

sem is an MCP server that connects AI agents to Git repositories and sem’s entity-level code intelligence. Its main tools find definitions, search text, analyze change impact, run project checks, and create review certificates. It also exposes semantic diff, graph, and history operations for repository analysis.

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

sem parses source code with tree-sitter and indexes functions, methods, and classes as entities. Its impact operation then uses those relationships to identify affected code and tests, while semantic diff and certify describe entity-level changes.

sem stores its SQLite entity cache outside the repository under the operating system cache directory by default. Set `SEM_CACHE_DIR` to change the cache root; repository-local overrides are ignored so cache files do not dirty the working tree.

It states that sem provides an MCP entry point for agents that speak MCP, but it does not confirm a Cursor setup.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSem AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/sem?style=directory)](https://allmcps.com/mcp/sem)
HTML Embed
<a href="https://allmcps.com/mcp/sem"><img src="https://allmcps.com/api/badge/sem?style=directory" alt="Sem on AllMCPs" /></a>