feature-mcp-connect
Connecting an AI assistant to a customer's account: the storefront's side of the MCP authorization flow. The customer signs in on the shop's own login page, or continues as a guest, approves the assistant and makes the choices the shop asks for. The assistant gets a session of its own, so the visitor's browser session stays as it is.
Get started
Install the package with the peer dependencies it needs. It comes from the Evolve registry, which needs a one-time sign-in.
pnpm add @evolve-storefront/feature-mcp-connect graphql next-intl reactRequirements3
graphql>=16next-intl>=4react>=19Import its styles in the stylesheet where you load Tailwind. Without them the components render unstyled.
@import "@evolve-storefront/feature-mcp-connect/styles.css";Add its translations to your message files with
evolve messages.
Then render it on a page:
// lib/mcp.tsimport { createConnectFlow } from "@evolve-storefront/feature-mcp-connect/server";
export const connectFlow = createConnectFlow({ authorizationServer: process.env.MCP_URL, interactionSecret: process.env.MCP_INTERACTION_SECRET, endpoint: `${gatewayUrl}/graphql`, login: CustomerLogin, // from @evolve-storefront/feature-auth/documents guest: SessionGuestCreate, // from @evolve-storefront/session/documents guestScopes: ["shop"],});Components
What you place on your pages. Each one has a preview, its props, and how to change its layout.
Hooks
1 hook to read and change the data yourself, for when you build your own UI. All hooks
More in this package
- Setup and server: what the package needs in your project.
- Advanced: other functions and constants, types.

