Skip to content
MCP server

rowstile

Check, test and review row-level security policies for Postgres from a coding agent

Runs locallyStatus and history
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.1.0-beta.4
Listing updated
3 days ago

About rowstile

rowstile is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

rowstile turns a single policy file into plain SQL for Postgres: views, trigger-maintained tables for inheritance, row-level security policies and helper functions for checks, sharing and audit. The MCP server exposes the commands that matter to a coding agent: checking a policy, running its tests, proving properties and reviewing changes.

The wider command set includes init, which drafts a first policy from your tables and foreign keys, dev, which re-checks on every save and shows who gains or loses access, why, which explains a denial and the smallest data changes that would grant it, and migrate, which emits a migration for tools such as Prisma, Drizzle Kit, Django or Rails. A local Studio page shows tables as a chosen user would see them.

The README is candid about fit: it suits apps whose data lives in one Postgres database, and not setups where access depends on several databases or a browser reads tables through Supabase's Data API. It is in beta (0.1.0) with one maintainer, and it works with Postgres 16, 17 or 18 without superuser rights.

Install

Run in a terminal

claude mcp add rowstile -- npx -y rowstile

Add to claude_desktop_config.json

{
  "mcpServers": {
    "rowstile": {
      "command": "npx",
      "args": [
        "-y",
        "rowstile"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "rowstile": {
      "command": "npx",
      "args": [
        "-y",
        "rowstile"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "rowstile": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "rowstile"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "rowstile": {
      "command": "npx",
      "args": [
        "-y",
        "rowstile"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "rowstile": {
      "command": "npx",
      "args": [
        "-y",
        "rowstile"
      ]
    }
  }
}

Tools this server provides (4)

Taken from the project documentation; the running server may differ.

check
Check a policy
test
Run policy tests
prove
Prove policy properties
review
Review a policy change

What it does

Policy checks
Validate a policy file before it is applied.
Policy tests
Run tests written against the policy.
Prove and review
Prove properties and review what a change does to access.
Why explanations
Explain why a user has or lacks a permission, and what would grant it.
Migrations for your tool
Generate policy migrations for Prisma, Drizzle Kit, Django, Rails and others.
Local Studio
Browse tables as a given user, with unreadable rows greyed out.
No extra service
Rules compile into Postgres itself; nothing runs beside the database.

Good for

  • Let an agent verify a row-level security change before merging
  • Draft a first access policy from an existing schema
  • Find out why a user cannot edit a folder
  • Replace hand-written RLS that has become hard to test
  • Model shared folders, teams and tenants in one policy

Pricing

Open source

Prices change. Check rowstile.dev before you buy.

rowstile FAQ

Which Postgres versions work?

Postgres 16, 17 and 18, managed or not, with no superuser needed.

Is it production-ready?

It is in beta at 0.1.0 with one maintainer, and the README says a minor release before 1.0 may change the language and functions.

When does it not fit?

When access depends on several databases or outside Postgres, or a browser reads tables through Supabase's Data API.

Was it called something else?

Yes, it was called rowfence until 0.1.0-alpha.1.

Is rowstile free?

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

How do I add rowstile to Claude Code?

Run this command in your terminal: claude mcp add rowstile -- npx -y rowstile

What are the best alternatives to rowstile?

The closest alternatives to rowstile are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to rowstile

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools