# Forge

> Forge is an open-source MCP server for databases. Supabase MCP server for inspecting schemas, query plans and RLS policies, read-only. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** API, CLI, Web, Self-hosted
- **Repository:** https://github.com/mcontrerasmalpar-pixel/forge
- **MCP Registry name:** io.github.mcontrerasmalpar-pixel/forge
- **Categories:** [databases](https://ai-powered.com/categories/databases), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-27

## About

Forge runs as an MCP endpoint on Supabase Edge Functions and gives AI clients a small set of database debugging tools. Requests carry the signed-in user's JWT, so every query is evaluated under that user's PostgreSQL row-level security rules rather than a privileged service key.

The tool set is an explicit allowlist: catalog listing for tables, policies and functions, query plan explanation, a drafted RLS policy that is returned as a reviewable migration without being applied, and a single read-only SELECT execution with a short timeout. Statements that write, alter or change session settings are rejected before they reach the database.

The project suits developers building multi-tenant Supabase apps who want an assistant to check how their policies isolate tenants. A Next.js demo UI with a seeded two-tenant fixture and a tool-call trace view is included, and the repository is MIT licensed.

## Features

- **Allowlisted database tools:** Exposes six named tools for listing tables, policies and functions, explaining queries, drafting RLS and running read-only SQL.
- **User-scoped authorization:** Queries run with the caller's JWT so PostgreSQL row-level security decides what is visible.
- **Read-only SQL guardrails:** Single SELECT or WITH statements only, with comments stripped and write or DDL keywords blocked.
- **Non-applied RLS drafts:** Policy proposals come back as SQL migration text marked as not applied.
- **Per-user rate limiting:** Tool calls are limited per user to protect the endpoint.
- **Demo and evals:** A seeded two-tenant demo UI and an automated suite covering routing and SQL guardrails.

## Good for

- Checking which RLS policies apply to a table before shipping a Supabase app
- Explaining slow SQL queries through their execution plan from an AI editor
- Verifying that one tenant cannot read another tenant's rows
- Drafting row-level security policy changes for review
- Exploring the schema of a Supabase project from Cursor

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add --transport http forge https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "forge": {
      "type": "http",
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "forge": {
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "forge": {
      "type": "http",
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add forge --url https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.forge]
url = "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "forge": {
      "httpUrl": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http forge https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "forge": {
      "serverUrl": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "forge": {
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server",
      "transport": "http"
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "forge": {
      "type": "streamableHttp",
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "forge": {
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "forge": {
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "forge": {
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "forge": {
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server
```

Enter a Name (for example "Forge"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "forge": {
      "type": "http",
      "url": "https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server"
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 6 tools changes data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `list_tables` (name suggests: reads): Catalog metadata for the public schema.
- `list_policies` (name suggests: reads): Read-only inspection of pg_policy.
- `list_functions` (name suggests: reads): Read-only inspection of pg_proc.
- `explain_query` (name suggests: reads): Returns an EXPLAIN (FORMAT JSON) plan for SELECT or WITH queries.
- `propose_rls`: Returns a reviewable RLS SQL migration draft without applying it.
- `run_readonly_sql` (name suggests: changes): Runs a single read-only SELECT or WITH statement under RLS with a 3s timeout.

## FAQ

### Does the server use a service role key?

No. The client uses the public anon key and the user's session JWT, and the README states the service_role key is never exposed to the client.

### Can the tools change my database?

The SQL tool accepts only a single SELECT or WITH statement in a read-only transaction, and the RLS tool returns a draft without executing it.

### How do I connect Forge to Cursor?

Copy the example Cursor config, point it at your deployed mcp-server function, and supply a user access token and the anon key in the headers.

### What license is Forge under?

The repository is licensed under MIT.

### Is Forge free?

Yes. Forge is open source, so you can use and self-host it for free.

### How do I add Forge to Claude Code?

Run this command in your terminal: claude mcp add --transport http forge https://skxljgnpjmnekvecpfjd.supabase.co/functions/v1/mcp-server

### What are the best alternatives to Forge?

The closest alternatives to Forge are SupaForge, Supabase Rls Check, Scribase, Rls Doctor and Supabase.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [SupaForge](https://ai-powered.com/mcp/supaforge): SupaForge is an MCP server for databases.
- [Supabase Rls Check](https://ai-powered.com/mcp/supabase-rls-check): Supabase Rls Check is an open-source MCP server for databases.
- [Scribase](https://ai-powered.com/mcp/scribase): Scribase is a freemium MCP server for databases.
- [Rls Doctor](https://ai-powered.com/mcp/rls-doctor): Rls Doctor is an open-source MCP server for databases.
- [Supabase](https://ai-powered.com/mcp/supabase): Supabase is an MCP server for databases.
- [Mcpg](https://ai-powered.com/mcp/mcpg): Mcpg is an open-source MCP server for databases.
- [Backenly](https://ai-powered.com/mcp/backenly): Backenly is a freemium MCP server for developer tools.
- [Kaiva Postgres MCP](https://ai-powered.com/mcp/kaiva-postgres-mcp): Kaiva Postgres MCP is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/forge-2
