ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

MCP Tenant Isolation

โดย subodhkcรุ่น 2.0.0i★ –iรันบนเครื่อง
ชื่อใน registryio.github.subodhkc/mcp-tenant-isolation

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Static analysis scanner for MCP server code and multi-tenant SaaS applications.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: เครื่องมือนักพัฒนา

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

ต้องเตรียมก่อน

  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "tenant-isolation": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-tenant-isolation"
      ]
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add tenant-isolation -- npx -y mcp-tenant-isolation

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "tenant-isolation": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-tenant-isolation"
      ]
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "tenant-isolation": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-tenant-isolation"
      ]
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub subodhkc ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด เครื่องมือนักพัฒนาi

  • ดาวมากกว่า 0% ของอีก 4919 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 36% ของอีก 4919 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 4919 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

MCP Tenant Isolation ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (2.0.0) เข้า registry 3 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี GitHub, Desktop Commander, Cloudflare MCP

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

GitHub

โดย github

server ทางการของ GitHub ให้ AI อ่านและจัดการโค้ด issue และ pull request ในบัญชีของคุณได้ ใช้ผ่านคลาวด์ของ GitHub หรือรันในเครื่องด้วย Docker ก็ได้

บนเครื่องหรือคลาวด์★ 34,245MITอัปเดต 4 วันที่ผ่านมา
ติดตั้ง

Desktop Commander

โดย wonderwhy-er

MCP server for terminal commands, file operations, and process management

รันบนเครื่อง★ 10,225MITอัปเดต 17 วันที่ผ่านมา
ติดตั้ง

Cloudflare MCP

โดย cloudflare

Cloudflare MCP servers

รันบนคลาวด์★ 4,446Apache-2.0อัปเดต 14 เดือนที่ผ่านมา
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

mcp-tenant-isolation

Static analysis scanner for multi-tenant SaaS and MCP server code. 57 deterministic rules that catch cross-tenant data leakage before it reaches production.

What it does

If you build multi-tenant software, every query, every cache key, every file access, every API response needs to be scoped to the right tenant. Miss one, and Tenant A sees Tenant B's data. That's not a bug you want to find in production.

This scanner reads your source code and checks whether tenant isolation guards are present where they need to be. It covers 57 patterns across database queries, API routes, cache keys, file storage, schema design, logging, and MCP server architecture. It works with TypeScript, JavaScript, Prisma, Drizzle, raw SQL, Next.js, Express, and Fastify.

The scanner also runs as an MCP server, so you can plug it into Claude Desktop, Cursor, or any MCP-compatible agent and have your AI assistant scan code on demand.

Who uses this

  • SaaS engineering teams who need to catch tenant isolation gaps before code ships
  • MCP server developers building tools that handle tenant-scoped data
  • Security teams who want tenant isolation checks in CI/CD
  • AI agent developers who want their agents to scan code for cross-tenant risks

Why this exists

General-purpose security scanners are not purpose-built for tenant isolation patterns. They catch SQL injection and XSS. They do not check whether your findMany query includes an organizationId filter. They do not check whether your MCP tool handler scopes tool visibility by tenant. They do not check whether your cache key includes a tenant prefix.

This scanner does exactly that. 57 rules, each checking for a specific tenant isolation pattern, each producing a finding with the rule ID, file, line, missing guard, and a remediation hint.

Every rule is deterministic. Given the same source code, the scanner produces the same findings. No machine learning, no probabilistic scoring. Static analysis has inherent limitations though. It cannot verify runtime behavior, database-level enforcement, or dynamic tenant isolation. The scan output includes a limitations field that lists what was and was not checked for each run.

Install

npm install -g mcp-tenant-isolation

or use npx (no install needed)

npx mcp-tenant-isolation scan ./src

or use Docker (no Node.js needed)

docker run --rm -v $(pwd):/code subodhkc/mcp-tenant-isolation scan /code/src

Requires Node.js 22 or later.

Quick start

mti scan ./src

mti scan ./src --format sarif --output results.sarif mti scan ./src --format markdown --output TENANT-ISOLATION-REPORT.md mti scan ./src --format ai --output findings.json mti scan ./src --severity HIGH mti rules # list all 57 rules mti baseline # snapshot current findings for proof-of-fix tracking mti init # create .mtirc.json with defaults

Demo

Rules

42 general multi-tenant rules
PrefixCategoryCountSeverityWhat it checks
TCMTenant Context Management6CriticalTenant ID comes from session, not client input. Context propagation across async boundaries.
DBQDatabase Query Isolation10CriticalEvery query touching tenant-scoped data includes a tenant filter. Prisma, Drizzle, raw SQL.
IDORIDOR Prevention5CriticalID-based lookups verify tenant ownership before returning data.
CSICache and Session Isolation4HighCache keys and session data are tenant-scoped.
APIAPI Security3HighTenant-aware rate limiting and response scoping.
FSIFile Storage Isolation4HighS3, Blob, and filesystem access is tenant-scoped.
LOGLogging and Audit4MediumAudit logs include tenant context.
SCHSchema and Migration6HighPrisma models and SQL migrations include tenant columns and indexes.
15 MCP-specific rules
IDTitleSeverityWhat it checks
MCP-001Tool Visibility ScopingCriticalTool handler has no tenant-based allow/deny filter.
MCP-002Cache Key Tenant PrefixCriticalTool results cached without tenant prefix.
MCP-003Session Binding to User+TenantCriticalSession ID used as sole authorization.
MCP-004Token Exchange (RFC 8693)HighOriginal token forwarded instead of token exchange.
MCP-005Per-Tenant Rate LimitingMediumNo per-tenant rate limiting on tool calls.
MCP-006Vector Store Tenant NamespaceHighShared vector store without tenant namespaces.
MCP-007Tool Description InjectionMediumTool description could bypass isolation.
MCP-008Credential Vault Tenant ScopingCriticalCredential vault stores tokens without tenant scoping.
MCP-009Shared Service AccountHighSingle shared API key for all tenant API calls.
MCP-010Session Cleanup on DisconnectMediumNo deterministic session cleanup.
MCP-011Telemetry Tenant IdentifierLowTelemetry strips tenant identifier.
MCP-012Local Bind (127.0.0.1)HighMCP server binds to 0.0.0.0 instead of 127.0.0.1.
MCP-013Filesystem Tenant RootHighTool handler accesses filesystem without tenant root.
MCP-014Cross-Tenant Artifact LeakageHighArtifact storage without tenant prefix.
MCP-015Dynamic Tool NamespaceMediumTools registered without tenant namespace.

MCP rules are mapped to the OWASP MCP Top 10 (2025). See docs/OWASP-MAPPING.md for the full mapping. The mappings are advisory, for triage and reporting. This scanner does not certify OWASP compliance.

Architecture

The scanner pipeline runs in six stages:

  1. Parsers — Babel AST for TypeScript/JavaScript, Prisma schema parser, SQL migration parser, MCP SDK import detection
  2. IR and Flow Graph — Intermediate representation capturing sources, sinks, guards, routes, MCP tool definitions
  3. Rule Engine — 57 deterministic rules evaluated against the IR. Each rule defines sources, sinks, and required guards
  4. False Positive Filter — Test file detection, confidence scoring, pattern refinement
  5. Reporters — Terminal, JSON, SARIF 2.1.0, AI-friendly JSON with remediation hints, Markdown
  6. CLI and MCP Server — mti CLI with scan/init/rules/suppress/baseline/mcp commands. MCP server exposes 4 tools
Structured output

Scan results include structured metadata beyond just findings:

  • Completeness — COMPLETE, PARTIAL, or ERROR. If files fail to parse or rules fail to evaluate, completeness drops to PARTIAL and the reasons are listed.
  • Coverage — Files discovered, parsed, failed to parse. Rules available, selected, evaluated, failed, triggered. Unsupported file types counted.
  • Concern families — Findings grouped into 8 concern families (Tenant Context, Data Isolation, Cache and Session, MCP Security, Secrets and Credentials, Vector and Storage, API and Access, Audit and Logging) for triage.
  • Limitations — What the scan could and could not verify. Always includes static analysis limitation. Includes flow analysis scope and proof-of-fix status.
  • Scan receipt — Provenance metadata with engine version, rulepack digest, timestamp, and a SHA-256 receipt hash for tamper detection.
  • Proof-of-fix — Each finding is tagged as STILL_PRESENT, NEW, or NOT_VERIFIABLE relative to a baseline file. Run mti baseline to establish a baseline.
Fingerprints

Findings use v2 semantic fingerprints that are stable under line movement and formatting changes. The fingerprint is derived from the rule ID, file path, normalized code snippet, and sorted missing guards. It does not include the line number. This means if you move code around without changing its semantics, the fingerprint stays the same and baseline tracking remains accurate.

MCP server

The package includes an MCP server for AI agent integration. It runs locally via stdio transport. No hosting, no network exposure.

{

"mcpServers": { "tenant-isolation": { "command": "npx", "args": ["-y", "mcp-tenant-isolation", "mcp"] } } }

Add this to your Claude Desktop, Cursor, Windsurf, or other MCP client config to let your AI agent scan code for tenant isolation issues on demand.

MCP tools
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.Yes (opt-in)

The suppression tool is hidden by default. It only appears when the server is started with --allow-write-tools. This is a security boundary: read-only by default, write operations require explicit opt-in.

All filesystem operations during MCP scans are constrained to the project root configured at server startup. Traversal attacks (../), absolute paths outside root, UNC paths, and symlink escapes are rejected. See SECURITY.md for details.

CI/CD integration

Option 1: Pre-built GitHub Action (easiest)

Add this to .github/workflows/tenant-isolation.yml:

name: Tenant Isolation Scan

on: [push, pull_request] jobs: scan: runs-on: ubuntu-latest permissions: contents: read security-events: write steps:

  • uses: actions/checkout@v4
  • uses: subodhkc/mcp-tenant-isolation@v2 with: path: ./src severity: HIGH fail-on: HIGH

Runs the scan, uploads SARIF to GitHub Code Scanning, generates a Markdown report artifact, and fails the workflow if HIGH or CRITICAL findings are detected.

Option 2: Manual npx
name: Tenant Isolation Scan

on: [push, pull_request] jobs: scan: runs-on: ubuntu-latest permissions: contents: read security-events: write steps:

  • uses: actions/checkout@v4
  • uses: actions/setup-node@v4 with: node-version: 22
  • run: npx mcp-tenant-isolation scan ./src --format sarif --output results.sarif
  • uses: github/codeql-action/upload-sarif@v3 with: sarif_file: results.sarif
Exit codes
CodeMeaning
0No findings
1Findings found
2Error (config invalid, parse failure, etc.)
GitHub Code Scanning integration

When you upload SARIF output using github/codeql-action/upload-sarif@v3, findings appear in your repository's Security > Code scanning alerts tab. This works with both free and Advanced Security-enabled repos.

What happens:

  1. mti scan --format sarif --output results.sarif generates a SARIF 2.1.0 file
  2. upload-sarif action sends it to GitHub's code scanning API
  3. Each finding becomes a code scanning alert with file, line, severit

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx