Developer Preview

Recipe app API and MCP for AI agents

TasteBuddy exposes an authenticated recipe API and local Model Context Protocol server for private recipe libraries. Developers and AI agents can search a user's saved recipes and fetch structured recipe details without bypassing user-scoped access checks.

This production developer preview is intentionally read-only. Recipe import, AI generation, image processing, subscription workflows, and long-running orchestration remain behind TasteBuddy app flows and Edge Functions.

What This Enables

Recipe API
PostgREST RPC endpoints for authenticated recipe search and recipe detail reads.
Recipe MCP
A stdio MCP server that exposes the same read-only recipe tools to AI assistants.
User-Scoped Access
Access is limited to recipes owned by the authenticated user, shared cookbooks, and household access.
AI Agent Ready
Structured JSON responses make recipe search and detail retrieval easy for assistants to cite and use.

Authentication

MCP and third-party clients send a Supabase Auth user access token to PostgREST. The production gateway may also require the project publishable key; the local MCP server supports this with TASTEBUDDY_SUPABASE_PUBLISHABLE_KEY.

Authorization: Bearer <USER_ACCESS_TOKEN>
Content-Type: application/json
Content-Profile: api

Production Endpoints

Base URL
https://epmcbwhdbxnteukryjdx.supabase.co
Local Base URL
http://127.0.0.1:54321
OAuth Status
The Supabase OAuth server is enabled and the consent screen is live at /oauth/consent/. Local stdio MCP setup does not use an OAuth redirect URI.

search_recipes

Searches recipes visible to the authenticated TasteBuddy user. Matching covers recipe title, description, ingredient names, and category names. Use this first when an agent needs to find candidate recipes.

Endpoint
/rest/v1/rpc/search_recipes
Schema Header
Content-Profile: api
Body
search_query, limit_count
Max Limit
50 results
curl "https://epmcbwhdbxnteukryjdx.supabase.co/rest/v1/rpc/search_recipes" \
  -H "Authorization: Bearer <USER_ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Content-Profile: api" \
  -d '{"search_query":"carbonara","limit_count":3}'

get_recipe

Returns one visible recipe with categories, sections, ingredients, instructions, timing, nutrition fields, notes, and source metadata. Inaccessible recipe IDs return null.

Endpoint
/rest/v1/rpc/get_recipe
Schema Header
Content-Profile: api
Body
recipe_id
Response
JSON object or null
curl "https://epmcbwhdbxnteukryjdx.supabase.co/rest/v1/rpc/get_recipe" \
  -H "Authorization: Bearer <USER_ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Content-Profile: api" \
  -d '{"recipe_id":1}'

TasteBuddy MCP

The local MCP server wraps the same API over stdio. It exposes read-only search_recipes and get_recipe tools and forwards the authenticated user token to Supabase.

Run locally
npm run mcp:tastebuddy
Verify locally
npm run mcp:tastebuddy:smoke
Required env
TASTEBUDDY_ACCESS_TOKEN
Optional env
TASTEBUDDY_SUPABASE_PUBLISHABLE_KEY

Add TasteBuddy to Codex, Claude, and Gemini

The current TasteBuddy MCP is a local stdio server. Add it to AI coding tools as a command that runs on your machine and passes a user access token through the environment. Do not register a Supabase OAuth app for this local setup.

Where does the redirect URI come from? For local stdio MCP, there is none. For hosted HTTP MCP or connected-app OAuth, the client tells you the exact callback URL. Codex derives one during codex mcp login, Claude Code's OAuth callback settings apply only to HTTP and SSE servers, and Gemini CLI defaults to http://localhost:<random-port>/oauth/callback unless redirectUri is configured.

Codex

Add this to ~/.codex/config.toml or a trusted project-scoped .codex/config.toml.

[mcp_servers.tastebuddy]
command = "npm"
args = ["run", "--silent", "mcp:tastebuddy"]
cwd = "/path/to/taste_buddy"

[mcp_servers.tastebuddy.env]
TASTEBUDDY_SUPABASE_URL = "https://epmcbwhdbxnteukryjdx.supabase.co"
TASTEBUDDY_ACCESS_TOKEN = "<USER_ACCESS_TOKEN>"
TASTEBUDDY_SUPABASE_PUBLISHABLE_KEY = "<SUPABASE_PUBLISHABLE_KEY>"

Claude Code

Add TasteBuddy as a user-scoped stdio server with the Claude Code CLI.

claude mcp add --scope user \
  --env TASTEBUDDY_SUPABASE_URL=https://epmcbwhdbxnteukryjdx.supabase.co \
  --env TASTEBUDDY_ACCESS_TOKEN=<USER_ACCESS_TOKEN> \
  --env TASTEBUDDY_SUPABASE_PUBLISHABLE_KEY=<SUPABASE_PUBLISHABLE_KEY> \
  --transport stdio tastebuddy -- \
  npm --prefix /path/to/taste_buddy run --silent mcp:tastebuddy

Gemini CLI

Add this to ~/.gemini/settings.json or a project-level .gemini/settings.json. Export the token variables in your shell before starting Gemini.

{
  "mcpServers": {
    "tastebuddy": {
      "command": "npm",
      "args": ["run", "--silent", "mcp:tastebuddy"],
      "cwd": "/path/to/taste_buddy",
      "env": {
        "TASTEBUDDY_SUPABASE_URL": "https://epmcbwhdbxnteukryjdx.supabase.co",
        "TASTEBUDDY_ACCESS_TOKEN": "$TASTEBUDDY_ACCESS_TOKEN",
        "TASTEBUDDY_SUPABASE_PUBLISHABLE_KEY": "$TASTEBUDDY_SUPABASE_PUBLISHABLE_KEY"
      },
      "timeout": 30000,
      "trust": false
    }
  }
}

FAQ

Does TasteBuddy have a recipe API?

Yes. TasteBuddy has an authenticated developer-preview recipe API for searching and reading recipes visible to a user account.

Does TasteBuddy support MCP?

Yes. TasteBuddy includes a local stdio MCP server with read-only search_recipes and get_recipe tools.

Can AI agents access private recipes?

Only with an authenticated user token. The API and MCP server use user-scoped recipe access checks.

How do I add TasteBuddy to Codex, Claude Code, or Gemini CLI?

Use the local stdio MCP config on this page. Codex uses config.toml, Claude Code can use claude mcp add, and Gemini CLI uses mcpServers in settings.json.

Where do I get the OAuth redirect URI?

You do not need one for the local stdio MCP. For hosted HTTP MCP or OAuth clients, use the exact redirect URI provided by Codex, Claude, Gemini, or whichever client starts the OAuth flow.

Local Sign In

For local testing, sign in with a local Supabase user that owns recipe fixtures or create a local account through the app.

curl "http://127.0.0.1:54321/auth/v1/token?grant_type=password" \
  -H "apikey: <SUPABASE_PUBLISHABLE_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"email":"<LOCAL_USER_EMAIL>","password":"<LOCAL_USER_PASSWORD>"}'