{
  "name": "Hungry Goblin API",
  "version": "1.0.0",
  "description": "Meal-decision API via MCP (Streamable HTTP) with OAuth 2.1 scoped access.",
  "openapi": "https://hungrygoblin.com/openapi.json",
  "documentation": "https://hungrygoblin.com/developers",
  "mcp_endpoint": "https://hungrygoblin.com/mcp",
  "mcp_server_upstream": "https://zonykdtrkbptszqellsn.supabase.co/functions/v1/mcp-server",
  "authentication": {
    "type": "oauth2",
    "issuer": "https://hungrygoblin.com",
    "authorization_server_metadata": "https://hungrygoblin.com/.well-known/oauth-authorization-server",
    "protected_resource_metadata": "https://hungrygoblin.com/.well-known/oauth-protected-resource",
    "registration_endpoint": "https://zonykdtrkbptszqellsn.supabase.co/functions/v1/oauth-server/register",
    "pkce_required": true,
    "scopes": [
      {
        "name": "recipes:read",
        "description": "View your recipes"
      },
      {
        "name": "recipes:write",
        "description": "Create and edit recipes"
      },
      {
        "name": "recipes:delete",
        "description": "Delete recipes"
      },
      {
        "name": "history:read",
        "description": "View cooking history"
      },
      {
        "name": "history:write",
        "description": "Log meals you've cooked"
      },
      {
        "name": "history:delete",
        "description": "Delete history entries"
      },
      {
        "name": "suggestions:read",
        "description": "Get meal suggestions"
      },
      {
        "name": "search:read",
        "description": "Search recipes"
      },
      {
        "name": "offline_access",
        "description": "Maintain access when offline (refresh tokens)"
      }
    ],
    "self_serve": {
      "signup": "https://hungrygoblin.com/auth",
      "connect_mcp": "https://hungrygoblin.com/connect",
      "dynamic_client_registration": "https://zonykdtrkbptszqellsn.supabase.co/functions/v1/oauth-server/register",
      "free_tier": true,
      "sandbox": "Use your own Hungry Goblin account — OAuth scopes limit access to your recipes only."
    }
  },
  "errors": {
    "format": "JSON object with error, error_description, code, documentation, and optional hint",
    "examples": {
      "not_found": {
        "error": "not_found",
        "error_description": "The requested resource does not exist.",
        "code": 404,
        "documentation": "https://hungrygoblin.com/developers#errors",
        "hint": "See /openapi.json for the full API surface."
      },
      "unauthorized": {
        "error": "unauthorized",
        "error_description": "Valid OAuth access token required.",
        "code": 401,
        "documentation": "https://hungrygoblin.com/developers#authentication",
        "hint": "Start OAuth at /.well-known/oauth-authorization-server"
      },
      "json_rpc": {
        "jsonrpc": "2.0",
        "id": 1,
        "error": {
          "code": -32601,
          "message": "Method not found",
          "data": {
            "documentation": "https://hungrygoblin.com/developers#mcp-tools"
          }
        }
      }
    }
  }
}
