Inspiration
Modern smart homes are filled with isolated silos: smart locks on one platform, lighting on another, security cameras on a third, and voice assistants acting primarily as rigid command routers rather than true context-aware agents. With the advent of Alexa+ and the emergence of the Model Context Protocol (MCP), we saw an opportunity to rethink how ambient voice intelligence interacts with physical spaces.
Instead of hardcoded integrations and brittle skill intents, we wanted to build a unified household agent that operates like an autonomous reasoning engine:
- Synthesizing cross-device contexts (e.g., packages delivered on porch + front door unlocked = proactive safety alert).
- Grounding voice queries directly in live device state and historical event feeds.
- Exposing a standardized, open-protocol bridge between ambient assistant clients and real hardware.
What It Does
Smart Home Console is a dual-tier system consisting of:
- A Streamable HTTP MCP Server: A high-performance TypeScript backend implementing the MCP specification over JSON-RPC 2.0. It exposes four primary household tools:
get_household_digest: Aggregates device statuses, delivery events, and household presence.query_security_events: Surfaces doorbell rings, driveway motion, and access-log anomalies.execute_device_action: Safely modifies physical states (locks, climate, lighting, garage doors).schedule_family_reminder: Dispatches prioritized reminders to ambient displays and speakers.
- The Alexa+ Interactive Testbed: A real-time web console featuring an Alexa+ conversational planner, live device status dashboard, and an inspectable JSON-RPC trace inspector that visualizes requests, responses, tool arguments, and latency metrics in real time.
How We Built It
We designed the architecture around decoupled, standards-compliant layers:
[ Ambient Assistant / Alexa+ UI ]
│
▼ (HTTP POST JSON-RPC 2.0)
[ Streamable HTTP MCP Server ]
│
┌──────────┼──────────┬──────────┐
▼ ▼ ▼ ▼
[Digest] [Security] [Devices] [Reminders]
- Backend Architecture (Node.js & TypeScript)
- Built on Express with full Streamable HTTP MCP compliance, supporting both
application/jsonandtext/event-stream(SSE) transports. - Implemented an in-memory session manager with sliding-window TTL $\tau = 3600\,\text{s}$ (60 minutes) and automated garbage-collection pruning: $$\text{Expired}(s) \iff (t_{\text{current}} - t_{\text{last_active}}) > \tau$$
Handled MCP JSON-RPC 2.0 protocol lifecycle methods:
initialize,notifications/initialized,ping,tools/list, andtools/call.Frontend Testbed (React, TanStack, Tailwind CSS)
Features a responsive three-pane layout: conversational assistant, live smart home telemetry tiles, and a live protocol trace viewer.
Provides immediate visual feedback for state mutations (lock toggles, dimmer sweeps, reminder alerts) and supports testing both live remote servers and local deterministic mock sessions.
Challenges We Faced
- Streamable HTTP & CORS Preflight Complexities:
Adhering strictly to MCP streamable requirements while enabling smooth browser-to-server cross-origin communication required fine-tuning CORS preflight (OPTIONS) headers. Custom protocol headers likeMCP-Protocol-Versiontriggered preflight rejections in certain environments unless explicitly allowed or normalized in client transports. - Deterministic State Synchronization:
Bridging asynchronous tool execution with an immediate user feedback loop meant ensuring device states reflected physical reality. When a tool likeexecute_device_actionreturns an updated state object, the console synchronizes state idempotently: $$S_{t+1} = f(S_t, \alpha)$$ where $\alpha$ is the action payload and $S$ represents the device state vector. - Deployment Nuances:
Deploying across distributed platforms (Render for backend execution and Vercel for the web frontend) introduced cold-start latencies and root vs. endpoint routing issues (e.g., routingPOST /mcpvs root paths), which we addressed by adding URL normalization and active health-probe handshakes.
What We Learned
- MCP is the right abstraction for physical devices: Decoupling LLM tool invocation from vendor-specific SDKs allows an assistant to discover capabilities dynamically via
tools/listrather than compiling static schemas ahead of time. - Trace observability is essential for agent development: Having a side-by-side JSON-RPC trace viewer turned opaque AI tool execution into inspectable, debuggable engineering steps.
- Ambient interfaces require stateful sessions: Household tasks rarely happen in isolation; maintaining lightweight session memory enables multi-turn contextual commands (e.g., "Dim the lights" followed by "A little brighter").
What's Next for Smart Home Console
- Hardware Bindings: Connecting the MCP server directly to the Amazon Alexa Smart Home Skill API, Ring Webhooks, and Matter/Thread local bridges.
- Proactive Vision Pipelines: Integrating AWS Bedrock / multimodal models to summarize live Ring snapshot feeds into natural language digests.
- Multi-tenant Household Scopes: Adding granular permission tiers so guest profiles cannot trigger sensitive actions like unlocking exterior deadbolts.
Built With
- ai-agents
- alexa+
- express.js
- json-rpc
- mcp
- node.js
- server-sent-events(sse)
- streamable-http
- typescript
Log in or sign up for Devpost to join the conversation.