openapi: 3.1.0
info:
  title: Hungry Goblin API
  version: 1.0.0
  description: OAuth-protected MCP meal-decision API
servers:
  - url: https://hungrygoblin.com
  - url: https://zonykdtrkbptszqellsn.supabase.co/functions/v1/mcp-server
paths:
  /mcp:
    get:
      summary: MCP server entry
    post:
      summary: MCP JSON-RPC
      security:
        - oauth2: recipes:read recipes:write recipes:delete history:read history:write history:delete suggestions:read search:read offline_access
  /api:
    get:
      summary: API index
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://zonykdtrkbptszqellsn.supabase.co/functions/v1/oauth-server/authorize
          tokenUrl: https://zonykdtrkbptszqellsn.supabase.co/functions/v1/oauth-server/token
          scopes:
            recipes:read: View your recipes
            recipes:write: Create and edit recipes
            recipes:delete: Delete recipes
            history:read: View cooking history
            history:write: Log meals you've cooked
            history:delete: Delete history entries
            suggestions:read: Get meal suggestions
            search:read: Search recipes
            offline_access: Maintain access when offline (refresh tokens)
