# TheCocktailDB MCP

> TheCocktailDB. Access 600+ global cocktail recipes through one API endpoint. Use your AI client to search for drinks by name, filter ingredients (Vodka, Gin, Rum, etc.), browse types (Shot, Punch), or get step-by-step mixing instructions and glass guides instantly.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** recipe-database, mixology, ingredient-search, cooking-assistant, api-integration

## Description

You're dealing with cocktails. This server gives your AI client direct access to a massive library—over 600 global recipes. It’s not just a list; it's actionable mixology data, letting you build drinks or figure out what ingredients you have on hand.

If you know the drink name, you use the `search_cocktails` tool. You feed it the cocktail title—say, 'Mojito'—and it immediately spits out the full recipe record. That includes the specific ingredient list, precise measurements for every item, step-by-step mixing instructions, and even what kind of glass you need. It handles all that complex output in one shot.

Need a different way to find something? If you've got a spirit like Gin or Vodka, run `find_cocktails_by_ingredient`. You give it the base component, and it returns every single recipe across the entire database that uses that specific ingredient. It’s perfect for inventory checks.

Want to browse by drink style instead? Just use `browse_cocktail_category` and tell your agent whether you're looking at 'Shots,' or maybe a complex 'Punch/Party Drink.' It filters the whole collection down to just those types of recipes. 

If you already have a unique database ID for a cocktail, skip the searching and use `get_cocktail_details`. This tool fetches the complete, granular recipe record—the full truth about that single drink. You'll get every detail stored in its dedicated file.

Can't make up your mind? If you just need inspiration, ask for a random suggestion. The `get_random_cocktail` function pulls an immediate recommendation from the whole collection so you don’t have to do any searching at all.

It's built for efficiency. You tell it what you want—by name, by ingredient, or by category—and your agent handles the rest of the data retrieval. It keeps everything clean and focused on the recipe itself.

## Tools

### browse_cocktail_category
Lists all available cocktail recipes filtered by a specific type, like 'Shot' or 'Punch/Party Drink'.

### find_cocktails_by_ingredient
Retrieves every recipe that uses one or more specified alcoholic ingredients.

### get_cocktail_details
Fetches the full, specific details for a cocktail using its unique database ID.

### get_random_cocktail
Provides an immediate, randomized recipe suggestion when inspiration is needed.

### search_cocktails
Searches and returns full recipes—ingredients, measures, steps, and glass type—based on a cocktail name.

## Prompt Examples

**Prompt:** 
```
How do I make a Margarita?
```

**Response:** 
```
Classic Margarita recipe: 🧊 Rub the rim of a cocktail glass with lime juice, dip in coarse salt. Shake 1½ oz Tequila, 1 oz Lime Juice, and ½ oz Triple Sec with ice. Strain into the prepared glass. Garnish with a lime wheel. Serve in a Cocktail Glass.
```

**Prompt:** 
```
Show me a cocktail that includes Campari.
```

**Response:** 
```
Here is the 'Negroni': Combine 1 oz Gin, 1 oz Campari, and 1 oz Sweet Vermouth over ice. Stir it well and strain into a rocks glass. Garnish with a fresh orange peel.
```

**Prompt:** 
```
Give me a random drink recommendation.
```

**Response:** 
```
How about a 'Dark and Stormy'? It requires 2 oz Dark Rum poured over ice, topped high with Ginger Beer. Served in a Highball glass with a lime wedge.
```

## Capabilities

### Find recipes by name
You tell the agent a cocktail name (like 'Mojito'), and it returns the full recipe, ingredients, and mixing steps.

### Search cocktails by ingredient
You give the agent a spirit or mix component (e.g., 'Gin'), and it lists every cocktail that uses it.

### Browse drinks by type
You tell the agent you want to look at all 'Shots' or 'Coffee/Tea' recipes, and it pulls a list from those categories.

### Get full recipe details
Using a specific CocktailDB ID, the agent retrieves the complete, precise recipe record for that drink.

### Generate random ideas
You ask for inspiration, and the agent pulls a completely random cocktail recommendation.

## Use Cases

### Creating a themed menu section
A bar owner needs to populate a 'Tequila Cocktails' section. Instead of manually listing them, they use the agent with `find_cocktails_by_ingredient` and pass in 'Tequila'. The system immediately returns all relevant recipes for that section.

### Writing an article about drink types
A food blogger is writing a piece on 'Party Drinks.' They use `browse_cocktail_category` and select 'Punch/Party Drink'. This generates a list of examples, which the agent then uses with `search_cocktails` to grab full recipes for inclusion.

### Quickly solving a customer's query
A bartender answers a customer who just says 'something tropical.' The agent runs `get_random_cocktail` and suggests a recipe. The output gives the full ingredient list, allowing the bartender to start making it immediately.

### Validating API content
A developer needs to check if the database has a perfect record for an old drink called 'Blue Lagoon.' They use `get_cocktail_details` with the known ID. This guarantees they get the full, authoritative data set without ambiguity.

## Benefits

- Find recipes accurately. The `search_cocktails` tool handles the full recipe card, giving you ingredient lists, exact measurements, step-by-step instructions, and the correct glass type—all in one call.
- Filter by core ingredients easily. Instead of general searching, use `find_cocktails_by_ingredient` to pull a definitive list of every drink that uses a specific spirit like Rum or Tequila.
- Support diverse content types. The `browse_cocktail_category` tool lets you organize content by type (Shot, Punch, Coffee/Tea), making your app's navigation clean and predictable.
- Never run out of ideas. If the user is stuck on 'what to drink,' running `get_random_cocktail` provides an immediate, functional suggestion that needs zero user input.
- Maintain data accuracy. The `get_cocktail_details` tool lets you pull precise records using a known ID, which is vital for automated inventory or content validation.

## How It Works

The bottom line is you skip manual research. You tell your agent what data point matters—an ingredient, a name, or a category—and it delivers the recipe details directly.

1. Start by telling your AI client what you're looking for (e.g., 'I need a drink using whiskey').
2. The agent selects and calls the appropriate tool, like `find_cocktails_by_ingredient`, passing in 'whiskey'.
3. It returns a structured list of cocktails that match the criteria, including full recipes when requested.

## Frequently Asked Questions

**How do I use `search_cocktails`?**
You simply provide the name of the drink (e.g., 'Mai Tai'). It returns a full recipe card with ingredients, measures, mixing steps, and glass type.

**What if I want to find drinks using Gin? Do I use `find_cocktails_by_ingredient`?**
Yes. You run `find_cocktails_by_ingredient` and pass in 'Gin'. This tool automatically queries the entire database and returns every single cocktail that contains gin.

**Can I use `get_random_cocktail` for inspiration?**
Absolutely. If your users are stuck, running `get_random_cocktail` gives them a complete recipe suggestion instantly, perfect for a 'What should I drink?' widget.

**Do I need to know the ID before using `get_cocktail_details`?**
Yes. This tool requires the specific CocktailDB ID to work. If you don't have the ID, first use `search_cocktails` or `find_cocktails_by_ingredient` to get it.

**How do I browse by drink type with `browse_cocktail_category`?**
You call the tool and specify a category like 'Shot' or 'Punch/Party Drink.' It returns all recipes that fall under that specific classification.

**How do I get specific measurements and glass types using `search_cocktails`?**
The search results include precise metrics for every ingredient, such as '1½ oz Tequila,' and specify the correct glassware. This means your agent provides accurate mixing ratios and presentation instructions.

**Can `find_cocktails_by_ingredient` handle mixers or liqueurs like Champagne?**
Yes, you can use `find_cocktails_by_ingredient` for a wide range of inputs. While it covers major spirits (Vodka, Gin), it also indexes popular additions and modifiers to locate relevant recipes.

**After running `search_cocktails`, how do I get the full steps using `get_cocktail_details`?**
You first run `search_cocktails` to find your drink and retrieve its unique CocktailDB ID. Then, you pass that specific ID directly into `get_cocktail_details`. This guarantees you pull the complete, verified recipe instructions.

**Do I need an API key?**
No. TheCocktailDB provides free open access. No registration or API key required.

**Are measurements standardized across all recipes?**
Measurements on TheCocktailDB typically default to imperial measurements (oz, parts, dashes). They match exactly what the database provides.

**Can I search for non-alcoholic mocktails?**
Definitely! The DB maintains a 'Non-Alcoholic' category you can filter by when asking for a refreshing drink with zero ABV.