Systembolaget MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Systembolaget MCP Server find Swedish beers under 50 SEK"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Systembolaget MCP Server
A Model Context Protocol (MCP) server for interacting with Systembolaget's APIs. This server provides tools for searching products, retrieving product details, finding stores, and getting store information.
Features
Available Tools
systembolaget_search_products - Search for products in Systembolaget's catalog
Filter by category, price range, alcohol content, country
Support for pagination
Returns detailed product information including taste profiles
systembolaget_get_product - Get detailed information about a specific product
Comprehensive product details
Taste profiles and food pairings
Serving suggestions
systembolaget_search_stores - Search for Systembolaget stores
Find stores by name or city
Shows store location, opening hours, and coordinates
Pagination support
Related MCP server: Cocktail
Installation
Prerequisites
Python 3.10 or higher
uv - Fast Python package installer
Note: No API key required! The server automatically extracts the API key from Systembolaget's website.
Setup with uv (Recommended)
Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | shClone this repository:
git clone https://github.com/fldc/systembolaget-mcp.git
cd systembolaget-mcpInstall dependencies:
uv syncOr install with development dependencies:
uv sync --all-extras(Optional) Configure a custom API key:
export SYSTEMBOLAGET_API_KEY="your-api-key-here"Or create a .env file:
SYSTEMBOLAGET_API_KEY=your-api-key-hereThe API key is optional. If not provided, the server will automatically extract it from Systembolaget's website.
Alternative: Setup with pip
If you prefer using pip:
pip install -e .
# Or with dev dependencies:
pip install -e ".[dev]"Usage
Running the Server
With Claude Desktop
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Using uv (Recommended):
{
"mcpServers": {
"systembolaget": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/systembolaget-mcp",
"run",
"systembolaget_mcp.py"
]
}
}
}Using Python directly:
{
"mcpServers": {
"systembolaget": {
"command": "python",
"args": ["/absolute/path/to/systembolaget-mcp/systembolaget_mcp.py"]
}
}
}Note: The env section with SYSTEMBOLAGET_API_KEY is optional. The server will automatically extract the API key if not provided.
Standalone Testing
Important: MCP servers communicate via JSON-RPC protocol. You cannot send plain text directly to the server.
Quick Test (Recommended):
# Test the server functions directly
uv run test_server.pyRun as MCP Server:
# This starts the JSON-RPC server (waits for JSON-RPC messages via stdin)
uv run systembolaget_mcp.pyFor detailed testing instructions, see TESTING.md.
Example Queries
Once connected through Claude Desktop, you can ask questions like:
"Search for Swedish beers under 50 SEK"
"Find wines from Italy with alcohol content between 12-14%"
"Show me stores in Stockholm"
"Get details for product number 12345"
"What are the opening hours for the store in Uppsala?"
Tool Reference
systembolaget_search_products
Search for products with various filters.
Parameters:
query(optional): Search query for product namecategory(optional): Filter by category (e.g., 'Öl', 'Vin', 'Sprit')min_price(optional): Minimum price in SEKmax_price(optional): Maximum price in SEKmin_alcohol(optional): Minimum alcohol percentage (0-100)max_alcohol(optional): Maximum alcohol percentage (0-100)country(optional): Filter by country of originlimit(optional): Number of results (default: 20, max: 100)offset(optional): Pagination offset (default: 0)format(optional): Response format - 'markdown' or 'json' (default: 'markdown')
Example:
{
"category": "Öl",
"country": "Sverige",
"max_price": 50,
"limit": 10
}systembolaget_get_product
Get detailed information about a specific product.
Parameters:
product_number(required): The product number (artikelnummer)format(optional): Response format - 'markdown' or 'json' (default: 'markdown')
Example:
{
"product_number": "12345"
}systembolaget_search_stores
Search for stores by name or location.
Parameters:
query(optional): Search query for store name or locationcity(optional): Filter by citylimit(optional): Number of results (default: 20, max: 100)offset(optional): Pagination offset (default: 0)format(optional): Response format - 'markdown' or 'json' (default: 'markdown')
Example:
{
"city": "Stockholm",
"limit": 5
}Development
Running Tests
With uv:
uv run pytestWith pip/venv:
pytestCode Formatting
With uv:
uv run black systembolaget_mcp.pyWith pip/venv:
black systembolaget_mcp.pyType Checking
With uv:
uv run mypy systembolaget_mcp.pyWith pip/venv:
mypy systembolaget_mcp.pyLinting
With uv:
uv run ruff check systembolaget_mcp.pyWith pip/venv:
ruff check systembolaget_mcp.pyAdding Dependencies
With uv:
uv add <package-name>
# For dev dependencies:
uv add --dev <package-name>With pip:
# Edit pyproject.toml manually, then:
pip install -e ".[dev]"API Key Extraction
This MCP server automatically extracts the API key from Systembolaget's website - no manual configuration needed!
How it works
The server uses the same technique as AlexGustafsson/systembolaget-api:
Fetches Systembolaget's main website
Extracts the Next.js app bundle path from the HTML
Downloads the app bundle JavaScript file
Extracts the
NEXT_PUBLIC_API_KEY_APIMvalueCaches the key for subsequent requests
This approach works because Systembolaget's public website uses the same API key in their frontend code.
Manual Configuration (Optional)
If you prefer to use a custom API key or if automatic extraction fails:
Create an account and subscribe to the APIs
Copy your API key
Set it as an environment variable:
SYSTEMBOLAGET_API_KEY=your-key
The server will use your custom key instead of extracting one automatically.
Architecture
The server is built using:
FastMCP: Anthropic's Python SDK for building MCP servers
Pydantic v2: For input validation and schema generation
httpx: For async HTTP requests
Type hints: Full type safety throughout
Design Principles
Agent-centric design: Tools are designed for complete workflows, not just API wrappers
Automatic API key extraction: No manual configuration required - keys are extracted automatically
Error handling: Comprehensive error handling with actionable messages
Pagination: All list operations support pagination to manage large result sets
Format flexibility: Both human-readable (Markdown) and machine-readable (JSON) outputs
Character limits: Responses are truncated to prevent overwhelming context windows
Caching: API keys are cached to minimize overhead
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Acknowledgments
Anthropic for the MCP SDK
Systembolaget for their API
AlexGustafsson/systembolaget-api for API reference
Support
For issues and questions:
Open an issue on GitHub
Check the MCP documentation
Review the Systembolaget API documentation
Available Tools
3 toolssystembolaget_get_productBRead-only
Get detailed information about a specific product.
Retrieves comprehensive details about a product including price, volume,
alcohol content, taste profile, food pairings, and availability.
Args:
params: Product parameters including product number and format
Returns:
str: Detailed product information
Inputs: params (required). Returns: result
systembolaget_search_productsARead-only
Search for products in Systembolaget's catalog.
This tool searches Systembolaget's product database with various filters like
category, price range, alcohol content, and country of origin. Returns detailed
product information including prices, volumes, and taste profiles.
Args:
params: Search parameters including query, filters, and pagination options
Returns:
str: Formatted list of matching products with details
Inputs: params (required). Returns: result
systembolaget_search_storesARead-only
Search for Systembolaget stores.
Find stores by name, location, or city. Returns store information including
addresses, phone numbers, and opening hours.
Note: The API returns all matching stores, so pagination is applied client-side.
This means all results are fetched from the API even when using pagination.
Args:
params: Search parameters including query, city filter, and pagination
Returns:
str: List of matching stores with details
Inputs: params (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools split cleanly along resource lines: products vs. stores, and within products, a filtered search vs. a single-item lookup by product number. The only mild overlap is between search_products and get_product, but the descriptions make the browse-vs-fetch-by-id distinction clear enough.
All three follow the same predictable pattern: a shared 'systembolaget_' prefix plus verb_noun (search_products, get_product, search_stores). No mixed conventions or vague verbs.
Three tools is on the thin side but each maps to a distinct, defensible operation (catalog search, product detail, store locator) for a read-only catalog API. It sits at the low end of the well-scoped range rather than being padded or redundant.
Core read workflows are covered, but there are notable gaps: no way to discover available filter/category values, no store detail-or-availability lookup, and no stock check at a specific store. Agents can partially work around these via search filters, but lifecycle coverage is thin even for a read-only domain.
Maintenance
Related MCP Connectors
Danish grocery catalog as MCP tools: live offers across all major chains, stores, EAN lookup, stock.
Extracts live product catalogs, pricing tiers, SKU variants, and stock availability from any Shopi
Extracts live product catalogs, pricing tiers, SKU variants, and stock availability from any Shop.
Extracts normalized product catalogs, live prices, variants, and availability from online stores.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides AI assistants with access to Finland's Alko alcohol product catalog, enabling product search across 11,900+ items, store availability checks, Vivino ratings lookup, and personalized recommendations based on food pairings and preferences.917MIT
- FlicenseAqualityDmaintenanceEnables natural language search for cocktail recipes and ingredient information through TheCocktailDB API. Supports searching by cocktail name, ingredient, category, or alcohol content to discover recipes and recommendations.5-
- AlicenseAqualityDmaintenanceEnables searching and retrieving listings from Sweden's Blocket marketplace, including cars, boats, motorcycles, and general items, without requiring an API key.6MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search and compare Norwegian grocery prices across multiple chains, retrieve price history, and access product details through the kassal.app API.MIT