Skip to main content
Glama
lavu1

Duka Stock MCP Server

by lavu1

Duka — Stock, spoken.

Verify Duka

Watch the 2:06 demo · Judge testing guide · MCP integration · MIT license

A working voice-and-text stock assistant for a small shop. Record sales and deliveries, check low stock, and prepare reorder drafts. Every stock change requires explicit review. Products, suppliers, and prices are fictional sample data for a Lusaka corner shop.

Built as an Alexa+ web simulation for the Build, Ship, Shape: Amazon Developer Hackathon. This version uses browser speech recognition, a deterministic command parser, and a real HTTP MCP tool endpoint. It is not connected to Alexa, an Echo device, an LLM, or a supplier.

Try it

  1. Type Sold 3 milk and 2 bread.

  2. Check the before-and-after quantities, then choose Confirm update.

  3. Type Received twelve bread and confirm.

  4. Ask What is running low?, then choose Reorder draft.

  5. Review and save the draft. Open Reorders to download its CSV.

  6. Open Activity to see confirmed changes. Reloading preserves the shop.

The microphone writes a transcript into the input. Check it before sending. Browser support varies, so typed commands and manual product updates are also available. Voice recognition may send audio to the browser vendor's speech service.

Related MCP server: Korral StoreLink MCP

Run locally

Requires Node.js 22.13 or later and npm.

npm ci
npm run build
node --import ./scripts/sites-env.mjs ./node_modules/wrangler/bin/wrangler.js d1 execute DB --local --persist-to .wrangler/state --config dist/server/wrangler.json --file drizzle/0000_nervous_black_queen.sql
npm run dev

Open http://localhost:5173. Run the initial SQL once for a fresh local database. The Sites development server supplies a sample signed-in identity. No model API key is needed.

Sites handles hosted builds and generated D1 migrations. The logical binding in .openai/hosting.json is DB; do not replace it with a Cloudflare database ID. Preserve the supplied Vite plugin and build infrastructure.

Project map

Location

Purpose

components/shop.tsx

Inventory, voice input, review, drafts, activity

lib/stock.ts

Catalog, command grammar, quantities, reorder rules

lib/server.ts

Identity, persistence, atomic confirmation

app/api/mcp/route.ts

MCP initialization and four tools

db/schema.ts, drizzle/

Schema and generated migration

tests/

Domain tests and isolated Worker integration checks

docs/

Architecture, protocol usage, validation

submission/

Devpost draft, video script, friction log, checklist

Verify

npm test
npm run typecheck
npm run build
npm run test:integration:isolated

For HTTP/database checks, follow the isolated test setup. They change sample stock and must not target real data or the usual development preview.

Current boundaries

  • English stock commands, whole units, ten sample products. Catalog editing, offline use, roles, and supplier integrations remain future work.

  • Reviews expire after ten minutes. Conflicting updates require a fresh review. Replaying a successful confirmation cannot deduct stock twice.

  • Orders are unsent drafts; no payments or supplier messages are made.

  • Hosted access uses Sites account authentication. Tool responses provide a refresh-safe review link. An external Alexa client still needs supported authentication.

  • The public English demo shows typed input with fictional shop data and synthetic narration. Merchant trials and microphone/device compatibility studies remain future work.

  • Final Devpost submission awaits the rules-and-terms agreement.

Project code is MIT licensed. Bundled dependencies retain their licenses; see third-party notices.

Related MCP Connectors

Related MCP Servers

  • A
    license
    D
    quality
    D
    maintenance
    Enables natural-language control of e-commerce operations including product management, order processing, inventory tracking, customer service, content generation, and advertising analytics through 15 integrated MCP tools. Provides a local-first commerce automation solution with SQLite storage and extensible channel adapters for end-to-end online store workflows.
    15
    3
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables stock assessment and replenishment by exposing three deterministic tools: inspect stock positions, raise replenishment orders, and check order status. Includes an auditable local client and follows a security-first design with limited API surface.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to read current pantry inventory and low-stock shopping needs, export a shopping queue, and perform idempotent inventory adjustments and catalog link management through remote MCP tools.
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables AI-powered warehouse inventory management through MCP, with tools to search products, check stock levels, receive and issue stock, and add products under human-in-the-loop confirmation.
    -