Inspiration

Small merchants often have overstocked products and no time to write promos. We wanted a dashboard where an AI agent and a human work side by side: the agent proposes actions, the human stays in control.

What it does

MerchantOS registers three WebMCP tools in the browser:

  • search_inventory (read-only): filter products by keyword and minimum stock
  • apply_bulk_discount (write): discount high-stock, low-sales products
  • generate_promo_copy (write): draft short promo copy via an AI endpoint

How we built it

  • Frontend: vanilla JavaScript + WebMCP, hosted on Netlify
  • AI bridge: Netlify Function /api/promo calls Fireworks AI (DeepSeek v4 flash) with strict limits (max 3 products, max_tokens 200)
  • Fallback: deterministic mock copy when AI is unavailable

Challenges

  • Keeping AI costs near zero: single endpoint, tiny context, capped output
  • Making agent actions visible: every write triggers a UI update so the human can review
  • Parsing AI output reliably: strict prompt + lenient parser + safe defaults

What we learned

WebMCP makes agent actions transparent and auditable on a real UI — a practical pattern for human + agent collaboration.

Built With

  • fireworks-ai
  • javascript
  • netlify
  • netlify-functions
  • webmcp
Share this project:

Updates