Inspiration

Small shop owners spend a lot of time manually tracking stock and sales, often with no system beyond memory or a paper notebook. I wanted to see what that looks like if you could just talk to your stock system the way you'd talk to an employee: "add 20 units of rice," "I just sold 3," "what's running low?"

What it does

Shop Assistant is a self-hosted MCP server for the Alexa+ track. It exposes six tools over Streamable HTTP:

  • ping – confirms the server is running
  • add_stock – adds stock for an item, creating it if new
  • record_sale – records a sale and reduces stock
  • check_stock – reports units left for an item
  • list_low_stock – lists items at or below their reorder level
  • draft_reorder – drafts a ready-to-send supplier order for everything low

Stock and sales data is saved to a local JSON file, so it survives restarts. Connected to Claude Desktop, a shop owner can say "sell 3 units of rice, then tell me if I need to reorder anything," and the assistant chains the right tools together automatically, including drafting the actual supplier message.

How I built it

The server is written in Node.js and TypeScript, using the official MCP TypeScript SDK with the Streamable HTTP transport (spec 2025-11-25), Express for the HTTP layer, and Zod for validating tool inputs. Each tool is registered with server.registerTool, and a small storage module reads and writes a JSON file on disk for persistence.

For security, the server validates the Origin header on incoming requests against an allow-list and binds only to 127.0.0.1, per the MCP spec's guidance for local servers. To demo it with a real client, I exposed the local server over HTTPS using ngrok and connected it to Claude Desktop as a custom MCP connector.

Challenges I ran into

Claude Desktop's custom connector UI currently supports OAuth or no authentication, but not a static API key header over Streamable HTTP. Since my server originally required an API key, Claude Desktop's probe request received a 401 and assumed OAuth was required. I resolved this by relying on the Origin allow-list plus an unguessable tunnel URL instead, and noted this platform limitation as product feedback.

What's next

I'd like to add a database-backed version for multi-device sync, a web dashboard for a non-technical shop owner, and look into Bedrock for summarizing sales trends in plain language.

Built With

Share this project:

Updates

Submission history