Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Sufra

Inspiration

Millions of restaurant orders in Egypt still happen by phone call or chat, in dialect, with edits like "same as Friday, no onions". A voice assistant that understands that kind of request, and remembers what you ordered last time, is the natural fit for Alexa+. Alexa+ add-ons talk to services over MCP, so we built the restaurant side as an MCP server.

What it does

Sufra is an MCP server (Streamable HTTP, spec 2025-11-25, OAuth 2.1 + PKCE discovery) that gives an Alexa+-style assistant 11 tools: search a menu with Egyptian-Arabic aliases, build a cart with modifiers, quote with 14% VAT, confirm and place an order (placing needs an explicit confirm: true), check order status, and remember past orders and preferences across sessions.

Say «اطلب لي نفس طلب الجمعة بس من غير بصل» and the agent finds your last Friday order, drops the onions only from the dishes that have onions, quotes the total with VAT, asks for confirmation, places the order and remembers it.

Alexa+ is simulated in a web app (voice in via browser speech recognition, spoken replies, cards, a live MCP tool trace) because no Alexa+ device or Egyptian-Arabic Alexa+ access was available for testing. The same MCP server can be connected to a real Alexa+ client over a public HTTPS URL.

How we built it

Node 22 and TypeScript, the official MCP SDK, and a single-file web simulator. A pure, tested core (src/core: Arabic normalisation and alias search, cart, VAT in integer piasters, order memory) is wrapped by the MCP server (src/mcp). The simulator's agent host (src/agent) is an OpenAI-compatible LLM tool-calling loop, with a hard spend cap, that calls the tools through MCP, so it exercises the same server an Alexa+ client would. Without an API key a deterministic rules parser is used. 26 automated tests cover the protocol version, auth, PKCE, the order flow, memory and Arabic search.

Challenges we ran into

  • Egyptian Arabic: dialect aliases, spelling variants and "same as Friday / yesterday" resolved in Cairo time.
  • Applying edits only where they make sense ("no onions" only on dishes that contain onions).
  • Following the Alexa+ MCP add-on guide for auth (401 without a WWW-Authenticate header, RFC 9728 protected-resource metadata) while staying valid against the MCP spec. We kept a friction log in the repo.
  • Not having an Alexa+ device or account for Egyptian Arabic, so we built a simulator and are explicit about what is real and what is simulated.

Accomplishments that we're proud of

  • A spec-compliant MCP server with an OAuth 2.1 + PKCE demo flow, asserted by tests that use the official MCP SDK client.
  • A natural dialect reorder flow with explicit confirmation before any order is placed.
  • A clear "real vs simulated" table and a friction log instead of overclaiming.

What we learned

Voice commerce is mostly about state and confirmation: remembering past orders, resolving references like "same as Friday", and never placing an order without an explicit yes. Keeping tools deterministic and local, with the LLM in the host, keeps the server fast and testable.

What's next for Sufra

Test on a real Alexa+ device once Egyptian-Arabic access is available, replace the demo identity with a real identity provider, add payments and a real kitchen/POS integration, and support more than one restaurant.

Demo data: the restaurant, menu and customer are fictional. Code: https://github.com/alf7ar/sufra-agent

Built With

Share this project:

Updates

Submission history