Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Changed connecting an agent to a two-step choice, and dropped the seeded clients
Damian Legawiec9a2e0bcd3283
diff --git a/docs/plans/6.0-mcp-oauth.md b/docs/plans/6.0-mcp-oauth.mdindex df19bffc70..510fa64418 100644--- a/docs/plans/6.0-mcp-oauth.md+++ b/docs/plans/6.0-mcp-oauth.md@@ -159,8 +159,10 @@ Steps 1–3 are the substance; a merchant sees nothing until 4 and 5.- **Client ID metadata documents.** Deferred: Doorkeeper's support is an openpull request, and pre-registered client IDs are first in the spec's own- priority order, so the consumer clients work without it. Revisit when that- lands — it is what would let a client connect without being seeded.+ priority order, so the consumer clients work without it. A merchant+ registers one by picking it in the connect sheet, which fills in the+ callback for the clients we know. Revisit when CIMD lands — it is what+ would remove the registration step altogether.- **One authorization server per installation, or per store?** Settled asper-store resource identifiers over one installation-wide token store: theidentifier must match the URL the merchant typed, anddiff --git a/packages/dashboard-core/src/locales/ar.json b/packages/dashboard-core/src/locales/ar.jsonindex dfd6f19c7b..01cc73c6ac 100644--- a/packages/dashboard-core/src/locales/ar.json+++ b/packages/dashboard-core/src/locales/ar.json@@ -183,7 +183,9 @@"searching": "جارٍ البحث…","select_placeholder": "اختر…","unsaved_changes": "لديك تغييرات غير محفوظة.",- "yes": "نعم"+ "yes": "نعم",+ "done": "تم",+ "error": "حدث خطأ ما."},"components": {"address_block": {diff --git a/packages/dashboard-core/src/locales/de.json b/packages/dashboard-core/src/locales/de.jsonindex 2386e58ba5..2a1f0b5c9f 100644--- a/packages/dashboard-core/src/locales/de.json+++ b/packages/dashboard-core/src/locales/de.json@@ -183,7 +183,9 @@"searching": "Wird gesucht…","select_placeholder": "Auswählen…","unsaved_changes": "Sie haben ungespeicherte Änderungen.",- "yes": "Ja"+ "yes": "Ja",+ "done": "Fertig",+ "error": "Etwas ist schiefgelaufen."},"components": {"address_block": {diff --git a/packages/dashboard-core/src/locales/en.json b/packages/dashboard-core/src/locales/en.jsonindex 2de547a3b0..6370afb0ba 100644--- a/packages/dashboard-core/src/locales/en.json+++ b/packages/dashboard-core/src/locales/en.json@@ -183,7 +183,9 @@"searching": "Searching…","select_placeholder": "Select…","unsaved_changes": "You have unsaved changes.",- "yes": "Yes"+ "yes": "Yes",+ "done": "Done",+ "error": "Something went wrong."},"components": {"address_block": {diff --git a/packages/dashboard-core/src/locales/es.json b/packages/dashboard-core/src/locales/es.jsonindex 2e219d877b..8a9994b163 100644--- a/packages/dashboard-core/src/locales/es.json+++ b/packages/dashboard-core/src/locales/es.json@@ -1665,7 +1665,9 @@"searching": "Buscando…","select_placeholder": "Seleccionar…","unsaved_changes": "Tenés cambios sin guardar.",- "yes": "Sí"+ "yes": "Sí",+ "done": "Listo",+ "error": "Algo salió mal."},"messages": {"address_removed": "Dirección eliminada",diff --git a/packages/dashboard-core/src/locales/fr.json b/packages/dashboard-core/src/locales/fr.jsonindex edef9ad1ac..0f5da64864 100644--- a/packages/dashboard-core/src/locales/fr.json+++ b/packages/dashboard-core/src/locales/fr.json@@ -183,7 +183,9 @@"searching": "Recherche…","select_placeholder": "Sélectionner…","unsaved_changes": "Vous avez des modifications non enregistrées.",- "yes": "Oui"+ "yes": "Oui",+ "done": "Terminé",+ "error": "Une erreur s'est produite."},"components": {"address_block": {diff --git a/packages/dashboard-core/src/locales/pl.json b/packages/dashboard-core/src/locales/pl.jsonindex 1563475bf1..327034d127 100644--- a/packages/dashboard-core/src/locales/pl.json+++ b/packages/dashboard-core/src/locales/pl.json@@ -184,7 +184,9 @@"searching": "Wyszukiwanie…","select_placeholder": "Wybierz…","unsaved_changes": "Masz niezapisane zmiany.",- "yes": "Tak"+ "yes": "Tak",+ "done": "Gotowe",+ "error": "Coś poszło nie tak."},"components": {"address_block": {diff --git a/packages/dashboard-core/src/locales/zh-CN.json b/packages/dashboard-core/src/locales/zh-CN.jsonindex 0c48b311dd..2a9b3fd439 100644--- a/packages/dashboard-core/src/locales/zh-CN.json+++ b/packages/dashboard-core/src/locales/zh-CN.json@@ -183,7 +183,9 @@"searching": "搜索中…","select_placeholder": "请选择…","unsaved_changes": "您有未保存的更改。",- "yes": "是"+ "yes": "是",+ "done": "完成",+ "error": "出了点问题。"},"components": {"address_block": {diff --git a/packages/dashboard/src/components/spree/mcp-connect-sheet.tsx b/packages/dashboard/src/components/spree/mcp-connect-sheet.tsxindex 8cbe3a55b2..f448bc3d3a 100644--- a/packages/dashboard/src/components/spree/mcp-connect-sheet.tsx+++ b/packages/dashboard/src/components/spree/mcp-connect-sheet.tsx@@ -1,15 +1,25 @@+import type { OauthApplication } from '@spree/admin-sdk'+import { adminClient } from '@spree/dashboard-core'import {Alert,AlertDescription,+ Button,CopyToClipboardButton,+ Field,+ FieldError,+ Input,+ Label,Sheet,SheetContent,SheetDescription,+ SheetFooter,SheetHeader,SheetTitle,} from '@spree/dashboard-ui'+import { useMutation, useQueryClient } from '@tanstack/react-query'+import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { useOauthRegistrations } from '../../hooks/use-oauth'+import { useOauthApplications } from '../../hooks/use-oauth'type McpConnectSheetProps = {open: boolean@@ -17,86 +27,207 @@ type McpConnectSheetProps = {}/**- * How a merchant points an agent at this store.+ * The clients whose callback we can fill in for the merchant.*- * There is nothing to mint: the client sends the person here to sign in and- * approve what the agent may do, so the only thing to hand over is the URL.- * An API key is not accepted by the MCP endpoint — that credential belongs- * to the CLI, where there is no person to approve anything.+ * A redirect URI is where authorization codes are delivered, so a wrong one+ * sends them to whoever controls that host. For the clients we know, the+ * merchant should never have to find or type it — they pick a name. Anything+ * else is "Something else", where a developer supplies the callback from the+ * client's own documentation.+ */+const KNOWN_CLIENTS = [+ { id: 'claude', name: 'Claude', redirectUri: 'https://claude.ai/api/mcp/auth_callback' },+ {+ id: 'chatgpt',+ name: 'ChatGPT',+ redirectUri: 'https://chatgpt.com/connector_platform_oauth_redirect',+ },+] as const++/**+ * Connecting an agent, in two steps: choose which one, then take away the+ * address and the id it asks for.+ *+ * The client is registered when the merchant picks it, rather than seeded+ * into every store — a store that never connects anything carries no+ * registrations, and the sheet shows one id (the one just created) instead+ * of every id at once.*/export function McpConnectSheet({ open, onOpenChange }: McpConnectSheetProps) {const { t } = useTranslation()- const { data: registrations } = useOauthRegistrations()+ const queryClient = useQueryClient()+ const [created, setCreated] = useState<OauthApplication | null>(null)+ const [customName, setCustomName] = useState('')+ const [customUri, setCustomUri] = useState('')+ const [failure, setFailure] = useState<string | null>(null)+ const { data: existing } = useOauthApplications()// Where this dashboard's own API calls go — either a configured origin or// the page's own, which is what a proxied or multi-hostname deployment// actually answers on.const apiOrigin = import.meta.env.VITE_SPREE_API_URL || window.location.originconst endpoint = `${apiOrigin}/api/v3/admin/mcp`- const clients = registrations?.data ?? []++ const register = useMutation({+ mutationFn: (params: { name: string; redirect_uri: string }) =>+ adminClient.oauth.applications.create(params),+ onSuccess: (application) => {+ queryClient.invalidateQueries({ queryKey: ['oauth-applications'] })+ setCreated(application)+ },+ })++ async function choose(name: string, redirectUri: string) {+ setFailure(null)++ // Picking the same client twice is reconnecting it, not registering a+ // second one — two rows with two ids would leave a merchant guessing+ // which to paste.+ const already = existing?.data?.find((candidate) => candidate.name === name)+ if (already) {+ setCreated(already)+ return+ }++ try {+ await register.mutateAsync({ name, redirect_uri: redirectUri })+ } catch (error) {+ setFailure(error instanceof Error ? error.message : t('admin.common.error'))+ }+ }++ function reset(next: boolean) {+ onOpenChange(next)+ if (next) return+ setCreated(null)+ setCustomName('')+ setCustomUri('')+ setFailure(null)+ }return (- <Sheet open={open} onOpenChange={onOpenChange}>- <SheetContent className="w-full overflow-y-auto sm:max-w-xl">+ <Sheet open={open} onOpenChange={reset}>+ <SheetContent className="flex w-full flex-col overflow-y-auto sm:max-w-xl"><SheetHeader>- <SheetTitle>{t('admin.mcp_connect.title')}</SheetTitle>- <SheetDescription>{t('admin.mcp_connect.subtitle')}</SheetDescription>+ <SheetTitle>+ {created+ ? t('admin.mcp_connect.ready_title', { client: created.name })+ : t('admin.mcp_connect.title')}+ </SheetTitle>+ <SheetDescription>+ {created ? t('admin.mcp_connect.ready_subtitle') : t('admin.mcp_connect.subtitle')}+ </SheetDescription></SheetHeader>- <div className="flex flex-col gap-6 px-4 pb-8">- <div className="flex flex-col gap-2">- <p className="font-medium text-sm">{t('admin.mcp_connect.url_label')}</p>- <div className="relative">- <pre className="overflow-x-auto rounded-md bg-muted p-3 pr-12 text-xs">- <code>{endpoint}</code>- </pre>- <CopyToClipboardButton- aria-label={t('admin.actions.copy')}- className="absolute top-1.5 right-2"- value={endpoint}- />- </div>- </div>-- <ol className="flex list-decimal flex-col gap-2 pl-5 text-sm">- <li>{t('admin.mcp_connect.step_paste')}</li>- <li>{t('admin.mcp_connect.step_sign_in')}</li>- <li>{t('admin.mcp_connect.step_approve')}</li>- </ol>-- {/* Some clients ask for a client ID before they will start the- sign-in flow. It is issued per store, so it cannot be published- anywhere — a merchant has to be able to read this store's own. */}- {clients.length > 0 ? (- <div className="flex flex-col gap-2">- <p className="font-medium text-sm">{t('admin.mcp_connect.client_id_label')}</p>- <p className="text-muted-foreground text-xs">- {t('admin.mcp_connect.client_id_help')}- </p>- {clients.map((client) => (- <div key={client.id} className="flex flex-col gap-1">- <p className="text-xs">{client.name}</p>- <div className="relative">- <pre className="overflow-x-auto rounded-md bg-muted p-3 pr-12 text-xs">- <code>{client.client_id}</code>- </pre>- <CopyToClipboardButton- aria-label={t('admin.actions.copy')}- className="absolute top-1.5 right-2"- value={client.client_id}- />- </div>- </div>- ))}- </div>+ <div className="flex flex-1 flex-col gap-6 px-4">+ {failure ? (+ <Alert variant="destructive">+ <AlertDescription>{failure}</AlertDescription>+ </Alert>) : null}- <Alert>- <AlertDescription>{t('admin.mcp_connect.scope_note')}</AlertDescription>- </Alert>+ {created ? (+ <>+ <div className="flex flex-col gap-2">+ <p className="font-medium text-sm">{t('admin.mcp_connect.endpoint_label')}</p>+ <div className="flex items-center gap-2 rounded-md bg-muted px-3 py-2">+ <code className="flex-1 truncate font-mono text-xs">{endpoint}</code>+ <CopyToClipboardButton+ value={endpoint}+ aria-label={t('admin.mcp_connect.copy_endpoint')}+ />+ </div>+ </div>++ <div className="flex flex-col gap-2">+ <p className="font-medium text-sm">{t('admin.mcp_connect.client_id_label')}</p>+ <p className="text-muted-foreground text-xs">+ {t('admin.mcp_connect.client_id_help')}+ </p>+ <div className="flex items-center gap-2 rounded-md bg-muted px-3 py-2">+ <code className="flex-1 truncate font-mono text-xs">{created.client_id}</code>+ <CopyToClipboardButton+ value={created.client_id}+ aria-label={t('admin.mcp_connect.copy_client_id')}+ />+ </div>+ </div>++ <ol className="flex list-decimal flex-col gap-2 pl-5 text-sm">+ <li>{t('admin.mcp_connect.step_paste')}</li>+ <li>{t('admin.mcp_connect.step_sign_in')}</li>+ <li>{t('admin.mcp_connect.step_approve')}</li>+ </ol>- <p className="text-muted-foreground text-xs">{t('admin.mcp_connect.cli_note')}</p>+ <Alert variant="info">+ <AlertDescription>{t('admin.mcp_connect.bounded_note')}</AlertDescription>+ </Alert>+ </>+ ) : (+ <>+ <div className="flex flex-col gap-2">+ {KNOWN_CLIENTS.map((client) => (+ <Button+ key={client.id}+ variant="outline"+ className="justify-start"+ disabled={register.isPending}+ onClick={() => choose(client.name, client.redirectUri)}+ >+ {client.name}+ </Button>+ ))}+ </div>++ {/* Anything we do not know a callback for. A developer reads it+ from the client's documentation; a merchant picks a name+ above and never sees this. */}+ <div className="flex flex-col gap-3 border-t pt-4">+ <p className="font-medium text-sm">{t('admin.mcp_connect.other_title')}</p>+ <Field>+ <Label htmlFor="mcp-other-name">+ {t('admin.fields.oauth_application.name.label')}+ </Label>+ <Input+ id="mcp-other-name"+ value={customName}+ onChange={(event) => setCustomName(event.target.value)}+ placeholder={t('admin.fields.oauth_application.name.placeholder')}+ />+ </Field>+ <Field>+ <Label htmlFor="mcp-other-uri">+ {t('admin.fields.oauth_application.redirect_uri.label')}+ </Label>+ <Input+ id="mcp-other-uri"+ value={customUri}+ onChange={(event) => setCustomUri(event.target.value)}+ placeholder="https://example.com/oauth/callback"+ />+ <FieldError />+ <p className="text-muted-foreground text-xs">+ {t('admin.fields.oauth_application.redirect_uri.help')}+ </p>+ </Field>+ <Button+ variant="outline"+ className="self-start"+ disabled={register.isPending || !customName.trim() || !customUri.trim()}+ onClick={() => choose(customName.trim(), customUri.trim())}+ >+ {t('admin.mcp_connect.other_cta')}+ </Button>+ </div>+ </>+ )}</div>++ <SheetFooter>+ <Button variant="outline" onClick={() => reset(false)}>+ {created ? t('admin.common.done') : t('admin.common.cancel')}+ </Button>+ </SheetFooter></SheetContent></Sheet>)diff --git a/packages/dashboard/src/locales/ar.json b/packages/dashboard/src/locales/ar.jsonindex 81344b3501..19ed64ee68 100644--- a/packages/dashboard/src/locales/ar.json+++ b/packages/dashboard/src/locales/ar.json@@ -6409,15 +6409,20 @@"mcp_connect": {"open_cta": "ربط وكيل","title": "ربط وكيل",- "subtitle": "وجّه مساعد الذكاء الاصطناعي إلى هذا المتجر. سيعيدك إلى هنا للموافقة على ما يمكنه فعله.",- "url_label": "عنوان MCP الخاص بمتجرك",+ "subtitle": "اختر المساعد الذي تريد منحه حق الوصول إلى هذا المتجر.","step_paste": "الصق هذا العنوان في الموصّل أو إعدادات MCP في عميلك.","step_sign_in": "سيعيدك إلى هنا لتسجيل الدخول.","step_approve": "وافق على ما يمكن للوكيل فعله. ويمكنك سحب ذلك في أي وقت من هذه الصفحة.",- "scope_note": "لا يحصل الوكيل أبدًا على أكثر مما تملكه أنت، وعلى ما توافق عليه فقط. والموافقة على المنتجات لا تشمل الطلبات.",- "cli_note": "للبرامج النصية أو CI أو أي شيء لا يمكنه تسجيل الدخول، استخدم Spree CLI مع مفتاح API — فمفاتيح API غير مقبولة هنا.","client_id_label": "معرّف العميل",- "client_id_help": "تطلبه بعض العملاء قبل البدء. ويُصدر لكل متجر على حدة، لذا استخدم المعرّف الخاص بالعميل الذي تربطه."+ "client_id_help": "تطلبه بعض العملاء قبل البدء.",+ "ready_title": "{{client}} جاهز للربط",+ "ready_subtitle": "الصق هذه القيم في العميل، ثم وافق على ما يمكنه فعله.",+ "endpoint_label": "عنوان MCP الخاص بمتجرك",+ "copy_endpoint": "نسخ العنوان",+ "copy_client_id": "نسخ معرّف العميل",+ "other_title": "شيء آخر",+ "other_cta": "تسجيل ومتابعة",+ "bounded_note": "لن يحصل الوكيل أبدًا على أكثر مما لديك، وفقط على ما توافق عليه."}}}diff --git a/packages/dashboard/src/locales/de.json b/packages/dashboard/src/locales/de.jsonindex aa49fd2eaa..2c87364d78 100644--- a/packages/dashboard/src/locales/de.json+++ b/packages/dashboard/src/locales/de.json@@ -6369,15 +6369,20 @@"mcp_connect": {"open_cta": "Agent verbinden","title": "Agent verbinden",- "subtitle": "Richten Sie einen KI-Assistenten auf diesen Shop. Er schickt Sie hierher zurück, um die Freigabe zu erteilen.",- "url_label": "Die MCP-Adresse Ihres Shops",+ "subtitle": "Wählen Sie den Assistenten, dem Sie Zugriff auf diesen Shop geben möchten.","step_paste": "Fügen Sie diese Adresse in den Connector oder die MCP-Einstellungen Ihres Clients ein.","step_sign_in": "Sie werden zur Anmeldung hierher geschickt.","step_approve": "Geben Sie frei, was der Agent tun darf. Sie können dies jederzeit auf dieser Seite zurücknehmen.",- "scope_note": "Ein Agent erhält nie mehr, als Sie selbst haben, und nur das, was Sie freigeben. Eine Freigabe für Produkte schließt Bestellungen nicht ein.",- "cli_note": "Für Skripte, CI oder alles, was sich nicht anmelden kann, verwenden Sie die Spree CLI mit einem API-Schlüssel — hier werden API-Schlüssel nicht akzeptiert.","client_id_label": "Client-ID",- "client_id_help": "Manche Clients fragen danach, bevor sie starten. Sie wird pro Shop vergeben — verwenden Sie die für den Client, den Sie verbinden."+ "client_id_help": "Manche Clients fragen danach, bevor sie starten.",+ "ready_title": "{{client}} kann verbunden werden",+ "ready_subtitle": "Fügen Sie dies im Client ein und genehmigen Sie dann, was er tun darf.",+ "endpoint_label": "Die MCP-Adresse Ihres Shops",+ "copy_endpoint": "Adresse kopieren",+ "copy_client_id": "Client-ID kopieren",+ "other_title": "Etwas anderes",+ "other_cta": "Registrieren und fortfahren",+ "bounded_note": "Ein Agent erhält nie mehr als Sie selbst haben, und nur das, was Sie genehmigen."}}}diff --git a/packages/dashboard/src/locales/en.json b/packages/dashboard/src/locales/en.jsonindex 12a8ce912d..dfc9616741 100644--- a/packages/dashboard/src/locales/en.json+++ b/packages/dashboard/src/locales/en.json@@ -6369,15 +6369,20 @@"mcp_connect": {"open_cta": "Connect an agent","title": "Connect an agent",- "subtitle": "Point an AI assistant at this store. It will send you back here to approve what it may do.",- "url_label": "Your store’s MCP address",+ "subtitle": "Choose the assistant you want to give access to this store.","step_paste": "Paste this address into your client’s connector or MCP settings.","step_sign_in": "It sends you here to sign in.","step_approve": "Approve what the agent may do. You can take it back at any time on this page.",- "scope_note": "An agent never gets more than you have, and only what you approve. Approving product access does not include orders.",- "cli_note": "For scripts, CI or anything that cannot sign in, use the Spree CLI with an API key instead — API keys are not accepted here.","client_id_label": "Client ID",- "client_id_help": "Some clients ask for this before they will start. It is issued per store, so use the one for the client you are connecting."+ "client_id_help": "Some clients ask for this before they will start.",+ "ready_title": "{{client}} is ready to connect",+ "ready_subtitle": "Paste these into the client, then approve what it may do.",+ "endpoint_label": "Your store's MCP address",+ "copy_endpoint": "Copy address",+ "copy_client_id": "Copy client ID",+ "other_title": "Something else",+ "other_cta": "Register and continue",+ "bounded_note": "An agent never gets more than you have, and only what you approve."}}}diff --git a/packages/dashboard/src/locales/es.json b/packages/dashboard/src/locales/es.jsonindex 8ec4b10edd..43b909df49 100644--- a/packages/dashboard/src/locales/es.json+++ b/packages/dashboard/src/locales/es.json@@ -6369,15 +6369,20 @@"mcp_connect": {"open_cta": "Conectar un agente","title": "Conectar un agente",- "subtitle": "Apunte un asistente de IA a esta tienda. Le enviará de vuelta aquí para aprobar lo que puede hacer.",- "url_label": "La dirección MCP de su tienda",+ "subtitle": "Elija el asistente al que quiere dar acceso a esta tienda.","step_paste": "Pegue esta dirección en el conector o la configuración MCP de su cliente.","step_sign_in": "Le enviará aquí para iniciar sesión.","step_approve": "Apruebe lo que puede hacer el agente. Puede retirarlo en cualquier momento en esta página.",- "scope_note": "Un agente nunca obtiene más de lo que usted tiene, y solo lo que apruebe. Aprobar el acceso a productos no incluye los pedidos.",- "cli_note": "Para scripts, CI o cualquier cosa que no pueda iniciar sesión, use la CLI de Spree con una clave API: aquí no se aceptan claves API.","client_id_label": "ID de cliente",- "client_id_help": "Algunos clientes lo piden antes de empezar. Se emite por tienda, así que use el del cliente que está conectando."+ "client_id_help": "Algunos clientes lo piden antes de empezar.",+ "ready_title": "{{client}} está listo para conectarse",+ "ready_subtitle": "Pegue esto en el cliente y luego apruebe lo que puede hacer.",+ "endpoint_label": "La dirección MCP de su tienda",+ "copy_endpoint": "Copiar dirección",+ "copy_client_id": "Copiar ID de cliente",+ "other_title": "Otra cosa",+ "other_cta": "Registrar y continuar",+ "bounded_note": "Un agente nunca obtiene más de lo que usted tiene, y solo lo que usted aprueba."}}}diff --git a/packages/dashboard/src/locales/fr.json b/packages/dashboard/src/locales/fr.jsonindex cce6c99190..81c4a857eb 100644--- a/packages/dashboard/src/locales/fr.json+++ b/packages/dashboard/src/locales/fr.json@@ -6369,15 +6369,20 @@"mcp_connect": {"open_cta": "Connecter un agent","title": "Connecter un agent",- "subtitle": "Dirigez un assistant IA vers cette boutique. Il vous renverra ici pour approuver ce qu’il peut faire.",- "url_label": "L’adresse MCP de votre boutique",+ "subtitle": "Choisissez l'assistant auquel donner accès à cette boutique.","step_paste": "Collez cette adresse dans le connecteur ou les réglages MCP de votre client.","step_sign_in": "Il vous renvoie ici pour vous connecter.","step_approve": "Approuvez ce que l’agent peut faire. Vous pouvez le retirer à tout moment sur cette page.",- "scope_note": "Un agent n’obtient jamais plus que vous, et uniquement ce que vous approuvez. Approuver l’accès aux produits n’inclut pas les commandes.",- "cli_note": "Pour les scripts, la CI ou tout ce qui ne peut pas se connecter, utilisez la CLI Spree avec une clé API — les clés API ne sont pas acceptées ici.","client_id_label": "Identifiant client",- "client_id_help": "Certains clients le demandent avant de démarrer. Il est émis par boutique : utilisez celui du client que vous connectez."+ "client_id_help": "Certains clients le demandent avant de démarrer.",+ "ready_title": "{{client}} est prêt à être connecté",+ "ready_subtitle": "Collez ceci dans le client, puis approuvez ce qu'il peut faire.",+ "endpoint_label": "Adresse MCP de votre boutique",+ "copy_endpoint": "Copier l'adresse",+ "copy_client_id": "Copier l'identifiant client",+ "other_title": "Autre chose",+ "other_cta": "Enregistrer et continuer",+ "bounded_note": "Un agent n'obtient jamais plus que vous, et uniquement ce que vous approuvez."}}}diff --git a/packages/dashboard/src/locales/pl.json b/packages/dashboard/src/locales/pl.jsonindex 95f969a16d..e8b101fd4a 100644--- a/packages/dashboard/src/locales/pl.json+++ b/packages/dashboard/src/locales/pl.json@@ -6437,15 +6437,20 @@"mcp_connect": {"open_cta": "Połącz agenta","title": "Połącz agenta",- "subtitle": "Wskaż asystentowi AI ten sklep. Odeśle Cię tutaj, abyś zatwierdził, co może robić.",- "url_label": "Adres MCP Twojego sklepu",+ "subtitle": "Wybierz asystenta, któremu chcesz dać dostęp do tego sklepu.","step_paste": "Wklej ten adres w konektorze lub ustawieniach MCP swojego klienta.","step_sign_in": "Odeśle Cię tutaj, abyś się zalogował.","step_approve": "Zatwierdź, co agent może robić. Możesz to cofnąć w dowolnej chwili na tej stronie.",- "scope_note": "Agent nigdy nie dostaje więcej niż Ty i tylko to, co zatwierdzisz. Zgoda na produkty nie obejmuje zamówień.",- "cli_note": "Do skryptów, CI i wszystkiego, co nie może się zalogować, użyj Spree CLI z kluczem API — tutaj klucze API nie są akceptowane.","client_id_label": "Identyfikator klienta",- "client_id_help": "Niektórzy klienci proszą o niego przed startem. Jest wydawany osobno dla każdego sklepu — użyj tego dla łączonego klienta."+ "client_id_help": "Niektórzy klienci proszą o niego przed startem.",+ "ready_title": "{{client}} jest gotowy do połączenia",+ "ready_subtitle": "Wklej to w kliencie, a następnie zatwierdź, co może robić.",+ "endpoint_label": "Adres MCP Twojego sklepu",+ "copy_endpoint": "Kopiuj adres",+ "copy_client_id": "Kopiuj identyfikator klienta",+ "other_title": "Coś innego",+ "other_cta": "Zarejestruj i kontynuuj",+ "bounded_note": "Agent nigdy nie dostanie więcej niż masz Ty i tylko to, co zatwierdzisz."}}}diff --git a/packages/dashboard/src/locales/zh-CN.json b/packages/dashboard/src/locales/zh-CN.jsonindex 17eda161ea..ff5dfd4e79 100644--- a/packages/dashboard/src/locales/zh-CN.json+++ b/packages/dashboard/src/locales/zh-CN.json@@ -6356,15 +6356,20 @@"mcp_connect": {"open_cta": "连接代理","title": "连接代理",- "subtitle": "将 AI 助手指向此店铺。它会把您送回这里,确认它可以做什么。",- "url_label": "您店铺的 MCP 地址",+ "subtitle": "选择要授予此店铺访问权限的助手。","step_paste": "将此地址粘贴到客户端的连接器或 MCP 设置中。","step_sign_in": "它会把您送到这里登录。","step_approve": "确认代理可以做什么。您随时可以在此页面收回。",- "scope_note": "代理获得的权限绝不会超过您自己,且仅限您确认的范围。确认商品访问权限并不包含订单。",- "cli_note": "对于脚本、CI 或任何无法登录的场景,请改用 Spree CLI 配合 API 密钥——此处不接受 API 密钥。","client_id_label": "客户端 ID",- "client_id_help": "部分客户端在开始前会要求填写。它按店铺分别签发,请使用您要连接的客户端对应的 ID。"+ "client_id_help": "部分客户端在开始前会要求填写。",+ "ready_title": "{{client}} 已可连接",+ "ready_subtitle": "将这些粘贴到客户端,然后批准它可以做什么。",+ "endpoint_label": "您店铺的 MCP 地址",+ "copy_endpoint": "复制地址",+ "copy_client_id": "复制客户端 ID",+ "other_title": "其他",+ "other_cta": "注册并继续",+ "bounded_note": "代理获得的权限绝不会超过您自己的,且仅限于您批准的部分。"}}}diff --git a/spree/core/app/services/spree/seeds/oauth_applications.rb b/spree/core/app/services/spree/seeds/oauth_applications.rbdeleted file mode 100644index c6e688e63e..0000000000--- a/spree/core/app/services/spree/seeds/oauth_applications.rb+++ /dev/null@@ -1,49 +0,0 @@-module Spree- module Seeds- # Pre-registers the consumer MCP clients.- #- # Hosted connectors cannot register themselves: dynamic client- # registration is deprecated in the current MCP revision, and client ID- # metadata documents are not yet supported by the authorization server.- # Pre-registration is the first option in the spec's own priority order,- # and it means a merchant pastes their store URL into the client and signs- # in — nothing to create first.- class OauthApplications- prepend Spree::ServiceModule::Base- include StoreScoped-- # Each client's own documented callback. A redirect URI is the one thing- # that cannot be guessed at runtime, so it is registered rather than- # accepted from the request.- CLIENTS = [- {- name: 'Claude',- redirect_uri: 'https://claude.ai/api/mcp/auth_callback'- },- {- name: 'ChatGPT',- redirect_uri: 'https://chatgpt.com/connector_platform_oauth_redirect'- }- ].freeze-- private-- def seed(store)- CLIENTS.each do |client|- next if store.oauth_applications.exists?(name: client[:name])-- store.oauth_applications.create!(- name: client[:name],- redirect_uri: client[:redirect_uri],- # Public: a hosted connector runs on the vendor's servers and- # cannot keep a secret, which is why PKCE is mandatory.- confidential: false,- # Granted at consent, not at registration — the merchant decides- # what a client may do, and may re-consent to change it.- scopes: ''- )- end- end- end- end-enddiff --git a/spree/core/app/services/spree/seeds/store_resources.rb b/spree/core/app/services/spree/seeds/store_resources.rbindex 62c3e2dd27..2a843cbbe6 100644--- a/spree/core/app/services/spree/seeds/store_resources.rb+++ b/spree/core/app/services/spree/seeds/store_resources.rb@@ -31,7 +31,6 @@ module SpreeSellerRequirements.call(store: store)# Binds to the wholesale channel that Channels creates above.ApiKeys.call(store: store)- OauthApplications.call(store: store)SavedReports.call(store: store)AllowedOrigins.call(store: store)end