forge MCP Server
Supabase Edge Functions MCP server with allowlisted tools and PostgreSQL RLS.
forge scores 67 (Good), licensed MIT and written in TypeScript. It can be reached as a remote MCP endpoint. It declares 6 tools. Filed under Databases, AI and memory. GitHub shows 1 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
67 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade A
88/100 for listing completeness. Lost points: 2 of 6 tools barely described, short summary.
How quality is graded
Where the 67 comes from
22 + 20 + 1 + 10 + 4 + 10 = 67. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 1 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Remote auth: API key required. Get a key or token from the provider first, then add it as a header in your client config. How remote auth works
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "mcontrerasmalpar-pixel-forge": { "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server" } }}
Environment variables
This server does not declare environment variables.
Tools6Tool docs quality grade D
All capabilitiesexplain_querytoolSELECT/WITH only + read-only transaction + EXPLAIN (FORMAT JSON)
list_functionstoolRead-only pgproc inspection
list_policiestoolRead-only pgpolicy inspection
list_tablestoolCatalog metadata only (public schema)
propose_rlstoolReturns a reviewable SQL migration draft (applied: false)
run_readonly_sqltoolSingle SELECT/WITH statement + defaulttransactionreadonly = on + 3s timeout + RLS
About
Forge
MCP server + debugging assistant running on Supabase Edge Functions.
Forge inspects database schemas, explains SQL query plans, drafts RLS policies, and executes read-only queries scoped to the signed-in user's JWT. No service_role key is ever exposed to the client.
Hosted setup guide: HOSTED.md
Repository: https://github.com/mcontrerasmalpar-pixel/Forge
What It Demonstrates
- MCP Server on Supabase Edge Functions (Deno, JSON-RPC 2.0)
- Allowlisted MCP Tools with multi-layer read-only SQL guardrails (blocks destructive DDL/DML)
- PostgreSQL RLS as the Authorization Layer (
security invokerRPCs, zero frontend permission hacks) - Multi-Tenant RLS Isolation Demo: visible tenant
acme-alphavs isolated tenantbeta-shadow - Next.js Assistant UI with live JWT session, one-click Seed RLS Demo, and expandable MCP tool trace
- Optional LLM Orchestrator (
AzureOpenAISDK) with a built-in zero-key MCP router fallback so the demo works out of the box
Architecture
Cursor / Web Assistant UI
| MCP JSON-RPC 2.0 (Bearer User JWT)
v
Edge Function: mcp-server
| Postgres RPCs + Row Level Security (auth.uid())
v
PostgreSQL
The chat Edge Function orchestrates tool calls via AzureOpenAI when configured, or falls back to a deterministic MCP tool router so every tool (list_tables, list_policies, list_functions, explain_query, propose_rls, run_readonly_sql) can be tested live without paid LLM quota.
Try It in 30 Seconds (Zero Setup — Connects to Hosted Demo Backend)
The web assistant is pre-wired to a live hosted Supabase project protected by PostgreSQL RLS (https://skxljgnpjmnekvecpfjd.supabase.co), with a ready-to-use demo account pre-filled in the UI:
git clone https://github.com/mcontrerasmalpar-pixel/Forge.git
cd Forge/apps/web
npm install
npm run dev
- Open http://localhost:3000
- Click Sign in (pre-filled with
demo@forge.dev/ForgeDemo123!) → status updates toJWT: yes · demo@forge.dev. - Click Seed RLS Demo → seeds two tenants (
your_org: "acme-alpha"andhidden_org: "beta-shadow"). - Click any quick-prompt chip (e.g. How many documents can I see and what are their titles? or DROP TABLE documents) and expand View MCP tool trace to inspect the raw JSON-RPC 2.0 tool call and response.
Run the automated router + SQL guardrail test suite from the repo root:
npm run evals
Key Files for Code Review
supabase/functions/mcp-server/index.ts— Edge Function MCP server (initialize,tools/list,tools/call, SQL read-only validator, rate limiter).supabase/migrations/20260907000000_init.sql— Multi-tenant schema (organizations,memberships,documents,usage_events) and RLS policies usingmy_org_ids().supabase/migrations/20260907000001_forge_rpcs.sql— Catalog inspection RPCs (security definer, restricted toservice_role) and query execution RPCs (security invoker,default_transaction_read_only = on,statement_timeout = '3s').supabase/migrations/20260907000002_bootstrap_demo.sql— Idempotent two-tenant RLS fixture (acme-alphavsbeta-shadow).supabase/functions/chat/index.ts— OptionalAzureOpenAItool-calling loop with a built-in zero-key MCP router fallback.evals/run.mjs— 12 automated checks covering tool routing and SQL injection/DDL guardrails.server.json— Official MCP Registry manifest (streamable-httpremote specification).
Deploy to Your Own Supabase Project
- Create a Supabase project and link this repository (or run
npx supabase db push+npx supabase functions deploy). - Create
apps/web/.env.local:
NEXT_PUBLIC_SUPABASE_URL=https://YOUR_REF.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ... # anon or publishable key
- Run the web assistant:
cd apps/web
npm install
npm run dev
- In Supabase Dashboard → Authentication → Providers → Email, disable Confirm email for quick demo testing.
- Sign up / Sign in → status shows
JWT: yes. - Click Seed RLS Demo → returns JSON confirming
your_org: "acme-alpha"andhidden_org: "beta-shadow". - Click any quick-prompt chip (or ask a question) and expand View MCP tool trace to inspect the raw JSON-RPC payload.
Connect from Cursor (Direct MCP)
Copy .cursor/mcp.json.example to .cursor/mcp.json and point it to your deployed mcp-server function:
{
"mcpServers": {
"forge": {
"url": "https://YOUR_REF.supabase.co/functions/v1/mcp-server",
"headers": {
"Authorization": "Bearer USER_JWT",
"apikey": "SUPABASE_ANON_KEY"
}
}
}
}
USER_JWT is the access_token of a signed-in user session. Every MCP tool call inherits PostgreSQL RLS permissions from that JWT.
Allowlisted MCP Tools
| Tool | Guardrail |
|---|---|
list_tables | Catalog metadata only (public schema) |
list_policies | Read-only pg_policy inspection |
list_functions | Read-only pg_proc inspection |
explain_query | SELECT/WITH only + read-only transaction + EXPLAIN (FORMAT JSON) |
propose_rls | Returns a reviewable SQL migration draft (applied: false) |
run_readonly_sql | Single SELECT/WITH statement + default_transaction_read_only = on + 3s timeout + RLS |
Optional Azure OpenAI Configuration
If you want chat to use Azure OpenAI instead of the built-in MCP router:
npx supabase secrets set AZURE_OPENAI_ENDPOINT=https://YOUR_RESOURCE.openai.azure.com
npx supabase secrets set AZURE_OPENAI_API_KEY=...
npx supabase secrets set AZURE_OPENAI_DEPLOYMENT=gpt-4o-mini
npx supabase functions deploy chat --project-ref YOUR_REF
Security Model & Evals
- Client only uses the public
anon/publishablekey + user session JWT. run_readonly_sqlandexplain_querystrip comments, reject multi-statement queries, block write/DDL/session keywords (INSERT,UPDATE,DELETE,DROP,ALTER,ANALYZE,SET,LOCK, etc.), enforceSET LOCAL default_transaction_read_only = on, and cap execution at3s.propose_rlsdrafts policies without executing DDL.- Per-user rate limiting (
40 tools/min) tracked byauth.uid().
Run the router + SQL guardrail evaluation suite:
npm run evals
License
MIT
Frequently asked questions
What is forge MCP Server?
Supabase Edge Functions MCP server with allowlisted tools and PostgreSQL RLS.
How do I install forge MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. forge MCP Server connects to the remote endpoint https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server, so there is nothing to install locally.
Is forge MCP Server free and open source?
Yes. forge MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does forge MCP Server support remote (HTTP) connections?
Yes. forge MCP Server offers a hosted endpoint over Streamable HTTP, so HTTP-capable clients can connect to it without running anything locally.
What tools does forge MCP Server provide?
forge MCP Server provides 6 tools, including explain_query, list_functions, list_policies, and list_tables. See the full tool list for descriptions and parameters.
How is forge MCP Server's trust score calculated?
forge MCP Server scores 67 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.