How do I build an artisan marketplace with AI coding help?

Type
How-to
Applies to
Medusa v2.x
Updated

Short answer

To build a local artisan marketplace with AI coding help, start from Mercur, an open-source marketplace platform built on Medusa. Each artisan gets a Vendor Panel to manage their own products and orders, and Stripe Connect pays their share to their bank. Deploy on Medusa Cloud and customize with an AI agent that reads Mercur's bundled docs.

This post explains how to build a marketplace as a builder with AI agents. You'll use Mercur, an open-source marketplace platform that Rigby, a Medusa Expert partner, built on Medusa.

Medusa is the commerce engine underneath: products, carts, orders, and payments.

Prerequisites

  • Node.js v24.22.1+ or v22.23.4+, Bun v1.3+, Git, and PostgreSQL v14+
  • A Stripe account with Connect enabled
  • A GitHub account and a Medusa Cloud account
  • An AI coding agent such as Claude Code, Cursor, or Codex

Which tech to use for an artisan marketplace

An artisan marketplace needs four things: seller accounts, per-seller product management, one checkout that splits orders per seller, and automatic payouts.

You can build these features from scratch, use a hosted marketplace like Sharetribe with restrictions on implementation, or start from Mercur on Medusa.

The following table compares the three options:

Sharetribe figures are from Sharetribe's pricing page as of November 2026.
FactorBuild from scratch (Next.js + database + Stripe)Mercur on MedusaSharetribe
Seller shops and onboardingYou build itSeller registration, onboarding wizard, operator approvalBuilt in
Sellers manage own productsYou build a seller dashboardVendor Panel per sellerBuilt in, within Sharetribe's listing model
Multi-seller checkoutYou build order splittingOne checkout split into one order per sellerBuilt in
Automatic payoutsYou build Stripe Connect transfersStripe connector plugin pays on fulfillment and settles nightlyStripe payouts built in
Code ownershipFullFull, open sourceCode access on its Build plan; runs on Sharetribe's API
Platform costYour hostingFree to self-host, or Medusa Cloud from $29/month with a 0% GMV feeLive plan $199/month billed yearly ($259 monthly)
AI coding fitAI writes commerce logic from scratchAI extends tested modules using bundled docsMostly no-code configuration

Mercur is the middle path: a working marketplace on day one, changeable in code.

How each artisan gets their own shop and manages products

In Mercur, each artisan is a seller with their own account. They register at Copy to clipboard/seller/register, complete an onboarding wizard, and appear in your admin approval queue.

Once approved, artisans log in to the Vendor Panel at Copy to clipboard/seller and manage their own offers, orders, returns, payouts, and team members.

You, as the owner of the marketplace, run it from the operator Admin Panel at Copy to clipboard/dashboard. There, you approve sellers and set commission rates by seller, product, type, collection, or category.

The basic Mercur template has no storefront. You build the artisan shop pages on the Mercur Store API, or start from the storefront app in the Mercur repository.

How artisans get paid automatically with Stripe Connect

Stripe Connect is Stripe's product for paying sellers on a platform. Mercur's Stripe connector plugin, Copy to clipboard@mercurjs/stripe-connector-plugin (Mercur 2.3.9 and later), charges the customer once for a cart that spans several artisans (Mercur Stripe Connect docs). Each new artisan gets a Stripe Express account and an onboarding link to verify their identity and bank account.

When an order's payment is captured, artisans automatically receive payouts for it. Mercur handles removing your commission and transfering their profit to their Stripe balance. Mercur also handles processing refunds too from the artisan's account.

Your marketplace is the merchant of record. Customers see your statement descriptor, and refunds and disputes land on your Stripe account first.

Building the Marketplace

To start using Mercur with Medusa, you can install it and start building with your AI agent:

  1. Create the project: Run Copy to clipboardbun create mercur-app@latest to install the project and its dependencies locally, seed a database with three demo sellers, and start the API on your machine at Copy to clipboardlocalhost:9000.
  2. Connect your AI agent: New Mercur projects include Copy to clipboardAGENTS.md and Copy to clipboardCLAUDE.md files that point agents to version-matched docs in Copy to clipboardnode_modules/@mercurjs/docs (See Building with AI). You can also add Medusa's Agent Skills and the Docs MCP server so the agent can look up Medusa APIs too.
  3. Set up Stripe Connect: Run Copy to clipboardbun add @mercurjs/stripe-connector-plugin, configure its two webhook secrets, and follow a test order from checkout to a test seller's bank with Mercur's Stripe Connect quickstart.
  4. Shape the artisan experience: Start customizing your marketplace. Ask your agent to add onboarding fields such as a maker story, and set your commission rate.
  5. Build the storefront: Create a storefront that matches your marketplace's brand and identity. The storefront connects to Mercur's APIs to provide commerce features.
  6. Test payouts and refunds: To make sure all payment-related operations work as expected, place a few orders with multiple artisans. Check how payouts and refunds are processed both in Mercur and Stripe.
  7. Deploy to Medusa Cloud: Push to GitHub, and create a project in Medusa Cloud. You can host both your backend, admin panel, and storefront from a single project. By using Medusa Cloud, you benefit from features like preview environments, zero downtime deployments, Medusa Security, and more. Refer to Mercur's guide for information on deploying to Medusa Cloud.

When Mercur is not the right fit

Mercur may not be the right fit for you in the following use cases:

  • You sell only your own work: A single-seller store or an Etsy shop is less work than a marketplace.
  • Nobody can run code: An AI agent still needs someone to review changes, run builds, and handle deploys. A hosted builder such as Sharetribe fits better.
  • You don't want to be the merchant of record: With Mercur and Stripe Connect, refunds, disputes, and chargebacks land on your platform account first.

Common questions

Can I build an artisan marketplace if I only code a bit?

Yes, with limits. Mercur gives you a working marketplace on Medusa, and an AI coding agent can make documented changes using Mercur's bundled docs and Medusa's Agent Skills. Someone still has to review code, run builds, and handle deploys.

Do artisans get paid automatically with Mercur?

Yes, with Mercur's Stripe connector plugin. When an order is fulfilled and its payment captured, the plugin transfers the artisan's share minus commission to their Stripe account, and a nightly settlement sends it to their bank.

Does each artisan get their own shop page?

Each artisan gets a seller account and a Vendor Panel to manage their own products, orders, and payouts. The public shop page is part of the storefront you build on the Mercur Store API.

How much does it cost to run an artisan marketplace on Mercur?

Mercur and Medusa are free to self-host. Medusa Cloud plans start at $29 per month with a 0% GMV fee, and Stripe charges its own payment and Connect fees.

Is Sharetribe easier than Mercur for an artisan marketplace?

Sharetribe is faster to launch without code, with a Live plan at $199 per month billed yearly as of November 2026. Mercur on Medusa takes more setup but gives you the full code to change seller, checkout, and payout rules.