Przytomni Sushi — MCP

Po produkcyjnym wdrożeniu (Faza 5) adres zmieni się na mcp.psushi.pl/mcp — do tego czasu używaj adresu powyżej. / After the production cutover (Phase 5) the address becomes mcp.psushi.pl/mcp — until then, use the address above.

Czym jest ten serwer

To jest serwer MCP (Model Context Protocol) z danymi sprzedażowymi Przytomni Sushi — wyłącznie do odczytu. Żadne narzędzie nigdy niczego nie zapisuje ani nie zmienia w systemie Dysza. Możesz podłączyć do niego dowolnego agenta AI obsługującego MCP (Claude.ai, Claude Desktop, Claude Code, ChatGPT, Cursor, API) i zadawać pytania o sprzedane produkty, przychody, metody płatności, kanały zamówień, rozkład godzinowy i aktywność personelu.

Kto może się połączyć

Dostęp jest tylko na zaproszenie. Administrator musi zaprosić Twoje konto w Clerk i włączyć dla niego dostęp do MCP, zanim logowanie zadziała. Jeśli potrzebujesz dostępu, napisz na slawek@blesu.com.

Jak się połączyć

Claude.ai (przeglądarka)

  1. Przejdź do CustomizeConnectors.
  2. Kliknij Add custom connector.
  3. Wklej adres serwera z pola powyżej (kończy się na /mcp).
  4. Authentication: ustaw „Always required”.
  5. OAuth client: wybierz „Use Anthropic's hosted client metadata” — jeśli ta opcja jest niedostępna, wybierz zamiast niej „No client ID — register one automatically” (Claude zarejestruje się samodzielnie, DCR).
  6. Kliknij Add, potem Connect.
  7. Zaloguj się kontem zaproszonym przez administratora. Ekran zgody powinien wymieniać uprawnienie psushi:read — jeśli go nie ma, skontaktuj się z administratorem.

Uwaga: ustawienia uwierzytelniania konektora nie da się później zmienić — trzeba go usunąć i dodać ponownie.

Claude Desktop / aplikacja mobilna

Ten sam konektor co w Claude.ai (Settings → Connectors) — te same kroki jak wyżej.

Claude Code

claude mcp add --transport http psushi <ADRES>/mcp --scope user
claude mcp login psushi

(albo w sesji Claude Code: wpisz /mcp i podążaj za podpowiedzią). <ADRES> to adres z pola na górze strony (bez końcowego /mcp, które jest już w poleceniu).

Cursor

Dodaj serwer w konfiguracji MCP Cursora (mcp.json):

{
  "mcpServers": {
    "psushi": { "url": "<ADRES>/mcp" }
  }
}

ChatGPT

  1. SettingsApps & Connectors.
  2. Włącz Developer mode.
  3. Create → podaj adres serwera → uwierzytelnianie OAuth.

Pełne konektory wymagają planu ChatGPT Business/Enterprise; plan Pro w trybie Developer mode jest tylko do odczytu (co i tak pasuje do tego serwera).

Anthropic Messages API (dla programistów)

API Messages nie przeprowadza logowania OAuth samodzielnie — token dostępu trzeba najpierw zdobyć inną drogą (np. logując się przez Claude Code lub MCP Inspector) i przekazać go jako authorization_token w polu mcp_servers. Pełna dokumentacja: Anthropic MCP connector (Messages API).

Dostępne narzędzia

Narzędzie Co zwraca
get_daily_stats Dzienne/tygodniowe/miesięczne zestawienia z nocnego raportu (do 366 dni).
get_revenue_summary Przychód, liczba zamówień, średni paragon, podział wg kanału i metody płatności (do 92 dni).
get_top_items Najlepiej sprzedające się produkty/zestawy/składniki (do 92 dni).
get_order_mix Liczba zamówień i przychód wg wybranego wymiaru — kanał, strefa dostawy, metoda płatności, status, personel (do 92 dni).
get_time_distribution Rozkład zamówień i przychodu wg godziny / dnia tygodnia (do 92 dni).
list_orders Lista pojedynczych zamówień dostawa/odbiór do analizy szczegółowej (do 31 dni).
get_order Pojedyncze zamówienie po identyfikatorze (dostawa lub stolik).
get_menu_catalog Aktualny katalog menu (produkty, zestawy, składniki).
describe_data_model Pełny opis modelu danych i słownik pojęć.
get_server_info Tożsamość serwera, środowisko (DEV/PROD), wersja i limity.

Przykładowe pytania

Zasady dotyczące danych

Rozwiązywanie problemów

Objaw Przyczyna i rozwiązanie
Błąd 401 / ciągłe proszenie o ponowne logowanie Token wygasł albo jesteś niezalogowany/a. Zaloguj się ponownie ( claude mcp login albo usuń i dodaj ponownie konektor).
Błąd 403 (insufficient_scope) Dwie możliwe przyczyny: (1) administrator jeszcze nie włączył Twojego konta — napisz na slawek@blesu.com; (2) Twój token nie ma uprawnienia psushi:read (np. połączenie dodane zanim to uprawnienie istniało) — usuń i dodaj ponownie konektor albo wykonaj ponownie claude mcp login.
„Nie można połączyć się z serwerem MCP” Sprawdź, czy adres kończy się dokładnie na /mcp i czy używasz właściwego środowiska (DEV vs produkcja — patrz baner na górze strony). Sprawdź też /health.

What this server is

This is the MCP (Model Context Protocol) server for Przytomni Sushi sales data — read-only. No tool here ever writes to or changes anything in the Dysza system. Connect any MCP-capable AI agent (Claude.ai, Claude Desktop, Claude Code, ChatGPT, Cursor, API agents) and ask about sold items, revenue, payment methods, order channels, time of day and staff activity.

Who can connect

Access is invite-only. An administrator must invite your account in Clerk and enable MCP access for it before sign-in will work. If you need access, email slawek@blesu.com.

How to connect

Claude.ai (web)

  1. Go to CustomizeConnectors.
  2. Click Add custom connector.
  3. Paste the server URL from the box above (ends in /mcp).
  4. Authentication: set to “Always required”.
  5. OAuth client: choose “Use Anthropic's hosted client metadata” — if that option is unavailable, choose “No client ID — register one automatically” instead (Claude registers itself, via DCR).
  6. Click Add, then Connect.
  7. Sign in with the account an administrator invited. The consent screen should list the psushi:read scope — if it doesn't, contact your administrator.

Note: a connector's authentication setting cannot be edited afterwards — remove and re-add it instead.

Claude Desktop / mobile app

The same connector as Claude.ai (Settings → Connectors) — same steps as above.

Claude Code

claude mcp add --transport http psushi <URL>/mcp --scope user
claude mcp login psushi

(or inside a Claude Code session: type /mcp and follow the prompt). <URL> is the address from the box at the top of this page (without a trailing /mcp, which the command already adds).

Cursor

Add the server to Cursor's MCP config (mcp.json):

{
  "mcpServers": {
    "psushi": { "url": "<URL>/mcp" }
  }
}

ChatGPT

  1. SettingsApps & Connectors.
  2. Enable Developer mode.
  3. Create → enter the server URL → authenticate via OAuth.

Full connectors need a ChatGPT Business/Enterprise plan; Pro's Developer mode is read-only, which matches this server anyway.

Anthropic Messages API (developers)

The Messages API does not run the OAuth flow itself — you must obtain an access token first (e.g. by signing in via Claude Code or MCP Inspector) and pass it as authorization_token inside mcp_servers. Full documentation: the Anthropic MCP connector docs (Messages API).

Available tools

Tool What it returns
get_daily_stats Daily/weekly/monthly rollups from the nightly report (up to 366 days).
get_revenue_summary Revenue, order count, average ticket, channel and payment-method breakdown (up to 92 days).
get_top_items Best-selling products/sets/ingredients (up to 92 days).
get_order_mix Order counts and revenue by a chosen dimension — channel, delivery zone, payment method, status, staff (up to 92 days).
get_time_distribution Orders and revenue by hour of day / weekday (up to 92 days).
list_orders Individual delivery/pickup order rows for drill-down (up to 31 days).
get_order A single order by id (delivery or table).
get_menu_catalog The current menu catalog (products, sets, ingredients).
describe_data_model The full data-model description and glossary.
get_server_info Server identity, environment (DEV/PROD), version and limits.

Example questions

Data notes

Troubleshooting

Symptom Cause and fix
401 error / repeatedly asked to sign in again Token expired or you are not signed in. Re-authenticate ( claude mcp login, or remove and re-add the connector).
403 error (insufficient_scope) Two possible causes: (1) an administrator has not enabled your account yet — email slawek@blesu.com; (2) your token lacks the psushi:read scope (e.g. a connector added before that scope existed) — remove and re-add the connector, or re-run claude mcp login.
“Couldn't reach the MCP server” Check the URL ends exactly in /mcp and that you're using the right environment (DEV vs production — see the banner at the top). Also check /health.