Inspiration
On a factory floor, shift handover often lives on paper or in someone's head: which line stopped and why, what the next shift must re-check, what stock is running low. A plant manager walking the floor has no hands free for a dashboard. LineLedger lets them ask by voice and get a short spoken answer.
What it does
LineLedger is a voice-first co-pilot backed by a self-hosted MCP server (spec 2025-11-25, Streamable HTTP). Ask "why is line 2 down?", "is the sealer temperature normal?" or "stock of heater band" and it answers from live plant data. You can also save handover notes and follow-ups, and plan container loads with a separate open-source package I published.
The web app simulates the voice experience: microphone, spoken replies, a live dashboard, and a trace of the real MCP messages. It is a simulation. It is not connected to a real Alexa+ device or the Alexa developer console. All data is synthetic, and the server only reads and reports; it never controls equipment.
How we built it
- MCP server (TypeScript, Node 22): the official MCP SDK, Express and zod schemas. 12 tools and one subscribable resource (
plant://snapshot). Stateful sessions with server push, so the dashboard updates by itself. - Plant simulation: a seeded simulation of a fictional plant, Tarnby Works, with 7 lines, 3 shifts, random faults, rejects, material use, and a scripted story day (a sealer overheat on Line 2).
- Web client: Vite and vanilla TypeScript, the Web Speech API for voice, and a live trace drawer.
- Optional agent: Python with Strands Agents and a small local model (Ollama) as an alternative to the rule-based planner.
- Storage: SQLite by default. Optional switches exist for DynamoDB, Bedrock and SNS. They are off by default and were only tested against local stand-ins, not real AWS.
Challenges we ran into
- Keeping a live, stateful MCP connection reliable across server restarts.
- Making the simulation deterministic but still lively.
- Getting a small CPU-only local model to pick tools and report numbers correctly. It is slower and less exact, so the rule-based planner is the default.
- Being honest about what is simulated and what is real.
Accomplishments that we're proud of
- A complete MCP server (spec 2025-11-25) with live push, and a trace panel that shows only real traffic.
- A simulation that runs a realistic, reproducible story day.
- 71 server tests (113 with DynamoDB Local), 7 browser end-to-end tests, 19 agent tests, contrast checks and CI.
- Fully open source under the MIT licence, with no paid service needed to run it.
What we learned
MCP separates what the assistant can do from which assistant talks to it. The same server could sit behind an Alexa+ add-on later. Small local models are good at choosing tools but unreliable with numbers, so deterministic rules should handle the exact facts.
What's next for LineLedger: Factory-Floor Co-pilot
Host the server over HTTPS, add OAuth account linking, write the Alexa+ add-on manifest, test in the Alexa+ simulator and on a device, and support one plant per linked account.
Built With
- express.js
- github
- model-context-protocol
- node.js
- ollama
- playwright
- python
- sqlite
- strands-agents
- typescript
- vite
- vitest
- web-speech-api
- zod
Log in or sign up for Devpost to join the conversation.