GuardLayer

io.github.solvionholdings由 GitHub 账号 solvionholdings 发布v1.0.1更新于 Nov 11, 2026

Security checks for Next.js + Supabase apps: code scan, read-only live DB check, fix confirmation.

已验证Streamable HTTP可网页运行数据库开发者工具安全与监控

概览

AI 生成的概览

远程 MCP 服务器,为 Next.js + Supabase 应用做安全检查:静态代码扫描、只读实时数据库检查与修复确认。

可以做什么
  • 扫描项目源码与 Supabase 迁移文件,查找硬编码密钥、暴露的 service role 密钥、未启用 RLS、未鉴权路由与不安全跳转
  • 获取只读 SQL,用于导出 Supabase 目录元数据(表、RLS 开关、策略、授权、触发器、函数、存储桶),不读取数据行
  • 结合 Auth 设置检查该快照,找出任何人可读的表、宽松策略、用户可自行修改的角色或套餐字段以及暴露的函数
  • 带上上次的问题键重新检查,查看哪些已关闭、哪些是新增、哪些仍未解决
适用场景
适合在部署 Next.js + Supabase 应用前、修改表或策略后使用,或当助手准备放宽访问权限以绕过权限报错时使用。
运行要求
远程 Streamable HTTP 端点,无需安装或软件包。助手会发送其选择扫描的源码文件,以及只读 SQL 产出的 JSON 快照;该 SQL 需你自行在 Supabase SQL 编辑器中运行,或通过 Supabase MCP 服务器、或使用自己的访问令牌经 Supabase Management API 运行。
安装前请注意
源码文件与数据库目录元数据会发送到 GuardLayer 服务器,其声明仅在内存中检查后即丢弃;Auth 设置会先简化为开关与数字。若走 Supabase Management API 路线,会涉及你的 Supabase 访问令牌,并适用 Supabase 自身的隐私条款。这些工具只做报告,修复需你自行完成;服务器建议通过迁移修复,而不要关闭 RLS 或向 anon 授权。

安装

在 SourceWeft 中

  1. 打开 控制台中的 GuardLayer,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.solvionholdings%2Fguardlayer/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "guardlayer": {
      "type": "http",
      "url": "https://www.guardlayer.io/api/mcp"
    }
  }
}

README

GuardLayer for Claude Code

Security check for Next.js + Supabase apps, run by your AI agent. GuardLayer scans the code, checks the live Supabase project read-only, and after a fix confirms what actually closed.

It catches the holes AI-built apps usually ship with: tables anyone can read, RLS off, policies that only check for a signed-in user (public in practice when anyone can sign up), users who can change their own role or plan, service role keys in frontend code or NEXT_PUBLIC_ / VITE_ variables, and API routes, Server Actions and Edge Functions that don't check the caller.

Install (Claude Code)

claude plugin marketplace add solvionholdings/guardlayer-pluginclaude plugin install guardlayer@guardlayer

The plugin adds the GuardLayer MCP server and a skill that tells Claude when to use it: before a deploy, after changing tables or policies, or when it's about to loosen access to get past a permission error. Then ask: "Check this app for security issues with GuardLayer."

Other MCP clients

The server is a remote MCP server over Streamable HTTP, no install needed:

https://www.guardlayer.io/api/mcp

Cursor (.cursor/mcp.json):

json
{ "mcpServers": { "guardlayer": { "url": "https://www.guardlayer.io/api/mcp" } } }

Tools

ToolWhat it does
scan_filesStatic scan of the files your agent sends. Each finding comes with the fix.
get_supabase_snapshot_sqlA read-only query for the project's catalog: table and column names, RLS flags, policies, grants, triggers, functions, bucket settings. Never rows.
check_supabase_snapshotChecks the snapshot together with your Auth settings. With previous_issue_keys it reports what closed, what's new and what's still open.

Privacy

Code and snapshots sent to the server are checked in memory and discarded. Your Supabase access token stays on your machine; Auth settings are reduced to on/off flags and numbers before they are read. See the privacy policy.

Data the plugin sends, and where

DestinationWhat is sentWhen
GuardLayer MCP server (https://www.guardlayer.io/api/mcp, the plugin's declared server)The source files the agent chooses to scan; the read-only catalog snapshot (table and column names, RLS flags, policies, grants, triggers, function and bucket settings, never rows); the project's Auth settings reduced to on/off flags and numbersWhen scan_files or check_supabase_snapshot runs
Supabase Management API (https://api.supabase.com), with the user's own access tokenThe read-only snapshot query, and a read of the project's Auth settingsOnly if the agent uses this route to run the snapshot query. The user can instead run it in the Supabase SQL editor or through the Supabase MCP server

Nothing is retained by GuardLayer. Supabase's handling of API requests is covered by Supabase's privacy policy. Usage is counted by tool name only (which tool ran, which client connected), never by content.

More: guardlayer.io/mcp · Browser version: guardlayer.io/check-supabase

来源:README.md,提交 c78dca6

工具

3

scan_files

Scan code for security issues

Static security scan of a Next.js + Supabase codebase: secrets in code or public env vars (NEXT_PUBLIC_, VITE_), service role keys in client code, RLS off or open policies in supabase/migrations, unauthenticated API routes, Server Actions and Edge Functions, unsafe redirects and more. Send source files (ts, tsx, js, jsx, sql, .env*, config files) with paths relative to the project root; skip node_modules, build output and lockfiles. Up to 300 files and 4 MB per call; split bigger projects. Files are scanned in memory and discarded.

输入参数files必填ignore

get_supabase_snapshot_sql

Get the read-only Supabase snapshot query

Returns the read-only SQL for the live Supabase check and how to run it. It reads only catalog metadata (table and column names, RLS flags, policies, grants, triggers, SECURITY DEFINER functions, bucket settings), never table rows, and returns one JSON value.

无需输入参数。

check_supabase_snapshot

Check a live Supabase project

Checks the JSON from get_supabase_snapshot_sql: tables anyone can read, RLS off, policies that only check for a signed-in user (public in practice when sign-ups are open), users who can update their own role or plan columns, exposed SECURITY DEFINER functions, public buckets. Pass auth_config (the project's Auth settings) when you can: it decides whether 'any signed-in user' means anyone. Pass previous_issue_keys from an earlier result to see what is closed, still open or new. Returns each issue with its SQL fix and a fix prompt.

输入参数snapshot必填auth_configprevious_issue_keys

版本历史

1
  1. v1.0.1最新Nov 11, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分