App MCP
by elvinbaghele
README.md
# App MCP
Turn an existing Supabase database and Edge Functions into an MCP server you can install in Cursor, Claude, ChatGPT, or any MCP client.
This is not the official Supabase management MCP. That product runs SQL, migrations, and org admin. This one exposes **your app**: selected tables (with RLS) and your Edge Functions as tools.
## What you get
1. Connect a Supabase project.
2. Pick tables and operations, register Edge Functions with a JSON Schema.
3. Install the same tool catalog two ways:
- **Hosted:** paste a Streamable HTTP URL and API key into any client.
- **Self-host:** run the server on your machine so Supabase keys never leave it.
## Monorepo
```
apps/web Dashboard + hosted /mcp/:projectId endpoint
packages/mcp-core Schema introspect, tool catalog, executors
packages/mcp-server MCP factory, stdio CLI, local HTTP
examples/mcp-config.json Sample self-host config
```
## Dashboard
```bash
npm install
cp .env.example .env
npm run dev
```
Open [http://localhost:3000](http://localhost:3000). Persistence defaults to `apps/web/data/store.json`. Set `DASHBOARD_PASSWORD` to lock the UI. Set `PRODUCT_SUPABASE_URL` and `PRODUCT_SUPABASE_SERVICE_ROLE_KEY` (and run `supabase/migrations/001_init.sql`) to store projects in your own Supabase instead.
Customer `service_role` keys are encrypted at rest. Table tools use the anon key so RLS applies unless you opt into the service role.
## Self-host / local MCP
```bash
cp .env.example .env
# fill SUPABASE_URL and SUPABASE_ANON_KEY
npm run mcp -- tools
npm run mcp -- serve --stdio
npm run mcp -- serve --http --port 3333
```
Cursor `mcp.json`:
```json
{
"mcpServers": {
"my-app": {
"command": "npx",
"args": ["tsx", "packages/mcp-server/src/cli.ts", "serve", "--stdio"],
"env": {
"SUPABASE_URL": "https://xxxx.supabase.co",
"SUPABASE_ANON_KEY": "eyJ...",
"MCP_CONFIG": "./examples/mcp-config.json"
}
}
}
}
```
Inspector:
```bash
npx @modelcontextprotocol/inspector npx tsx packages/mcp-server/src/cli.ts serve --stdio
```
Hosted clients use:
```json
{
"mcpServers": {
"my-app": {
"url": "http://localhost:3000/mcp/PROJECT_ID",
"headers": {
"Authorization": "Bearer smcp_..."
}
}
}
}
```
## Tests
```bash
npm test
```
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues