# TheCocktailDB Extended MCP

> TheCocktailDB Extended provides a deep connection to cocktail recipes and ingredients. Your agent can search for drinks by name, filter results by alcohol content or glass type, and look up specific ingredient properties. It handles complex filtering across multiple criteria, letting you find the perfect drink recipe instantly.

## Overview
- **Category:** gaming-entertainment
- **Price:** Free
- **Tags:** cocktails, recipes, mixology, bartending, drinks

## Description

This server connects your agent directly to a massive cocktail database. It makes your AI client an instant mixology expert, handling thousands of recipes and complex ingredient lookups.

When you need to find drinks, you've got several ways to start the search. You can use `search_cocktail_by_name` to pull up recipes when you know even a partial name. If you just remember the first letter, run `search_cocktail_by_first_letter` for a list of all cocktails starting with that alphabet character. To figure out what ingredients are available in the system, use `list_ingredients`, which gives you every known ingredient name. You can also check details on any specific component using `search_ingredient_by_name`, pulling up info by its common name, or if you have a unique ID, `get_ingredient_by_id` provides all the deep data you need.

The filtering capabilities are where this server really shines. It lets you narrow down choices with precision. You can limit results to specific presentation styles using `filter_by_glass`, which accepts input from `list_glasses` to show every available glass type. Similarly, if a drink has a certain profile—like 'Tropical' or 'Sour'—you filter by that type using `filter_by_category`, pulling the valid options list via `list_categories`. For filtering based on alcohol content, you use `filter_by_alcoholic` to narrow results down to alcoholic, non-alcoholic, or optional drinks; you can see all available statuses by running `list_alcoholic_filters`. If you know one ingredient that has to be in the drink, run `filter_by_ingredient` for a quick cut. For maximum specificity, and if you've got Premium access, use `filter_by_multi_ingredient`, which requires a combination of multiple ingredients you specify.

For deeper data retrieval, your agent can pull all the details on one single beverage using its unique ID via `get_cocktail_by_id`. You don't need to guess; if you know what it is, you get everything. To find inspiration or just want a surprise drink, you have options: run `get_random_cocktail` for one random recipe from the entire database, or check out the most commonly requested drinks with `get_popular_cocktails`. If you've got Premium access, you can also request ten different variety picks using `get_random_selection`, and see what came in today by calling `get_latest_cocktails`.

If you need a full picture of the filtering options available, use `list_categories` to show all defined types, or run `list_glasses` to list every glass type for your search. The tools handle complex queries so you just tell them what you want—for example, combining `filter_by_alcoholic` and `filter_by_glass` lets you instantly see a precise set of matching cocktails.

## Tools

### filter_by_alcoholic
Narrows down cocktail results based on whether they contain alcohol or not.

### filter_by_category
Filters the database to show only drinks belonging to a specific type, like 'Tropical' or 'Sour'.

### filter_by_glass
Limits results to cocktails served in a particular glass shape, such as a coupe or martini glass.

### filter_by_ingredient
Filters the list to show only drinks that contain one specific ingredient by name.

### filter_by_multi_ingredient
Requires Premium access. Filters cocktails based on a combination of multiple ingredients you specify.

### get_cocktail_by_id
Retrieves the full recipe and details for any single cocktail when given its unique database ID.

### get_ingredient_by_id
Looks up complete information on a specific ingredient using its unique identifier.

### get_latest_cocktails
Requires Premium access. Lists the most recently added cocktails to the database.

### get_popular_cocktails
Requires Premium access. Returns a list of the most commonly requested or popular drinks.

### get_random_cocktail
Fetches and returns details for one random cocktail recipe from the entire database.

### get_random_selection
Requires Premium access. Fetches a selection of 10 random cocktails to give you variety.

### list_alcoholic_filters
Lists all available statuses for filtering by alcohol content in the database.

### list_categories
Shows a list of every cocktail category defined in the database.

### list_glasses
Returns all available glass types so you know what to filter by when searching for presentation style.

### list_ingredients
Lists every ingredient known in the database, helping you see what's even searchable.

### search_cocktail_by_first_letter
Returns a list of all cocktails that start with a specific letter of the alphabet.

### search_cocktail_by_name
Searches for and finds cocktail recipes using a known or partial name string.

### search_ingredient_by_name
Finds details about an ingredient by searching its common name in the database.

## Prompt Examples

**Prompt:** 
```
Search for a cocktail named 'Margarita' and show me the recipe.
```

**Response:** 
```
I found the Margarita! It's an Ordinary Drink served in a Margarita glass. Ingredients include Tequila, Triple sec, and Lime juice. Would you like the step-by-step instructions?
```

**Prompt:** 
```
What are some popular cocktails I can make?
```

**Response:** 
```
Using your premium access, I've retrieved the most popular cocktails. The list includes the Mojito, Old Fashioned, and Espresso Martini. Which one would you like to see the details for?
```

**Prompt:** 
```
List all ingredients that are classified as 'Alcoholic'.
```

**Response:** 
```
I've pulled the list of alcoholic filters. You can filter cocktails by categories like 'Alcoholic', 'Non_Alcoholic', and 'Optional_Alcohol'. Would you like to see drinks from one of these categories?
```

## Capabilities

### Filter by alcohol status
Limits cocktail results to alcoholic, non-alcoholic, or optional drinks using `filter_by_alcoholic`.

### Search recipes by name
Finds a specific cocktail recipe when you know the exact title with `search_cocktail_by_name`.

### Filter by ingredient
Narrows down cocktails to only those containing one specified item, like lime juice, using `filter_by_ingredient`.

### Find popular or random drinks
Retrieves curated lists of the most popular cocktails (`get_popular_cocktails`) or just gives you a single surprise recipe via `get_random_cocktail`.

### Get full drink details by ID
Looks up every detail for one specific cocktail using its unique identifier with `get_cocktail_by_id`.

## Use Cases

### The 'I have nothing' party scenario
You walk into a kitchen with only whiskey, bitters, and lemon juice. Instead of panicking, you ask your agent: 'What can I make with these ingredients?' The agent uses `filter_by_ingredient` for each item to find recipes that contain the required combination, solving the menu crisis instantly.

### The developer needs a dataset
A backend engineer needs 50 unique drinks for testing. They use `get_random_selection` (Premium) in their workflow to pull a diverse batch of cocktail data, validating ingredient relationships and IDs without needing to manually build a complex SQL query.

### The themed party planner
You're planning an 'Italian Riviera' night. You ask your agent to find all cocktails that are both in the 'Italian' category (`filter_by_category`) AND served in a specific type of glass (`filter_by_glass`), guaranteeing theme consistency.

### Checking ingredient availability
A restaurant needs to know if they can serve any cocktail using only the ingredients currently stocked. They first run `list_ingredients` and then use `search_ingredient_by_name` on their current stock list, ensuring zero waste.

## Benefits

- Eliminate guesswork when hosting. Instead of guessing what works, you can ask your agent to use `filter_by_ingredient` with the three unique things you have on hand (e.g., 'rum', 'pineapple', 'lime'). It instantly pulls a recipe that uses exactly those components.
- Build faster apps by treating data as code. Developers bypass manual database queries; they just call tools like `get_cocktail_by_id` to get complete JSON objects for testing the entire cocktail lifecycle directly from their IDE.
- Never settle for an incomplete search again. You can combine filters—like asking for non-alcoholic drinks (`filter_by_alcoholic`) that are also in a specific category (`filter_by_category`) and served in a particular glass type (`filter_by_glass`).
- Quickly check the market trends. Use `get_popular_cocktails` (Premium) to see what's trending, or use `list_categories` to find niche types you never knew existed.
- Speed up research dramatically. Instead of jumping through dozens of recipe blogs, your agent runs a single tool call like `search_cocktail_by_name('Mojito')`, and the full, structured data comes right back.

## How It Works

The bottom line is: you tell the AI what you want, and it runs the specific combination of tools needed to find the exact recipe in the database.

1. First, you ask your agent to perform a search. For instance, 'Find me cocktails that use tequila and are non-alcoholic.'
2. The server executes multiple tools: it uses `filter_by_alcoholic` for the status and then runs `filter_by_multi_ingredient` (if available) or successive single filters.
3. Your agent gets back a precise, filtered list of cocktails that match all criteria. You can then request full details for any result using `get_cocktail_by_id`.

## Frequently Asked Questions

**How do I find drinks that use multiple ingredients? (filter_by_multi_ingredient)**
You must use the `filter_by_multi_ingredient` tool. This requires a Premium API key, but it lets your agent check for combinations of several items at once, which single filters can't do.

**What is the difference between searching by name and filtering? (search_cocktail_by_name vs filter_by_category)**
Use `search_cocktail_by_name` when you know the title, like 'Mojito.' Use `filter_by_category` when you only know the style, like 'Tropical,' and want to see all potential candidates.

**Can I list every ingredient in the database? (list_ingredients)**
Yes, running `list_ingredients` returns a full inventory of all known ingredients. This is useful for checking if an obscure item you have on hand is even recognized by the system.

**How do I find popular drinks? (get_popular_cocktails)**
You need to call `get_popular_cocktails`. Remember, this tool requires a Premium API key. It gives you the current best-sellers so you don't have to guess.

**What is the most reliable way to check details for one drink? (get_cocktail_by_id)**
The most direct method is using `get_cocktail_by_id`. If you already know the unique ID, this tool pulls every single piece of data—ingredients, glass type, etc.—without any guesswork.

**If I want to use advanced filtering like `filter_by_multi_ingredient`, how do I check my API key status?**
You must verify your subscription tier and API key validity before calling this tool. If you hit a limit or need premium features, the server will return an explicit rate-limit error. Check our documentation for upgrade options.

**Before I use `filter_by_category`, how can I see all available cocktail types?**
Use the `list_categories` tool first. This provides a comprehensive list of every filter option you can apply. It's best practice to run this before building complex queries.

**I don't know what drink I want. Can I use `get_random_cocktail` for inspiration?**
Yes, that's exactly what it's for. Calling `get_random_cocktail` fetches a complete recipe instantly without needing any input parameters or filters.

**Can I find non-alcoholic drink recipes using this server?**
Yes! You can use the `filter_by_alcoholic` tool with the status 'Non_Alcoholic' to retrieve a list of mocktails and non-alcoholic beverages.

**How can I get a random cocktail suggestion for inspiration?**
Simply use the `get_random_cocktail` tool. It will return full details, including ingredients and instructions, for one randomly selected drink from the database.

**Is it possible to search for cocktails by a specific ingredient like Gin or Vodka?**
Absolutely. Use the `filter_by_ingredient` tool and provide the name of the ingredient to see all cocktails that include it in their recipe.