leash avatar

Leash

build.leash/leash

Hosted Postgres database and sign-in for AI-built apps, with schema and data access per app.

CCM score
69 of 100
tools
15
transport
HTTP
last updated
Nov 23, 2026
Open website

Own this MCP server? Claim it

What it does

  • Reads data with list_apps, list_tables, describe_table, and query, where query runs read-only SQL capped at 1000 rows
  • Writes changes with execute and apply_schema_change, and destructive changes save a 7-day snapshot first via restore_snapshot
  • Uses hosted OAuth sign-in with a 1-hour token and a device key option, and needs no local install
  • Designed for personal apps built with AI tools that need storage and sign-in without hosting anything

Install

$ npx -y add-mcp https://leash.build/mcp --name leash -y

Adds the server to every agent config it finds in this project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http leash https://leash.build/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 15 tools

Verified live against the running server on Nov 23, 2026.

list_appsList the person's Leash apps (id, slug, allowed origins).

List the person's Leash apps (id, slug, allowed origins).

No parameters. Call it with no arguments.

create_appCreate a Leash app: its own walled-off Postgres schema and sign-in. slug: 2–40 chars, lowercase letters, digits and dashes, starting with a letter. origins: where the web app is served (needed for browser sign-in and CORS). Free plans allow 1 app, Pro 25.2 params

Create a Leash app: its own walled-off Postgres schema and sign-in. slug: 2–40 chars, lowercase letters, digits and dashes, starting with a letter. origins: where the web app is served (needed for browser sign-in and CORS). Free plans allow 1 app, Pro 25.

Parameters* required
originsarray
Web origins the app is served from, e.g. https://myapp.example.com or http://localhost:5173 (no path).
slug*string
Short name, e.g. notes
set_app_originsReplace the app's allowed web origins (sign-in return URLs and CORS). Each is https://host[:port] or http://localhost:port, no path; at most 10.2 params

Replace the app's allowed web origins (sign-in return URLs and CORS). Each is https://host[:port] or http://localhost:port, no path; at most 10.

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
origins*array
Web origins the app is served from, e.g. https://myapp.example.com or http://localhost:5173 (no path).
reclaim_spaceCompact the app's tables that have many deleted rows (VACUUM FULL), then re-measure storage. Use after deleting lots of data to get back under the storage limit. Returns the tables compacted, the tables skipped because the app's role doesn't own them, and whether writes are st...1 params

Compact the app's tables that have many deleted rows (VACUUM FULL), then re-measure storage. Use after deleting lots of data to get back under the storage limit. Returns the tables compacted, the tables skipped because the app's role doesn't own them, and whether writes are st...

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
list_tablesList the app's tables and views (name, kind, estimated row count).1 params

List the app's tables and views (name, kind, estimated row count).

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
describe_tableDescribe one of the app's tables or views: columns (name, type, nullable, default), primary key, constraints, indexes, and a view's definition.2 params

Describe one of the app's tables or views: columns (name, type, nullable, default), primary key, constraints, indexes, and a view's definition.

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
table*string
Table or view name (unqualified).
queryRun one read-only SQL SELECT against the app's tables (its own schema). Returns { columns, rows (arrays), truncated }: at most 1000 rows and 10 MB; int8/numeric come back as strings, bytea as base64, dates as ISO text. Writes, multiple statements and system functions are refused.3 params

Run one read-only SQL SELECT against the app's tables (its own schema). Returns { columns, rows (arrays), truncated }: at most 1000 rows and 10 MB; int8/numeric come back as strings, bytea as base64, dates as ISO text. Writes, multiple statements and system functions are refused.

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
paramsarray
Values for $1, $2 … (strings, numbers, booleans, null, or JSON for json/jsonb columns).
sql*string
Exactly one SQL statement. Use $1, $2 … for values.
executeRun one SQL statement that changes data (insert/update/delete) or the schema. Returns { rowCount, columns, rows, rowsTruncated, snapshots }, or for DDL { changeId, snapshots } (logged like apply_schema_change). At most 100 RETURNING rows (10 MB) come back: when rowsTruncated i...5 params

Run one SQL statement that changes data (insert/update/delete) or the schema. Returns { rowCount, columns, rows, rowsTruncated, snapshots }, or for DDL { changeId, snapshots } (logged like apply_schema_change). At most 100 RETURNING rows (10 MB) come back: when rowsTruncated i...

Parameters* required
allowWithoutSnapshotboolean
Go ahead even if a safety snapshot can't be taken (cap reached). Only when the person agrees.
app*string
The app's slug or id (from list_apps / create_app).
descriptionstring
For schema changes: what and why (logged).
paramsarray
Values for $1, $2 … (strings, numbers, booleans, null, or JSON for json/jsonb columns).
sql*string
Exactly one SQL statement. Use $1, $2 … for values.
apply_schema_changeApply one schema change (create/alter/drop table, index, view, sequence; truncate) to the app's own schema, recorded in its change log with your description. Destructive changes (drop table/column, column type change, truncate) first save a 7-day snapshot of each affected tabl...4 params

Apply one schema change (create/alter/drop table, index, view, sequence; truncate) to the app's own schema, recorded in its change log with your description. Destructive changes (drop table/column, column type change, truncate) first save a 7-day snapshot of each affected tabl...

Parameters* required
allowWithoutSnapshotboolean
Go ahead even if a safety snapshot can't be taken (cap reached). Only when the person agrees.
app*string
The app's slug or id (from list_apps / create_app).
description*string
What the change does and why (logged).
sql*string
Exactly one SQL statement. Use $1, $2 … for values.
mint_device_keyMint a device key for a non-browser client of the app (script, extension, phone app). The key is returned ONCE: store it in the device's local config or secret store, never in browser code or a repo. Use it as Authorization: Bearer lk_… on the data API.2 params

Mint a device key for a non-browser client of the app (script, extension, phone app). The key is returned ONCE: store it in the device's local config or secret store, never in browser code or a repo. Use it as Authorization: Bearer lk_… on the data API.

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
name*string
Which device or script, e.g. laptop-sync
list_device_keysList the app's device keys (id, name, created, last used, revoked). Never shows the keys themselves.1 params

List the app's device keys (id, name, created, last used, revoked). Never shows the keys themselves.

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
revoke_device_keyRevoke one of the app's device keys (it stops working immediately).2 params

Revoke one of the app's device keys (it stops working immediately).

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
keyId*string
The key's id from list_device_keys
list_snapshotsList the app's safety snapshots (taken automatically before destructive changes; kept 7 days), newest first.1 params

List the app's safety snapshots (taken automatically before destructive changes; kept 7 days), newest first.

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
restore_snapshotRestore a snapshot as a table in the app: under its original name if that table no longer exists, otherwise as <table>_restored_<timestamp>, or as asTable. Rows only: re-create constraints, indexes and defaults with apply_schema_change. Returns { table }.3 params

Restore a snapshot as a table in the app: under its original name if that table no longer exists, otherwise as <table>_restored_<timestamp>, or as asTable. Rows only: re-create constraints, indexes and defaults with apply_schema_change. Returns { table }.

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).
asTablestring
Name for the restored table (must not exist).
snapshotId*string
get_direct_connectionPro only: a Postgres connection locked to the app's own schema, for apps with their own server (Drizzle, migrations). Keep it in the server's environment, never in browser code.1 params

Pro only: a Postgres connection locked to the app's own schema, for apps with their own server (Drizzle, migrations). Keep it in the server's environment, never in browser code.

Parameters* required
app*string
The app's slug or id (from list_apps / create_app).

Details

Website
leash.build/docs
Categories
Databases, AI Agents & LLM Apps, Developer Tools
Transport
HTTP
Registry
MCP registry, active
Tools verified
Nov 23, 2026

Similar to Leash

More Databases