Grace & Carry AI Assistant

AI assistant for Medusa store admins to manage products, orders, inventory, and customers through chat.

Back to Projects
MedusaJS, MCP, Vercel AI SDK, React, PostgreSQL, SQLite, Redis

Store Admin Through Conversation

Grace & Carry is an e-commerce project for a women's fashion boutique. The store needed a strong admin foundation before launch, since product setup, inventory checks, order handling, and customer lookup become repetitive as the catalog grows.

I built an AI assistant for the Medusa admin that lets store operators ask for work in plain language. Instead of clicking through several admin screens, they can ask questions, review data, and run supported store operations from a chat interface.

Grace & Carry AI Assistant

The Problem

Most store admin tasks are simple on their own, but slow in volume. A store owner might need to find pending orders, check low-stock products, update product data, or inspect customer records. Each task involves different screens, filters, and forms.

The goal was to make those workflows conversational without giving the AI unrestricted access to the store. The assistant needed to find the right operation, pass valid parameters, handle large results, and ask for approval before sensitive actions.

How I Built It

The core is a Model Context Protocol server connected to MedusaJS. It exposes Medusa admin and storefront operations as callable tools. Instead of hand-writing every tool, the server builds them from OpenAPI specs and makes them searchable.

The assistant uses semantic tool search to find the right operation for each request. A query like "show pending orders from last week" maps to order listing operations and the required filter schema. The search combines embeddings, keyword matching, and domain terms so store language like "stock" maps to inventory concepts.

After a tool is selected, execution goes through one interface. That layer validates parameters, converts common data types, applies the right authentication scope, and blocks risky operations until the user approves them.

Handling Large Store Data

Product and order queries can return large payloads. Passing everything into the model would make the assistant slower and less accurate.

I added cursor-based result storage for large responses. When a result passes the size threshold, the system stores the full payload and returns a short preview with a cursor ID. The assistant can then page, filter, and sort the stored result as the conversation continues.

This keeps the chat readable while the full dataset stays available for follow-up questions.

Conversation Memory

Long admin sessions often span several tasks. The assistant tracks context across a conversation, then summarizes older messages when the context gets too large.

The summary keeps only useful information, such as current goals, decisions, and pending tasks. It removes tool noise and internal details before carrying the context into later turns. This helps the user continue a session without repeating the same setup.

Safety Boundaries

Store operations can affect real orders and inventory. I added an approval layer for sensitive actions, including deletes, refunds, cancellations, and critical updates.

The assistant can prepare the operation, explain what it is about to do, and wait for user approval. The action does not run until the user confirms it in the UI.

Stack

  • MedusaJS v2 for commerce data and admin operations
  • Model Context Protocol for tool exposure
  • Vercel AI SDK for chat and streaming responses
  • React and Tailwind CSS inside the admin UI
  • PostgreSQL for Medusa data
  • SQLite for stored result cursors
  • Redis for session state

Result

The project turns store management into a guided chat workflow. Store admins can inspect orders, review inventory, prepare product updates, and continue multi-step tasks without losing context.

The main engineering constraint was control. The assistant needed enough access to be useful, but every operation still had to pass through validation, scoped authentication, result limits, and approval checks.

Connect
Let's get in touch