Inspiration

Big retailers are already selling to AI agents. They have product feeds, APIs and engineering teams to wire themselves into Claude and ChatGPT. The bakery, the potter and the tea shop down the road have none of that, so to an AI they don't exist. Shelf gives them a way in within minutes, with PayPal handling the money.

What it does

  • Import: the owner pastes their website or Instagram, pastes a price list, or uploads a photo of the menu. Claude drafts the catalogue: names, prices, descriptions, tags, currency and fulfilment. It's told to extract only products and prices that are actually there, never to invent them.

  • Review: the owner checks every row in an AG Grid table. Channel3 shows what similar products sell for online, so an underpriced item stands out before it goes live.

  • Publish: each product is created in the PayPal Catalog Products API. The shop gets its own storefront, its own MCP server (/s/<shop>/mcp), llms.txt and a JSON feed. One directory MCP (/mcp) covers every shop on Shelf.

  • An agent buys: any MCP agent (Claude, ChatGPT, Cursor or Shelf's built-in demo agent) can search, compare and call create_checkout. That creates a real PayPal order whose total is worked out on the server and returns an approval link. The buyer approves in PayPal, and Shelf captures the payment (also confirmed by webhook), marks the order PAID and takes the item out of stock. The agent then calls get_order_status and only reports "paid" once Shelf says so.

  • The owner: a live dashboard shows revenue, orders, how much was bought by agents, and what agents searched for. A copilot built on the PayPal Agent Toolkit answers questions, adds shipment tracking and issues refunds, but refunds and tracking wait for the owner to press Approve.

Guardrails

  • Agents can't pay. A person approves every order in PayPal.

  • People approve. Refunds and tracking from the copilot need the owner's Approve; public demo dashboards are view-only.

  • Prices come from the shop. Agents send only product IDs and quantities; totals are computed on the server, so a prompt can't change what's charged.

  • Stock is held. The last item can't sell twice, cancelled orders are never charged, and unapproved checkouts expire.

  • Shop text is data. Product descriptions are passed to agents as data, never as instructions.

  • An order only counts as PAID after PayPal's capture returns COMPLETED. Webhooks are signature-verified, the importer blocks internal addresses, and AI, import and checkout endpoints are rate-limited.

How we built it

  • App: Next.js 15, React 19, TypeScript, Tailwind CSS 4. Neon Postgres, hosted on Vercel.

  • AI: Vercel AI SDK with Claude (Google Gemini as fallback): structured output for import, tool calling for the agent and copilot.

  • MCP: @modelcontextprotocol/sdk over streamable HTTP. The demo agent connects to the same public /mcp endpoint through @ai-sdk/mcp, exactly like an outside agent.

  • PayPal: Orders v2 (create and capture), Catalog Products, Tracking, Refunds, webhook verification, and @paypal/agent-toolkit for the copilot.

  • Catalogue tools: AG Grid for review and editing; Channel3 for market prices.

  • Photos: real, freely licensed product photos (library or Wikimedia Commons), credited on each storefront.

Challenges

  • Turning messy sources (menu photos, Instagram captions) into catalogues an owner can trust and fix quickly.

  • Making the agent flow autonomous right up to the moment money moves, and no further.

  • Keeping stock, refunds and PayPal's own records in step when payments, cancellations and webhooks arrive in any order.

What's next

Per-shop payouts through PayPal partner onboarding (today every payment goes to one Shelf account), product variants, PayPal Vault with buyer spending limits for returning customers, and listing Shelf in agent marketplaces.

Built With

Share this project:

Updates

Submission history