← Architecture Overview | Next: Database Schema and Data →
Step 1: Install Prerequisites
Install the Supabase CLI:
# macOS (Homebrew)
brew install supabase/tap/supabase
# npm (cross-platform)
npm install -g supabase
# Verify installation
supabase --versionEnsure you have:
- Docker Desktop running (required for local development)
- Node.js 20+ installed
- A Supabase account (free tier is fine)
Step 2: Create a New Supabase Project
Option A: Cloud Project (recommended for deploying)
- Go to supabase.com/dashboard
- Click "New Project"
- Choose an organization (or create one)
- Set a project name:
mcp-inventory - Set a database password (save this somewhere safe)
- Choose a region close to you
- Click "Create new project"
Once created, note your:
- Project Reference ID (from the URL:
https://supabase.com/dashboard/project/<project-ref>) - Project URL:
https://<project-ref>.supabase.co - Service Role Key: Found in Settings > API (keep this secret!)
Option B: Local-Only Development
You can develop entirely locally without a cloud project:
mkdir mcp-inventory
cd mcp-inventory
supabase init
supabase startThis spins up a full local Supabase stack (Postgres, Auth, Storage, Edge Functions) via Docker.
Step 3: Initialize the Project Structure
mkdir mcp-inventory
cd mcp-inventory
supabase initThis creates:
mcp-inventory/
├── supabase/
│ ├── config.toml # Supabase project configuration
│ ├── functions/ # Edge Functions live here
│ ├── migrations/ # Database migrations
│ └── seed.sql # Seed data (we'll create this)Step 4: Create the Edge Function
supabase functions new mcpThis creates supabase/functions/mcp/index.ts with a starter template. We will replace this with our MCP server code shortly.
Your project structure should now look like:
mcp-inventory/
├── supabase/
│ ├── config.toml
│ ├── functions/
│ │ └── mcp/
│ │ └── index.ts # Our MCP server (we'll write this)
│ ├── migrations/ # SQL migrations (we'll create these)
│ └── seed.sql # Dummy data (we'll create this)Next: Module 4 - Creating the Database Schema and Dummy Data →