# mcp-tenant-isolation

mcp-tenant-isolation is a Claude Code MCP server that scans application code for cross-tenant data leaks. It detects missing tenant filters in database queries, caching layers, and tool handlers.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: subodhkc
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/subodhkc/mcp-tenant-isolation
- Updated: 2026-11-01
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-tenant-isolation

## What it does

The server inspects multi-tenant software repositories to identify code paths that expose data across different customer boundaries. It uses 57 deterministic rules evaluated against an intermediate representation. The scanner parses TypeScript and JavaScript into syntax trees, inspects Prisma schemas, and traces data flows through Next.js, Express, or Fastify handlers.

Rules target unverified object lookups, raw SQL statements without tenant predicates, and shared cache stores. MCP-specific checks audit tool exposure filters, credential storage boundaries, and network binding to local addresses. These MCP rules align with the 2025 OWASP MCP Top 10 guidelines.

Static inspection cannot evaluate dynamic database row-level security or actual execution runtime behavior. Running the server locally requires Node.js version 22 or later.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-tenant-isolation -- npx -y mcp-tenant-isolation
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp-tenant-isolation -- npx -y mcp-tenant-isolation
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-tenant-isolation": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-tenant-isolation"
            ]
        }
    }
}
```

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-tenant-isolation npx -y mcp-tenant-isolation
```

## When to use it
- detect database queries missing tenant organization filters
- locate cache keys and storage paths lacking tenant prefixes
- check MCP tool handlers for missing visibility boundaries
- spot IDOR weaknesses in application routing
- generate SARIF and Markdown scan reports for code review

## Example prompts
- Scan the `./src` folder for multi-tenant data isolation gaps
- Run a tenant isolation check and export findings as `results.sarif`
- Inspect MCP tool handlers in this project for tenant scoping issues

## Similar
- [multi-tenant-safety-checker](https://affpapa.org/en/nevibecode/skills/multi-tenant-safety-checker.md) — skill · 446 installs
- [saas-multi-tenant](https://affpapa.org/en/nevibecode/skills/saas-multi-tenant.md) — skill · 171 installs
- [multi-tenant-architecture](https://affpapa.org/en/nevibecode/skills/multi-tenant-architecture.md) — skill · 1900 installs
- [Tenant Launchpad](https://affpapa.org/en/nevibecode/mcp/tenant-launchpad.md) — MCP server · 687 installs
- [saas-scaffolder](https://affpapa.org/en/nevibecode/skills/borghei-saas-scaffolder.md) — skill · 125 installs
- [security-scan](https://affpapa.org/en/nevibecode/skills/codewithmukesh-security-scan.md) — skill · 4000 installs

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