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)
- Przejdź do Customize → Connectors.
- Kliknij Add custom connector.
- Wklej adres serwera z pola powyżej (kończy się na
/mcp). - Authentication: ustaw „Always required”.
- 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).
- Kliknij Add, potem Connect.
-
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
- Settings → Apps & Connectors.
- Włącz Developer mode.
- 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
- „Jakie zestawy sprzedawały się najlepiej w sierpniu?”
- „Jaki był przychód wg metody płatności w zeszłym tygodniu?”
- „Ile zamówień obsłużył każdy kelner wczoraj?”
Zasady dotyczące danych
- Wszystkie kwoty są brutto (z VAT) — system źródłowy nie przechowuje stawek VAT, więc nie ma osobnej kwoty netto.
- Wszystkie daty i godziny są w czasie Europa/Warszawa.
-
Baza
fulfilled(domyślna) to zamówienia faktycznie potwierdzone/opłacone (dostawa) lub zamknięte (stolik), wg daty slotu/zamknięcia. Bazaas_reportedodtwarza reguły nocnego raportu e-mail — służy do uzgadniania liczb z wysłanym raportem, nie do bieżącej analizy. - Dane klientów nigdy nie są zwracane (imię, telefon, e-mail, adres, NIP, komentarz).
- Imiona i nazwiska personelu SĄ widoczne (kto obsłużył/przyjął zamówienie), aby można było odpowiadać na pytania o pracę poszczególnych osób.
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)
- Go to Customize → Connectors.
- Click Add custom connector.
- Paste the server URL from the box above (ends in
/mcp). - Authentication: set to “Always required”.
- 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).
- Click Add, then Connect.
-
Sign in with the account an administrator invited. The consent screen should list the
psushi:readscope — 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
- Settings → Apps & Connectors.
- Enable Developer mode.
- 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
- “Which sets sold best in August?”
- “Revenue by payment method last week?”
- “How many orders did each waiter handle yesterday?”
Data notes
- Every amount is gross of VAT — the source system stores no VAT rate, so there is no separate net figure.
- All dates and times are in Europe/Warsaw time.
-
The
fulfilledbasis (default) is orders actually confirmed/paid (delivery) or closed (table), by their slot/close date. Theas_reportedbasis replicates the nightly emailed report's own rules — for reconciling with that report, not for everyday analysis. - Customer data is never returned (name, phone, e-mail, address, tax id, comment).
- Staff names ARE visible (who handled/took an order), so this server can answer per-person questions.
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.
|