# TheCocktailDB Alternative MCP

> TheCocktailDB Alternative connects your AI agent directly to a global cocktail database. Search for recipes by name, filter drinks using specific ingredients or categories, and pull detailed instructions for mixology content. It gives your agent instant access to thousands of drink formulas, ingredient metadata, and professional recipe guidance.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** recipes, mixology, database-search, ingredients, beverages, culinary

## Description

Listen up. This server hooks your agent right into a massive global cocktail database. You're not just getting recipes; you're getting thousands of drink formulas, ingredient metadata, and professional mixology instructions in one place. Your AI client can instantly pull detailed step-by-step instructions for anything from classic drinks to modern concoctions, check deep details on ingredients, or narrow down results based on everything—glass type, alcohol content, even category.

### Finding Recipes by Name or Initial Letter

Need a specific drink? You use `search_cocktail_by_name` when you know the title, like 'Margarita,' and it pulls the full recipe. If you just remember the first letter but not the name, `search_cocktail_by_first_letter` gives you every cocktail that starts with a specific alphabet character.

If you're building out content about ingredients, you can search for details using a common item name through `search_ingredient_by_name`. This function helps you nail down exactly what an ingredient is before linking it to a recipe. 

### Filtering and Discovery Tools

You don’t always know the name of the drink, but you know *something* about it. You use `filter_by_category` when you want all recipes that fall under a single type, like 'Tropical' or 'Sour.' If your client needs to manage inventory for a themed event, `filter_by_ingredient` lists every cocktail that uses one or more specific ingredients you provide.

To guide those filters, the system gives you several reference tools. You use `list_categories` to see all available drink types in the database. For glassware constraints, run `list_glasses` to get a list of valid cocktail glass types for filtering. If you need to check alcohol content levels, `list_alcoholic_filters` returns all classifications—like Alcoholic or Non-Alcoholic—you can use as filters. Finally, if you just want random inspiration because the ideas are dry, calling `get_random_cocktail` spits out a full recipe for a totally random drink.

### Deep Dive Details and Utility

Once your agent finds a promising title or ID, it needs the full scoop. If you have a unique cocktail ID, `get_cocktail_details` pulls every piece of metadata available—the complete instructions, all ingredients, and everything else that makes up the drink. When you only care about what one item is, running `get_ingredient_details` gives you all the info for a single ingredient using its specific ID.

These tools let your agent act like an expert mixologist: it can use `list_ingredients` to get an exhaustive list of every tracked component. It can then combine that knowledge—say, filtering by 'Rum' via `filter_by_ingredient`, and then getting the full details on a specific Rum type using its ID via `get_ingredient_details`. You’ll find it makes writing content or managing menus way easier.

## Tools

### filter_by_category
Filters the database to show recipes that belong to a single specified cocktail category.

### filter_by_ingredient
Finds and lists all cocktails that use one or more specific ingredients you list.

### list_alcoholic_filters
Returns a list of available alcohol classifications (e.g., Alcoholic, Non-Alcoholic) to use as filters.

### list_categories
Provides a full list of all defined cocktail types or categories in the database.

### list_glasses
Returns a comprehensive list of cocktail glass types that can be used to filter recipes.

### list_ingredients
Provides an exhaustive list of every ingredient tracked in the database.

### get_cocktail_details
Pulls the complete recipe, instructions, and metadata for a cocktail when given its unique ID.

### get_ingredient_details
Retrieves all available information about a single ingredient using its specific ID.

### get_random_cocktail
Generates and returns the full details for a completely random drink recipe.

### search_ingredient_by_name
Searches the database to find details about an ingredient using its common name.

### search_cocktail_by_first_letter
Searches for all cocktails that start with a specific letter of the alphabet.

### search_cocktail_by_name
Finds and retrieves recipes for a cocktail when you provide its full name, like 'Margarita'.

## Prompt Examples

**Prompt:** 
```
Search for the recipe of a 'Margarita'.
```

**Response:** 
```
I've found the Margarita recipe. It requires Tequila, Triple Sec, and Lime Juice. I have the full step-by-step instructions and a high-quality image of the final drink. Ready to start mixing?
```

**Prompt:** 
```
What drinks can I make with 'Vodka'?
```

**Response:** 
```
Searching for Vodka-based drinks... I've found several popular options including the 'Moscow Mule', 'White Russian', and 'Cosmopolitan'. Would you like the recipe for any of these?
```

**Prompt:** 
```
Suggest a random cocktail for tonight.
```

**Response:** 
```
How about a 'Negroni'? It's a classic bitter-sweet drink made with Gin, Campari, and Sweet Vermouth. I can give you the exact proportions if you're interested.
```

## Capabilities

### Search Recipes by Name
Retrieves the full recipe and instructions when you provide a specific drink title.

### Filter by Ingredients
Shows all recipes that contain a specified ingredient, helping manage kitchen inventory or themed menus.

### Get Cocktail Details
Fetches the complete metadata for a drink when you provide its unique ID.

### List Available Filters
Provides lists of all valid cocktail categories, glasses, and ingredients to guide your searches.

### Generate Random Recipes
Pulls a completely random drink recipe when you need inspiration or content filler.

## Use Cases

### Developing a New Menu Section
A restaurant manager needs to create a 'Tropical Summer' section. They use `list_categories` to see available groups, then run `filter_by_category` for 'Fruity Drink'. Finally, they can cross-reference the results using `filter_by_ingredient` to ensure all selected drinks contain pineapple juice.

### Writing a Blog Post on Tequila
A content creator needs 10 cocktails that use tequila. They ask their agent to run `filter_by_ingredient` with 'Tequila'. The agent returns the list of drink names, which they then feed back into `get_cocktail_details` to pull all necessary recipes and images for the post.

### Quickly Finding a Recipe
A home enthusiast wants to make a 'Moscow Mule' but doesn't know if it uses lime. Instead of searching Google, they ask their agent. The agent immediately runs `search_cocktail_by_name` and provides the full ingredient list and measurements without delay.

### Cross-Referencing Ingredients
A bartender has a surplus of Campari. Instead of guessing what to make, they ask their agent to run `filter_by_ingredient` with 'Campari'. The tool instantly returns every cocktail that uses it, making inventory use immediate.

## Benefits

- You stop searching through generic web results. Instead, your agent uses `search_cocktail_by_name` to pull structured data: the exact steps, measurements, and images for a specific drink.
- Build themed menus instantly. Use `filter_by_ingredient` to find every cocktail that requires lime juice or gin. This is perfect for inventory matching or suggesting pairings.
- Get inspiration on demand. Running `get_random_cocktail` provides immediate content ideas without needing manual brainstorming sessions.
- Stop guessing what data exists. Use `list_categories`, `list_glasses`, and `list_ingredients` to see the full scope of metadata available before you start building a complex query.
- Handle diverse user needs. Whether someone asks for 'a sweet drink' (using category filters) or 'something with rum' (using ingredient filters), your agent routes them correctly.

## How It Works

The bottom line is that your AI client handles all the API calls; you just ask for what you want in plain English.

1. Subscribe to the server and enter your TheCocktailDB API Key into your AI client.
2. Ask your agent for recipes using natural language, letting it decide which tool (like `search_cocktail_by_name` or `filter_by_ingredient`) needs to run.
3. The agent executes the function call against the database and returns structured data—the recipe steps, ingredients, and images—to you.

## Frequently Asked Questions

**How do I find all drinks using a specific ingredient? (using filter_by_ingredient)**
Use `filter_by_ingredient`. You simply provide the name of the ingredient, and the tool returns every cocktail in the database that requires it. This is faster than manual searching.

**Can I search for a drink by its category? (using filter_by_category)**
Yes, run `filter_by_category`. You first use `list_categories` to see the accepted types, and then you pass that specific type to the filter tool.

**What if I just want some inspiration? (using get_random_cocktail)**
Just call `get_random_cocktail`. It pulls a complete recipe—name, ingredients, and steps—so you don't have to do the thinking work.

**How accurate is search_cocktail_by_name?**
It searches directly against the main database. Just provide the exact name of the cocktail (e.g., 'Margarita') for best results.

**What should I pass for the API Key when running a tool like `get_cocktail_details`?**
You must provide your dedicated TheCocktailDB API key. For initial testing, use '1' as recommended by the provider. Switching to your actual key later ensures reliable access and keeps you out of rate limits.

**Besides just a name, what kind of metadata does `get_ingredient_details` return?**
It returns full ingredient metadata. This includes usage type, potential substitutes, and specific measurements. Getting this detail is key for building complex inventory matching logic.

**Before I use `filter_by_category`, how do I list all available options?**
Just call the `list_categories` tool. It returns a structured JSON list of every category supported by the database. This lets you validate inputs and ensures your AI client uses the correct taxonomy name.

**If I only know part of the drink's name, is there a better way than searching everything?**
Use `search_cocktail_by_first_letter`. This function efficiently narrows your search scope. Instead of querying the entire database, it limits results based on the initial letter you provide.

**Can I search for cocktails that only contain a specific ingredient like Gin?**
Yes! Use the `filter_by_ingredient` tool with 'Gin'. It will return a list of all cocktails in the database that include Gin as one of their primary components.

**How do I get the full instructions and image for a specific drink?**
First, find the drink ID using `search_cocktail_by_name`. Then, use the `get_cocktail_details` tool with that ID to retrieve the high-res image URL, full ingredient list, and step-by-step instructions.

**Does the integration provide non-alcoholic drink options?**
Absolutely. You can use the `list_alcoholic_filters` tool to see available filters, and then use `filter_by_category` or specific search queries to identify 'Non_Alcoholic' drinks.