MCP TENANT ISOLATION · OPEN SOURCE · POWERED BY HAIEC

Catch cross-tenant leaks before production.

57 deterministic rules for tenant boundaries across multi-tenant SaaS and MCP server code.

v2.0.057 rules15 MCP-specificMITMCP v2Local / stdioCI-ready

One security invariant

Tenant A should not become Tenant B.

A tenant boundary can fail even when authentication itself succeeds. The application still needs to preserve tenant context through data access, cache state, storage, sessions and every tool that can act on tenant data.

What the 57 rules cover

TCM6

Tenant Context Management

Critical

DBQ10

Database Query Isolation

Critical

IDOR5

IDOR Prevention

Critical

CSI4

Cache & Session Isolation

High

API3

API Security

High

FSI4

File Storage Isolation

High

LOG4

Logging & Audit

Medium

SCH6

Schema & Migration

High

MCP Security
15 specialized MCP rules

Tool visibility scoping, tenant-prefixed cache keys, session binding to user + tenant, token exchange, per-tenant rate limiting, vector-store namespaces, credential vault scoping, shared service accounts, session cleanup, telemetry tenant identity, local binding, filesystem tenant roots, artifact isolation, dynamic tool namespace checks.

MCP introduced more tenant boundaries.

Tool visibility
Cache keys
Session identity
Credentials
Rate limits
Vector stores
Filesystem roots
Artifact storage
Tool namespaces

The tenant boundary now extends into the tools an agent can discover and invoke, the credentials those tools use, and the shared infrastructure behind them.

How the scanner works

Scan pipeline
1SOURCE
2TS / JS / PRISMA / SQL PARSERS
3INTERMEDIATE REPRESENTATION
4SOURCES · SINKS · GUARDS · ROUTES · MCP TOOLS
5FLOW-AWARE ANALYSIS
657 DETERMINISTIC RULES
7FALSE-POSITIVE FILTERING
8SUPPRESSION / BASELINE
9FINDINGS + COVERAGE + RECEIPT

This is static analysis with flow-aware guard detection, not formal verification or complete taint proof. The scanner produces deterministic findings: given the same source code, it produces the same results.

The v2 evidence contract

COMPLETENESS

COMPLETE / PARTIAL / ERROR

COVERAGE

Files and rules analyzed, failures accounted for

CONCERN FAMILIES

8 higher-level triage groups

LIMITATIONS

Explicit scope of what static analysis could not verify

SCAN RECEIPT

Engine, rulepack, and provenance digest

EVIDENCE ENVELOPE

Tamper-evident execution context

SEMANTIC FINGERPRINT

Stable across line movement and format changes

PROOF-OF-FIX

STILL_PRESENT / NEW / NOT_VERIFIABLE

Safer MCP defaults in v2

Read Only by Default

Scan, list, and explain are available without write capability.

Write Tool Opt-In

Suppression tool appears only when explicitly enabled with --allow-write-tools.

Project-Root Confinement

MCP filesystem operations remain within the configured project root. Traversal prevention, absolute-path outside-root prevention, UNC path protection, and symlink escape protection.

Stdio Only

No hosted or network MCP server required. Legacy SSE transport removed in v2.

This keeps the MCP interface local and narrows the agent's filesystem authority.

Use it in CI

GitHub Action
uses: subodhkc/mcp-tenant-isolation@v2

SARIF

SARIF 2.1.0 output for GitHub Code Scanning integration

OUTPUT FORMATS

Terminal, JSON, SARIF, AI-oriented JSON, Markdown

Use it through MCP

MCP configuration
{
  "mcpServers": {
    "tenant-isolation": {
      "command": "npx",
      "args": ["-y", "mcp-tenant-isolation", "mcp"]
    }
  }
}
ToolDescriptionWrite
scan_tenant_isolationScan a project path. Returns structured findings with completeness, coverage, concern families, and receipt.no
list_tenant_isolation_rulesReturns all 57 rules with metadata. Filterable by category.no
explain_tenant_isolation_ruleReturns rule details, OWASP mapping, CWE IDs, fix suggestions.no
suppress_tenant_isolation_findingAdd a suppression with reason, approver, controls, and expiry. Write-gated.opt-in

Limitations

  • -Static analysis has inherent limitations
  • -Cannot prove runtime behavior
  • -Cannot prove database enforcement occurring outside analyzed artifacts
  • -Dynamic or generated code may not be visible
  • -Unsupported languages are reported
  • -Partial scans do not prove absence of findings
  • -OWASP mapping is advisory, not compliance certification
  • -No compliance certification

Technical identity

ProductMCP Tenant Isolation
Versionv2.0.0
MCP Registryio.github.subodhkc/mcp-tenant-isolation
CLImti
MCP toolscan_tenant_isolation
LicenseMIT
Node>=22
MCPv2 (stdio only)

HAIEC DEVELOPER SECURITY

SOURCE SECURITY

AI AppSec

Explore ->

BOUNDARY SECURITY

MCP Tenant Isolation

Current page

RUNTIME

LLMVerify

Explore ->

Secure the code. Protect the tenant boundary. Verify the model interaction.

MIT licensed. Powered by HAIEC. Free package, no HAIEC account required.

AI Advisor →