API-Dokumentation
Verbinden Sie Ihren KI-Agenten mit SwissDeals über das Model Context Protocol (MCP).
Verbindung
Der SwissDeals MCP-Server verwendet Streamable HTTP Transport. Richten Sie Ihren MCP-Client auf:
https://ohnrggilhranhskmeupc.supabase.co/functions/v1/mcp/v1/mcp
Der Server implementiert die Model Context Protocol-Spezifikation mit JSON-RPC 2.0 Messaging über HTTP.
Authentifizierung
Alle Anfragen erfordern eine Authentifizierung über eine von zwei Methoden:
1. API Key (recommended for MCP clients)
Übergeben Sie Ihren API-Schlüssel im x-api-key-Header:
x-api-key: sk_live_your_api_key_here
Erstellen Sie API-Schlüssel im Dashboard.
2. Supabase JWT
Falls über Supabase Auth authentifiziert, übergeben Sie das JWT-Zugriffstoken:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Ratenbegrenzungen
Zwei Ebenen der Ratenbegrenzung gelten:
- Pro Minute: 10 Anfragen pro Minute pro Benutzer
- Monatliche Kontingente: Abhängig von Ihrem Tarif (siehe Preise)
Wenn ein Limit überschritten wird, gibt der Server einen Fehler mit Code -32001 und einer beschreibenden Nachricht zurück.
Tools
Search for product prices across Swiss retailers. Returns products with prices, retailers, and availability. Includes weekly promotions. Consumes 1 search credit.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search query (1-200 chars) |
| language | string | No | Language: de, en, fr, it, ru (default: de) |
| region | string | No | Swiss region for local deals |
Look up a product by EAN barcode (8-13 digits) and find prices across Swiss retailers. Consumes 1 barcode credit.
| Parameter | Type | Required | Description |
|---|---|---|---|
| barcode | string | Yes | EAN/UPC barcode (8-13 digits) |
Extract items from a receipt photo (base64 JPEG/PNG) and find cheaper alternatives. Consumes 1 receipt credit.
| Parameter | Type | Required | Description |
|---|---|---|---|
| image | string | Yes | Base64-encoded receipt image |
| mimeType | string | Yes | image/jpeg or image/png |
Get all items on the user's price watchlist with current prices and deal status.
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters required. | |||
Add a product to the price watchlist. Set a target price for notifications. Subject to watchlist item limit.
| Parameter | Type | Required | Description |
|---|---|---|---|
| product_name | string | Yes | Product name (1-200 chars) |
| current_price | number | Yes | Current price (positive) |
| retailer | string | Yes | Retailer name |
| target_price | number | No | Target price for alerts |
| watch_type | string | No | product, keyword, or product_any (default: product) |
Update a watchlist item (change target price, status, or current price).
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Watchlist item ID |
| target_price | number | No | New target price |
| status | string | No | watching or deal |
| current_price | number | No | Updated current price |
Remove an item from the watchlist. This action cannot be undone.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Watchlist item ID to remove |
Trigger a price check for a specific watchlist item. Returns updated price. Consumes 1 search credit.
| Parameter | Type | Required | Description |
|---|---|---|---|
| item_id | integer | Yes | Watchlist item ID to check |
Get account info: tier, remaining quotas, billing period, region, and app download links.
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters required. | |||
Update user profile. Set region for region-specific deals. Set language for search results.
| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | No | One of 13 Swiss regions |
| language | string | No | de, en, fr, it, or ru |
Ressourcen
Statische Daten, verfügbar über die MCP resources/read-Methode:
List of supported Swiss retailers with name, type (supermarket, discounter, online, department), and URL.
Subscription tier definitions with quota limits and pricing for starter, free, basic, premium, and vip tiers.
List of 13 supported Swiss regions: Zurich, Bern, Basel, Lausanne, Geneve, Luzern, St. Gallen, Ticino, Aargau, Winterthur, Fribourg, Chur, Neuchatel.
Product categories: Food & Beverages, Household, Personal Care, Baby, Pet, Electronics, Home & Garden, Sports, Fashion.
Beispiel: Claude Desktop
Fügen Sie SwissDeals zu Ihrer Claude Desktop-Konfigurationsdatei (claude_desktop_config.json) hinzu:
{
"mcpServers": {
"swissdeals": {
"type": "streamable-http",
"url": "https://ohnrggilhranhskmeupc.supabase.co/functions/v1/mcp/v1/mcp",
"headers": {
"x-api-key": "sk_live_your_api_key_here"
}
}
}
}
Sobald verbunden, können Sie Claude Dinge fragen wie:
- "Search for Nespresso capsules and compare prices"
- "Scan this barcode: 7610200012920"
- "Add Nutella 750g at Migros (CHF 6.90) to my watchlist with a target of CHF 5.50"
- "Show me my watchlist"
- "What's my current account usage?"
Brauchen Sie Hilfe?
Kontaktieren Sie uns unter swissdealsapp@gmail.com für API-Support.