mekka
Integrates with Resend for sending authentication emails from the Mekka backend.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mekkaShow me the schema of the users table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mekka
KEEP THE BACKEND. FIRE THE FLEET.
Database · Auth · Storage · Realtime · Studio · safe agent access. Local SQLite or remote libSQL, one product surface.
npx mekkadownloads, installs, builds, starts the backend, and opens Studio at http://127.0.0.1:8082.
· What runs today · Run it · Request path · What's inside · Agent access · API surface · Security · Compare · License
Why Mekka exists
Supabase taught the market to expect a database, Auth, Storage, Realtime, and a dashboard in the same box. Mekka keeps that product shape without requiring a fleet of services for the core workflow. The current release runs on Bun and supports two SQLite-compatible data profiles: a local Bun SQLite database for development and an authenticated remote libSQL primary for self-hosted deployments. Studio, Auth, policy, migrations, and MCP ship in the same repository.
Related MCP server: sqlite-mcp
What runs today
Surface | Local profile | Self-hosted libSQL profile |
User data | Bun SQLite in the project data directory | Authenticated remote libSQL over HTTPS |
Studio | Table Editor, restricted SQL Editor, Authentication, Agent Access | The same supported Studio surface; unsupported upstream routes redirect away |
Schema and rows | Manifest-backed table, column, index, row, and restricted SQL APIs | The same contracts through the selected remote engine; no local user-data fallback |
MCP metadata |
| The same tools against remote libSQL |
MCP row data | Explicit opt-in | Explicit opt-in |
Agent writes | Isolated local preview, validation, Studio approval, guarded promotion | Typed |
Control plane | Local SQLite stores for Auth, sessions, grants, approvals, and audit state | The same local control plane; database credentials remain server-side |
The remote profile does not silently fall back to a project .sqlite file. If libSQL authentication, routing, or policy resolution fails, the request fails.
Every request carries the full tenant identity, and every user value stays a prepared-statement parameter. That's the contract:
Concern | Bound into each request |
Who is calling | An authed caller with a capability set; the tenant tuple must match the headers exactly |
Where data can go | One organization, project, environment, branch, generation |
What it can touch | Type-resolved tables and columns from the schema manifest |
How big it can be | Row cap, request byte cap, response byte cap, object cap, timeouts |
Replay safety | SHA-256 fingerprint and reusable idempotency keys |
Writes from agents | Preview branch plus one-time human-approved promotion when the selected engine profile supports previews; otherwise typed |
Deep PostgreSQL compatibility still belongs on PostgreSQL. Mekka rejects unsupported behavior instead of faking it. Teams that need native RLS, stored procedures, ranges, or a large extension catalog should use the real thing. Everyone else has been paying a Postgres tax for features their app never touches.
Mekka is coming for the teams that want Supabase's product and none of its weight.
Request path
sequenceDiagram
participant C as Client / Studio / MCP
participant G as Gateway
participant A as Auth (ES256 JWT)
participant P as Policy Engine
participant S as Schema Manifest
participant X as SQLite Compiler
participant DB as Bun SQLite / remote libSQL
participant R as Realtime
C->>G: request + tenant headers + bearer token
G->>A: authenticate caller, verify signature, expiry, tenant
A-->>G: TenantContext + bounded capabilities
G->>P: capability check for this tenant
G->>S: resolve schema manifest, validate table and columns
G->>X: compile validated query to one prepared statement
G->>DB: execute bounded, parameterized
DB-->>G: result
G->>R: append changefeed event
G-->>C: result, audit, metricsAuth happens before permissions. The backend resolves table and column names through the schema manifest, binds user values as parameters, applies policy, and executes one prepared statement. It never parses user SQL directly: the constrained query dialect becomes an AST first, then a compiled statement, then a bounded execution.
Mutations carry idempotency keys. Payloads, results, uploads, queues, and Realtime buffers have hard limits. Unsupported operations return an explicit error instead of an approximation. Errors don't carry secrets, SQL values, or stack traces.
The default backend binds 127.0.0.1:3001, Studio serves 127.0.0.1:8082. Put a trusted TLS reverse proxy in front of Studio, persist the control-plane data directory, and run a restore before trusting a backup. In the libSQL profile, the user database runs separately behind its own authenticated HTTPS endpoint.
bun run build
MEKKA_STUDIO_ACCESS_TOKEN="replace-with-a-random-token" \
MEKKA_AUTH_SESSION_SECRET="replace-with-a-random-secret" \
MEKKA_PUBLIC_URL="https://mekka.example.com" \
NEXT_PUBLIC_SITE_URL="https://mekka.example.com" \
SQLITE_META_DATA_DIRECTORY="/absolute/path/to/mekka-data" \
bun run --cwd apps/studio start:productionDocker builds are available:
docker build \
--build-arg NEXT_PUBLIC_SITE_URL=https://mekka.example.com \
--build-arg NEXT_PUBLIC_MEKKA_GATEWAY_URL=https://mekka.example.com \
-f apps/studio/Dockerfile \
-t mekka-studio .What's inside
Each subsystem ships in the repo and works against the same local project. Open any of them to see what it actually does.
Tables, columns, indexes, migrations, schema hashes, checkpoints, backup, and restore
Tables and columns resolve through a versioned schema manifest; values always bind as parameters
Reads compile to one prepared statement, bounded by row, byte, and timeout caps
Writes are idempotent via a SHA-256 fingerprint and reusable keys
MEKKA_DATA_ENGINEselects local SQLite, remote libSQL, or the optional embedded-replica profileRemote mode uses authenticated libSQL directly and refuses accidental local user-data fallback
better-authwith email OTP, password reset, and sessionsES256 access tokens with a published JWKS and a short expiry; verifier applies clock tolerance
HttpOnly session cookie with rotating refresh
Google and GitHub OAuth, plus a local verification-code endpoint for development
Local filesystem and S3-compatible object providers behind one interface
Checked checksums, bounded reads, signed read grants with TTL, and reconciliation
Resumable upload subset with leases and cleanup
Quotas per bucket and per object, MIME allowlist, and normalized safe paths
Transactional SQLite journal drives changefeeds with a resume cursor and ack
Policy-projected delivery: subscribers only see rows their policy allows
Private channels, Broadcast, and Presence in one Bun runtime
Bounded socket payloads and an idle timeout
Short-lived preview branches with their own Auth and credential lifecycle
One validated migration per preview lifecycle, schema-CAS promotion, and restore points
Durable retries and TTL cleanup of stale previews
Self-hosted libSQL intentionally returns
unsupportedfor write-mode MCP previews; Turso-backed preview lifecycle is a separate profile
Table Editor, restricted SQL Editor, Auth users/providers/configuration, Agent Access, and approval review
The SQL editor runs one restricted statement, blocks system tables, and enforces LIMITs; guarded writes require an explicit checkbox
Disabled upstream Storage, Realtime, Logs, and Settings routes redirect to the supported project surface in the self-hosted Studio profile
Screenshots below come from the current project, not a design mockup
One-hour tokens bound to a single tenant tuple and application session
Schema read access works immediately; bounded row reads require a separate default-off checkbox and
mcp:data:readLocal write mode uses migration, preview validation, Studio approval, and one-time promotion
Self-hosted libSQL write mode remains a typed
unsupportedoperation
Common CRUD flows against the pinned
supabase-jsrelease, verified by a differential harnessselect, filters,order,limit,range, exactcount,insert,update,delete,upsertEverything else (arrays, ranges, RLS, RPC, casts, FTS) fails explicitly; it is never approximated
Read the exact contracts: Data API · Gateway · SQLite meta · Realtime protocol · Core matrix
Product tour
|
|
|
|
|
|
Studio contains code derived from Supabase Studio under Apache License 2.0. Provenance and the reproduced license live in apps/studio/UPSTREAM.md and apps/studio/UPSTREAM_LICENSE.
Agent access without production roulette
An AI agent should not need your database password or libSQL JWT. Mekka gives it a short-lived token bound to one organization, project, environment, branch, generation, and application session. Schema access and row access are separate grants. Write access exists only where the active engine profile can create an isolated preview.
Agent
→ one-hour scoped token
→ schema-only metadata by default
→ optional bounded row reads after explicit opt-in
→ optional isolated preview for supported write profiles
→ exact migration approval before production promotionFor profiles with write previews, Mekka stores the migration artifact, SQL, schema hashes, and the destructive-operation flag. Studio shows the change before approval. The approval secret works once and only for that artifact. Promotion checks the production schema again before it runs. The agent can break its preview; production stays behind a human decision and a schema check.
Kind | Name | What it does |
Resource |
| Current schema manifest |
Resource |
| Schema for the matching branch only |
Resource |
| Sanitized policy summary, no executable predicates |
Resource |
| Migration metadata, no SQL text |
Resource |
| Log metadata, message text marked untrusted |
Resource |
| Capabilities active for this session |
Tool |
| Read the branch schema manifest |
Tool |
| Compile a constrained read query without executing it |
Tool |
| Applied migration metadata |
Tool |
| Sanitized policy summary |
Tool |
| Bounded, policy-authorized rows from one public table |
Tool |
| Short-lived isolated preview from the parent |
Tool |
| Record a branch-bound migration plan, no DDL applied |
Tool |
| Apply the proposal to its exact preview only |
Tool |
| Validate the applied preview migration |
Tool |
| Ask Studio for approval, then step up |
There is no direct production-write tool, no arbitrary SQL, no credential or token passthrough. query_rows requires explicit mcp:data:read, permits only manifest-resolved columns and simple bounded filters, and still applies row and field policy. Each tool is gated by a separate capability: mcp:read, mcp:data:read, mcp:preview:create, mcp:preview:propose, mcp:preview:apply, mcp:preview:validate, mcp:promotion:request.
{
"table": "notes",
"columns": ["id", "title"],
"filters": [{ "column": "id", "operator": "gte", "value": 1 }],
"orderBy": { "column": "id", "direction": "asc" },
"limit": 20,
"offset": 0
}Boundary | Contract |
Capability | Separate |
Tables | One current public manifest table; |
Projection | 1–32 unique explicit public columns; no |
Filters | Up to 8 AND terms using |
| 1–50 scalar values |
Pagination | Default limit 20, maximum 100; offset maximum 10,000 |
Execution | Exactly one policy-rewritten, parameterized |
Output | Maximum 256 KiB; strings 16 KiB per cell; BLOBs 64 KiB per cell; BigInt and BLOB use tagged serialization |
The self-hosted beta policy permits all rows and public manifest columns after the user enables row access. Deployments that need row-level restrictions must supply a stricter policy source. Prompt text, filter values, row values, logs, and database content cannot create or elevate this capability.
{
"mcpServers": {
"mekka": {
"type": "http",
"url": "https://mekka.example.com/mcp",
"headers": {
"Authorization": "Bearer <temporary-agent-access-token>"
}
}
}
}For a local MCP server that bridges stdio to the remote Streamable HTTP endpoint:
npx mekka mcp-stdio --url https://mekka.example.com/mcp --token-env MEKKA_MCP_TOKENAPI surface
Every request gates on the tenant tuple organization / project / environment / branch / generation.
Method | Path | Notes |
GET/POST/PATCH/DELETE |
| Policy-authorized select and mutate |
ALL |
| MCP Streamable HTTP endpoint |
GET |
| Static OpenAPI 3.1 document |
Supported from supabase-js: select, eq/neq/gt/gte/lt/lte/in/is/not/or/match, order, limit, range, exact count, insert, update, delete, upsert (primary key only, merge duplicates only). Embedding, aliases, casts, RPC, arrays, ranges, and full-text search fail explicitly.
Method | Path | Notes |
GET/POST/PATCH/DELETE |
| List, create, read, update, delete |
GET/PUT/DELETE |
| List, upload, download, delete |
POST |
| Issue a signed read grant |
GET |
| Redeem a signed grant |
POST/HEAD/PATCH/DELETE |
| Resumable upload subset with leases |
Local filesystem and S3-compatible providers, checksummed bounded reads, MIME allowlisting, quotas, and reconciliation. Full TUS, transforms, and multipart uploads are not claimed.
Surface | Notes |
WebSocket |
|
Changefeeds | Transactional SQLite journal, resume cursor, policy-projected delivery |
Channels | Private channels, Broadcast, Presence |
Method | Path | Capability |
GET |
|
|
GET |
|
|
POST/PATCH/DELETE |
|
|
POST |
| One restricted statement |
POST/PATCH/DELETE |
|
|
GET/POST |
| Schema read and manage |
GET |
| Format, schema version, schema hash |
ALL |
| Local auth |
POST |
| Issue an Agent Access token |
GET/PATCH |
| Review and decide approvals |
ALL |
| MCP endpoint |
Security model
Boundary | What Mekka does |
Tenant isolation | Exact five-part tuple in headers or signed-url query params; mismatch fails before policy |
Access tokens | ES256 JWT, JWKS exposed, clock tolerance and short expiry applied |
Sessions | HttpOnly cookie, refresh that rotates |
Auth |
|
Injection | User values always prepared-statement parameters, never interpolated |
Replay | SHA-256 request fingerprint, reusable idempotency keys, conflict on reuse with a different body |
Agent writes | Preview branch only where supported, schema CAS on promotion, one-time approval, no production SQL tool; unsupported profiles fail closed |
MCP | No credential or token passthrough; row data needs explicit tenant-bound opt-in plus policy, and logs/prompts are marked untrusted |
Storage | Signed read grants with TTL, checksums, bounded objects, resumable leases with cleanup |
Errors | No secrets, SQL values, or stack traces; stable category codes |
Infrastructure | Backend stays on loopback behind a TLS reverse proxy; secrets mounted at runtime |
Security research is welcome. Source access makes review possible; it doesn't prove the absence of vulnerabilities.
How it compares
Mekka | Supabase | DIY on Postgres | |
Auth, Storage, Realtime, dashboard in one box | Yes | Yes | You build it |
Starts as a small single-node deployment | Yes; local SQLite is one Bun runtime, remote libSQL adds one data service | No, a managed service fleet | Usually several containers and operators |
Safe agent writes via preview branches | Yes in preview-capable profiles; self-hosted libSQL fails closed | Some branch support | You build it |
Prompt- and tool-driven changes stay off production | Yes, single Studio approval | Partial | You build it |
Supabase-js data subset for common CRUD | Yes, tested | Native | You write the adapter |
Works against a checked-out repo offline | Yes | No | No |
Native Postgres RLS, RPC, extensions | No, explicit error | Yes | Yes |
Infrastructure floor | One local Bun runtime, or Bun plus one libSQL primary | Managed cloud services | Database, gateway, auth, storage, monitoring, ops |
Run it
Install Node.js 20 or newer, then:
npx mekka my-appPass a folder name if the default mekka directory is taken. The CLI installs Bun when needed. Git is optional; without it, Mekka downloads the GitHub archive over HTTPS and enforces caps on archive size, extracted bytes, and entry count.
Inside an existing checkout:
bun install --frozen-lockfile
bun run devService | Address |
Studio |
|
Backend |
|
Local state stays in apps/studio/.local/.
Self-hosted libSQL profile
Run the pinned single-primary libSQL deployment behind Caddy HTTPS, issue a scoped EdDSA client JWT, and configure Mekka with server-only environment variables:
MEKKA_DATA_ENGINE=libsql-remote
MEKKA_LIBSQL_URL=https://libsql.example.com
MEKKA_LIBSQL_TOKEN_ENV=MEKKA_LIBSQL_TOKEN
MEKKA_LIBSQL_TOKEN=<scoped-client-jwt>docker compose -f deploy/libsql/compose.yaml up -d
bun run smoke:libsql
bun run --cwd apps/studio start:productionThe baseline is one writable primary with persistent storage. It is not multi-writer and does not claim automatic failover or PITR. Backups must be encrypted, stored off-host, and restored into an isolated volume during drills. See docs/runbooks/self-hosted-libsql.md.
Verification and development
bun run check runs the full gate: formatting, lint, typecheck (core and Studio), the CLI suite, workspace tests, Studio tests, the production build, and smoke tests.
Command | Purpose |
| Build the Studio SPA, then start the low-memory Studio and backend runtime |
| Start the memory-heavier Vite HMR server for Studio development |
| Run the core Bun tests |
| Run workspace test suites |
| Run Studio integration tests |
| Run Biome lint checks |
| Typecheck core packages |
| Typecheck Studio |
| Build packages and Studio |
| Test the production Studio path |
| Build a disposable authenticated libSQL container and verify CRUD, MCP row reads, restart, backup, and restore |
| Test the health service |
| Check dependency advisories |
Read CONTRIBUTING.md before opening a pull request.
Roadmap
Ready now | Still being built |
Local SQLite and authenticated remote libSQL under one typed engine contract | PostgreSQL data plane, JSONB, pgvector, and pooled protocol access |
Optional libSQL embedded replica with typed read routing and bounded sync | Managed PostgreSQL provisioning, backup status, PITR, and failover surfaces |
Auth: sessions, JWT/JWKS, OAuth, refresh | Cloud OAuth authorization server for remote MCP clients |
Storage: local and S3 providers, signed grants | Broader Storage compatibility and transforms |
Realtime changefeeds, Broadcast, Presence | Distributed Realtime coordinator |
Local preview branches with guarded promotion; optional Turso preview lifecycle | Self-hosted libSQL write previews, divergent data merge, multiple dependent migrations |
Scoped MCP schema reads and explicit bounded row reads | Multi-engine MCP and project RBAC/approval policy expansion |
Restricted Studio tables, SQL, Auth, Agent Access, and approvals | Functions provisioning and an edge runtime |
Supabase-js data subset, tested | Full PostgREST parity items |
Disposable libSQL CRUD/MCP/restart/restore smoke | Managed cloud monitoring and provider-operated recovery workflows |
Mekka is ready for controlled local and self-hosted libSQL beta testing. The current single-primary profile still requires operator-owned monitoring, off-host backups, restore drills, TLS, secret rotation, and capacity planning before it should carry important production data.
Repository map
Path | Purpose |
| Data, Storage, Realtime, compatibility, MCP mount |
| Database management, Auth, branches, approvals, local MCP |
| Agent resources, tools, and mutation workflow |
| Studio and production web server |
| Health check example |
| Sessions, JWT/JWKS, OAuth, token rotation |
| Database adapter and object storage |
| Local SQLite, remote libSQL, replica routing, typed outcomes |
| Changefeeds, channels, Broadcast, Presence |
| Preview lifecycle and guarded promotion |
| Migration artifacts, checkpoints, restore |
| Row and field authorization |
| SQLite schema contracts |
| Prepared SQLite statement compiler |
| Validated Data API queries |
| Tenant identity, capabilities, errors |
| Typed Studio API client |
| The |
| Project provisioning and connect analyzer |
| Supabase Studio provenance |
Support and security
Use GitHub Issues for reproducible bugs, questions, and feature requests. Report vulnerabilities privately through the process in SECURITY.md.
Mekka is under active development. Reviewed paths have tests. A production deployment still needs monitoring, verified backups, deployment hardening, and an independent security review.
License
Individuals may inspect, modify, test, and learn from the source. Qualifying small organizations may use Mekka in their products under the additional grant.
Large companies and cloud providers may not repackage Mekka as a competing hosted backend without a commercial agreement. LICENSE.md contains the terms.
WE'RE BUILDING THE REASON TO LEAVE SUPABASE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceAn MCP server that gives an AI agent scoped, safe access to your Postgres databases with per-connection access control, row caps, timeouts, and defense-in-depth read-only enforcement.
- AlicenseNot gradedqualityAmaintenanceRead-only SQLite access for AI agents in a single ~1 MB static binary. Query tool with row limits, list_tables, and table schemas exposed as MCP resources. The database is opened read-only, so writes fail at the SQLite layer. No Python, no Node, no runtime to install; SQLite is compiled in. Binaries for Linux, macOS, and Windows.MIT

Anythink-MCPofficial
AlicenseAqualityBmaintenanceBuild and run a complete backend from your agent: relational data with row-/field-level security, full-text + semantic + geo search, RBAC and BYOK, a workflow/automation engine, a growth & retention engine (email, push, promotions, per-user referral codes, rewards and points), payments and marketplace billing, and a growing catalog of integrations – the whole Anythink platform as one CLI-backed MC5166MIT- AlicenseNot gradedqualityAmaintenanceA hardened, read-only Postgres MCP server that enables LLMs to safely query databases without write, DDL, shell, or credential exposure.MIT
Related MCP Connectors
Butterbase MCP server — manage your backend: schemas, auth, functions, storage, RAG, deploys.
One PAT, any MCP agent: Vercel, GitHub, Cloudflare, Supabase, GCP — unified dev infra gateway.
The agent-native cloud: database, functions, AI, storage, computers. 50 tools, one API key.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yiaany/Mekka'
If you have feedback or need assistance with the MCP directory API, please join our Discord server




