Skip to main content
DEVELOPER HUB • MCP v2 & REST API OpenSearch 512d k-NN + JSON-RPC 2.0 9 Locales (PL, DE, EN, FR, NL, CZ, AT, CH, LU)

Nutrition Data Infrastructure for AI Agents & Medical Applications

Connect LLMs (Claude, ChatGPT, Gemini, Cursor) via native Model Context Protocol or build custom apps with our high-speed REST API.

Model Context Protocol (MCP) /_mcp

MCP Server for AI Agents & LLMs

21 native tools for 512d vector search and diet, recipe, and workout management.

RESTful JSON API /api/v1/*

Standard REST API (OpenAPI 3.1)

Low latency, deterministic JSON payloads, and 9-locale filtering for web and mobile apps.

Specyfikacja Techniczna

Porównanie Architektury MCP v2.0 oraz REST API v1

JSON-RPC 2.0 + REST
Warstwa MCP v2.0 REST API v1
Transport https://www.dietspremium.com/_mcp https://www.dietspremium.com/api/v1
Pakiet CLI / SDK npx -y dietspremium-mcp fetch, axios, cURL
Autoryzacja DIETSPREMIUM_API_KEY Authorization: Bearer
Identyfikatory Base64 key (McpKeyCodec) id / slug / key
Silnik AI OpenSearch 512d k-NN + BM25 Parametr ai=true
Szybki Start

Konfiguracja Klienta AI & REST cURL

dietspremium-mcp / rest-api-v1 — configuration
MCP stdio & HTTP READY
npx -y dietspremium-mcp --url https://www.dietspremium.com/_mcp
{
  "mcpServers": {
    "dietspremium": {
      "command": "npx",
      "args": ["-y", "dietspremium-mcp"],
      "env": {
        "DIETSPREMIUM_API_KEY": "YOUR_MCP_KEY"
      }
    }
  }
}
Katalog Zasobów dla Programistów i Agentów AI

Kafelki Domenowe — Narzędzia MCP (/_mcp/*) i Endpointy REST API (/api/v1/*)

Allergen Risk & Intolerance Registry 512d k-NN

Dietary allergens, cross-contamination risks, EU 1169/2011 allergen standards, and ingredient intolerance profiles.

Clinical Nutrition Guides & RAG Grounding 512d k-NN

Search 6,000+ peer-reviewed nutrition articles, clinical guidelines, and wellness guides for agent grounding and citations.

Dietetic Catering & Clinic Directory 512d k-NN

Search 173,000+ health clinics, dietetic catering providers, gyms, and wellness brands with geo-location metadata.

Exercise Biomechanics & Calorie Burn 512d k-NN

Search 2,000+ workout exercises with targeted anatomical muscle groups, required equipment, and execution guidelines.

Nutritional Database & Macro Search 512d k-NN

Search 1,900+ verified foods with complete macronutrients, calorie filters, micronutrients, and allergen exclusions.

Pharmacology & Food-Drug Interactions 512d k-NN

Database of 53,000+ active substances evaluating critical food-drug interactions, absorption interference, and nutrient depletion.

Culinary Recipes & Macro Balancing 512d k-NN

Search 780+ chef-curated recipes with preparation steps, ingredients with gram weights, portion macronutrients, and difficulty levels.

Specialists & Certified Dietitians 512d k-NN

Search verified clinical dietitians, sports nutritionists, and certified personal trainers for client assignment.

Supplements & Active Dosages 512d k-NN

Dietary supplements catalog with active compound dosages, vitamin forms, and safety guidance.

Clinical & Lifestyle Diet Templates (158 Types) 512d k-NN

Official nutritionist-designed diet templates with multi-currency pricing, day duration (3-28 days), macro splits, and allergen avoidance.

Global Food Products & Barcodes (Open Food Facts + USDA) 512d k-NN

Search 3.5M+ global branded products, EAN/UPC barcodes, brands, Nutri-Score, Eco-Score, and international ingredients.

search_food_world /_mcp/search/food-world
Clinical Knowledge & Dietetic Grounding 512d k-NN

Clinical nutrition guidelines, scientific dietary facts, medical definitions, and evidence-based grounding.

Tabela Zbiorcza Narzędzi MCP i Endpointów REST API

Domena Narzędzie MCP Endpoint REST API
Allergen Risk & Intolerance Registry search_allergen POST /api/v1/allergen
Clinical Nutrition Guides & RAG Grounding search_article POST /api/v1/article
Dietetic Catering & Clinic Directory search_company POST /api/v1/company
Exercise Biomechanics & Calorie Burn search_exercise POST /api/v1/exercise
Nutritional Database & Macro Search search_food POST /api/v1/food
Pharmacology & Food-Drug Interactions search_medication POST /api/v1/medication
Culinary Recipes & Macro Balancing search_recipe POST /api/v1/recipe
Specialists & Certified Dietitians search_user POST /api/v1/specialist
Supplements & Active Dosages search_supplement POST /api/v1/supplement
Clinical & Lifestyle Diet Templates (158 Types) search_diet POST /api/v1/diet
Global Food Products & Barcodes (Open Food Facts + USDA) search_food_world /_mcp/search/food-world
Clinical Knowledge & Dietetic Grounding search_knowledge POST /api/v1/knowledge
terminal — mcp tools/call & rest api response
JSON-RPC 2.0 200 OK
curl -s -X POST https://www.dietspremium.com/_mcp -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_MCP_KEY"
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Found 1 matching food: Łosoś atlantycki świeży (key: MTQ=, 208 kcal, P: 20.4g, F: 13.4g, C: 0.0g)"
      }
    ]
  }
}
Przepływ pracy Agenta AI (MCP + REST API) 4 Kroki

Standardowy protokół komunikacji z bazą DietsPremium

1
1. Inicjalizacja sesji i odkrycie schematów (tools/list) POST /_mcp

Klient AI (Claude, Cursor, Antigravity) pobiera listę 12 narzędzi wyszukiwania oraz 9 narzędzi zarządzania wraz ze schematami JSON Schema.

{"method": "tools/list", "params": {}}
2
2. Semantyczne wyszukiwanie k-NN (search_*) OpenSearch 512d

Zapytanie trafia do klastra wektorowego i zwraca encje wraz z zakodowanym kluczem Base64 (pole "key").

{"name": "search_food", "arguments": {"query": "pierś z indyka", "locale": "pl"}}
3
3. Operacje zapisu i generowania (management_*) McpKeyCodec

Narzędzia zarządzania przyjmują wyłącznie bezpieczny klucz Base64 "key" zwrócony przez wyszukiwarkę (nigdy surowy integer ID).

{"name": "management_diet", "arguments": {"action": "get", "key": "MTA4"}}
4
4. Synchronizacja mediów S3 i walidacja makro S3 + Doctrine

Przepisy, produkty i szablony diet automatycznie przeliczają makroskładniki, alergeny oraz miniatury WebP/AVIF.

DietsPremiumClinicalSubagent Połączono z /_mcp

Autonomiczny Asystent Dietetyki Klinicznej i Treningu

Claude 3.7 / Gemini 2.5 Pro
Prompt Wejściowy Agenta AI

“Stwórz 7-dniowy jadłospis DASH 2000 kcal bez laktozy, sprawdź interakcje z lekiem Euthyrox i wygeneruj listę zakupów z cenami w PLN.”

Wykorzystywane Narzędzia MCP / Endpointy
search_food search_recipe search_medication search_allergen management_diet management_recipe
Ślad Wywołania (Execution Trace)
→ call search_medication({query: "Lewotyroksyna", locale: "pl"})
← 200 OK: Zachowaj 4h odstępu od suplementów wapnia i żelaza
→ call search_diet({diet_template_type: "dash", kcal_min: 1950, kcal_max: 2050, avoid_allergens: ["milk"]})
← 200 OK: Znaleziono szablon key="MTA4" (2010 kcal, sód < 1500mg)
DEVELOPER FAQ

Frequently Asked Questions about API & MCP

Model Context Protocol (MCP v2.0) connects AI agents (Claude Desktop, Cursor, ChatGPT, Gemini) directly to 27 clinical nutrition and workout tools, while REST API v1 provides deterministic JSON endpoints for web and mobile apps.

B2C Personal PRO includes 5,000,000 MCP tokens and 500 API requests per month. B2B Trainer PRO includes 50,000,000 MCP tokens and 1,000 API requests/month, and Studio PRO includes 250,000,000 MCP tokens and 10,000 API requests/month.

You can top up anytime with Prepaid Overhead Token Packs (5M, 50M, or 250M tokens) that never expire at month-end and activate automatically when your monthly quota is reached.

Generate your personal Bearer API key in your account settings or connect enterprise apps via OAuth 2.1 + PKCE and SAML 2.0 SSO.

Yes — alongside 12 k-NN 512d search tools, you get 15 authenticated management tools (/_mcp/management/*) to create and update diet plans, training plans, recipes, and patient schedules.

Share