One-Line Summary: Learn how to build a production-ready Model Context Protocol (MCP) server using Supabase Edge Functions and a Supabase Postgres database -- giving any AI agent (Claude, Cursor, Windsurf, etc.) the ability to query, create, update, and delete data in your database through natural language.

Prerequisites: Basic TypeScript/JavaScript knowledge, familiarity with REST APIs, a Supabase account (free tier works), and the Supabase CLI installed locally. No prior MCP experience required.


Course Modules

#ModuleFileDescription
1What is MCP and Why Does It Matter?01-what-is-mcp.mdThe problem MCP solves, core concepts, and why Supabase
2Architecture Overview02-architecture-overview.mdSystem diagram, JSON-RPC protocol, transport layer
3Setting Up Your Supabase Project03-setting-up-supabase.mdCLI install, project init, Edge Function scaffold
4Creating the Database Schema and Dummy Data04-database-schema-and-data.mdTables, views, indexes, triggers, and 27 products with sales history
5Building Your First MCP Server05-building-your-first-mcp-server.mdMinimal working server with Hono + MCP SDK
6Adding Database Tools (CRUD Operations)06-adding-database-tools.md5 tools: search, create, update, delete, sales summary
7Adding Resources (Read-Only Data Exposure)07-adding-resources.mdCategories, stats, and dynamic product detail resources
8Adding Prompts (Reusable Templates)08-adding-prompts.mdInventory report and product recommendation prompts
9Local Development and Testing09-local-development-and-testing.mdcURL tests, MCP Inspector, debugging
10Deploying to Production10-deploying-to-production.mdLink, push, deploy, and verify
11Connecting AI Agents to Your MCP Server11-connecting-ai-agents.mdClaude Desktop, Claude Code, and Cursor configuration
12Security, Authentication, and Best Practices12-security-and-best-practices.mdAPI key auth, RLS, and 8 production best practices
13Complete Source Code Reference13-complete-source-code.mdFull index.ts, file checklist, command cheatsheet, further reading

What We Are Building

A product inventory MCP server deployed on Supabase Edge Functions that lets AI agents:

  • Query products by name, category, or price range
  • Create, update, and delete products with validation
  • View sales analytics and inventory statistics
  • Use pre-built prompts for inventory reports and product recommendations

Quick Start

If you want to jump straight to the code, see Module 13: Complete Source Code Reference.

To follow the course step-by-step, start with Module 1: What is MCP?.