Bar Assistant MCP Server

Bar Assistant MCP Server

Enables management of your home bar inventory and cocktail discovery through Bar Assistant. View shelf ingredients, find cocktails you can make, and add or remove items from your bar collection.

Category
访问服务器

README

Bar Assistant MCP Server

An MCP (Model Context Protocol) server for Bar Assistant - manage your home bar shelf and discover cocktails you can make.

Features

  • 📋 View ingredients on your bar shelf
  • 🍸 See cocktails you can make with what you have
  • ➕ Add ingredients to your shelf
  • ➖ Remove ingredients from your shelf
  • 🔍 Search for ingredients by name
  • 🏪 Discover your available bars
  • 🧪 Create new ingredients
  • 🍹 Create new cocktail recipes
  • ✏️ Update existing cocktail recipes

Installation

Using uvx (Recommended)

Run directly with uvx:

uvx --from git+https://github.com/the-real-py/bar-assistant-mcp bar-assistant-mcp \
  https://bar.johnprovost.com/bar/api \
  your_token_here \
  1

Or set environment variables in .env and run:

uvx --from git+https://github.com/the-real-py/bar-assistant-mcp bar-assistant-mcp

Using pip

pip install git+https://github.com/the-real-py/bar-assistant-mcp
bar-assistant-mcp

Configuration

Create a .env file in your project directory:

BAR_ASSISTANT_API_URL=https://bar.johnprovost.com/bar/api
BAR_ASSISTANT_TOKEN=your_bearer_token_here
BAR_ASSISTANT_BAR_ID=1

Or pass them as command-line arguments:

bar-assistant-mcp <api_url> <token> <bar_id>

Getting Your Credentials

  1. API URL: Your Bar Assistant instance URL + the API path
    • Standard setup: http://localhost:8000/api
    • Custom setup: Check your reverse proxy configuration (e.g., https://bar.example.com/bar/api)
  2. Token: Generate a personal access token from your Bar Assistant profile settings
  3. Bar ID: Use the list_bars tool to find your bar ID, or it's usually 1 for your first bar

Important: The BAR_ASSISTANT_BAR_ID is optional. If you don't set it, you can provide the bar_id parameter when calling tools, or use the list_bars tool first to discover your available bars.

Usage with Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "bar-assistant": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/the-real-py/bar-assistant-mcp",
        "bar-assistant-mcp",
        "https://bar.johnprovost.com/bar/api",
        "your_token_here",
        "1"
      ]
    }
  }
}

Or using environment variables:

{
  "mcpServers": {
    "bar-assistant": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/the-real-py/bar-assistant-mcp",
        "bar-assistant-mcp"
      ],
      "env": {
        "BAR_ASSISTANT_API_URL": "https://bar.johnprovost.com/bar/api",
        "BAR_ASSISTANT_TOKEN": "your_token_here",
        "BAR_ASSISTANT_BAR_ID": "1"
      }
    }
  }
}

Available Tools

list_bars

Discover all bars you have access to and get their IDs.

get_shelf_ingredients

List all ingredients on your bar shelf.

Parameters:

  • bar_id (optional): Bar ID to query
  • page (optional): Page number for pagination

get_shelf_cocktails

See all cocktails you can make with your current ingredients.

Parameters:

  • bar_id (optional): Bar ID to query
  • page (optional): Page number for pagination

add_ingredients_to_shelf

Add ingredients to your shelf by their IDs.

Parameters:

  • ingredient_ids (required): Array of ingredient IDs
  • bar_id (optional): Bar ID to update

remove_ingredients_from_shelf

Remove ingredients from your shelf.

Parameters:

  • ingredient_ids (required): Array of ingredient IDs
  • bar_id (optional): Bar ID to update

search_ingredients

Search for ingredients by name to find their IDs.

Parameters:

  • name (required): Ingredient name to search for
  • bar_id (optional): Bar ID context

create_ingredient

Create a new ingredient in the bar database. Use this when an ingredient doesn't exist and needs to be created before adding to a cocktail.

Parameters:

  • name (required): Name of the ingredient
  • strength (optional): Alcohol strength/percentage (e.g., 40 for 40% ABV)
  • description (optional): Description of the ingredient
  • origin (optional): Origin/country of the ingredient
  • color (optional): Hex color code (e.g., '#ffffff')
  • parent_ingredient_id (optional): Parent ingredient ID for categorization
  • units (optional): Default units for this ingredient (e.g., 'ml', 'oz', 'dash')
  • bar_id (optional): Bar ID context

create_cocktail

Create a new cocktail recipe. First use search_ingredients to find ingredient IDs, then use create_ingredient for any missing ingredients.

Parameters:

  • name (required): Name of the cocktail
  • instructions (required): Step-by-step instructions for making the cocktail
  • ingredients (required): Array of ingredients with:
    • ingredient_id (required): ID of the ingredient
    • amount (required): Amount of the ingredient
    • units (optional): Units for the amount (e.g., 'ml', 'oz', 'dash')
    • optional (optional): Whether this ingredient is optional
    • note (optional): Additional note for this ingredient
    • sort (optional): Sort order for the ingredient
  • description (optional): Description of the cocktail
  • garnish (optional): Garnish for the cocktail
  • source (optional): Source/origin of the recipe
  • glass_id (optional): ID of the glass type to use
  • method_id (optional): ID of the mixing method (shaken, stirred, etc.)
  • tags (optional): Array of tags for the cocktail
  • bar_id (optional): Bar ID context

Example - Creating a Margarita:

1. search_ingredients(name="tequila") → ID: 45
2. search_ingredients(name="lime juice") → ID: 89  
3. search_ingredients(name="triple sec") → ID: 23
4. create_cocktail(
     name="Margarita",
     instructions="1. Add all ingredients to shaker with ice\n2. Shake well\n3. Strain into salt-rimmed glass",
     ingredients=[
       {"ingredient_id": 45, "amount": 60, "units": "ml"},
       {"ingredient_id": 89, "amount": 30, "units": "ml"},
       {"ingredient_id": 23, "amount": 30, "units": "ml"}
     ],
     garnish="Lime wheel, salt rim"
   )

update_cocktail

Update an existing cocktail recipe. Use this to modify the name, instructions, ingredients, or other details of a cocktail.

Parameters:

  • id (required): ID of the cocktail to update
  • name (required): Name of the cocktail
  • instructions (required): Step-by-step instructions for making the cocktail
  • ingredients (required): Array of ingredients with:
    • ingredient_id (required): ID of the ingredient
    • amount (required): Amount of the ingredient
    • units (optional): Units for the amount (e.g., 'ml', 'oz', 'dash')
    • optional (optional): Whether this ingredient is optional
    • note (optional): Additional note for this ingredient
    • sort (optional): Sort order for the ingredient
  • description (optional): Description of the cocktail
  • garnish (optional): Garnish for the cocktail
  • source (optional): Source/origin of the recipe
  • glass_id (optional): ID of the glass type to use
  • method_id (optional): ID of the mixing method (shaken, stirred, etc.)
  • tags (optional): Array of tags for the cocktail
  • bar_id (optional): Bar ID context

Resources

  • bar://shelf/ingredients - Your bar shelf ingredients
  • bar://shelf/cocktails - Cocktails you can make

Development

Clone and install in development mode:

git clone https://github.com/the-real-py/bar-assistant-mcp
cd bar-assistant-mcp
pip install -e .

Troubleshooting

Finding Your API URL

The Bar Assistant API URL depends on your setup:

  1. Standard Docker setup: http://localhost:8000/api
  2. Custom reverse proxy: Check your nginx/Traefik configuration for the API route
  3. Cloud hosted: Usually provided by your hosting service

To verify your API URL is correct, run:

curl -H "Accept: application/json" YOUR_API_URL/server/version

You should get a JSON response with version information.

License

MIT

Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选