Inspiration
MCP is quickly becoming the way assistants like Alexa+ reach external tools, but the protocol is invisible. When a tool call fails, a response is slow, or a schema is wrong, developers are left guessing or digging through raw logs. We wanted to make that conversation visible.
What it does
MCP Lens has three parts:
- An MCP server exposing a personal notes workspace through four tools:
search_notes: keyword and date-range searchsummarize: streams its summary back in chunks as it is generatedextract_tasks: returns structured tasks (owner, due date, source note) validated against a declared output schemadraft_reply: drafts a reply in a friendly, formal or brief tone
- The Lens, a web view of the live protocol:
- The handshake (
initialize, capability negotiation,initialized,tools/list) as a timeline - Every tool call with raw request and response JSON, latency and errors
- Streaming chunks arriving one by one with timestamps
- The handshake (
- An Alexa+-style chat panel. Ask "What are my open action items from last week's notes?" and the panel calls the tools and shows a task list, while every call lights up in the Lens beside it.
How we built it
- Transport: MCP over Streamable HTTP on a single endpoint, with bearer-token auth and CORS configured for browser clients.
- A real client: The web app is a genuine MCP client that runs the full lifecycle and sends real JSON-RPC messages. An instrumented fetch layer captures each request, response and server-sent event, so the Lens shows actual traffic, not a mock-up.
- Streaming:
summarizeemits progress notifications while it works and returns the final result at the end. The Lens and chat both render partial output live. - Routing: The chat panel maps requests to tool calls. The hook question runs
search_notesfor last week's date range, then passes the matching note IDs toextract_tasks. - Deployment: AWS Lambda behind a Function URL with response streaming, using environment-based configuration. A mock mode with no API keys keeps the demo reliable.
- Interoperability: Because it follows the spec, other MCP clients (an existing AI assistant, MCP Inspector) can call the same server.
Chat panel ─┐
├─> MCP client (instrumented) ──Streamable HTTP──> MCP server (AWS Lambda) ──> notes
Lens view <┘ every message captured
Real: the MCP server, protocol traffic, streaming, schemas, errors and AWS deployment. Seeded: the notes (sample data). Simulated: the chat panel imitates Alexa+ and does not connect to a physical device.
Challenges we ran into
- Capturing genuine protocol traffic, including SSE streams, without altering behavior
- Streaming responses through Lambda Function URLs
- Ambiguities in the MCP spec and gaps in the SDKs
- Browser-client concerns: CORS and bearer-token auth
- Validating structured output against a declared schema
Accomplishments that we're proud of
- A real, spec-compliant MCP server and client, not a mock-up, deployed on AWS
- Live visualization of the full handshake, tool calls and streaming chunks
- Interoperability with other MCP clients such as MCP Inspector
- A friction log of spec ambiguities, SDK gaps and deployment surprises, offered as feedback to the people building these tools
What we learned
- MCP is easy to start with but hard to observe; visibility changes how fast you can debug
- Streaming and progress notifications behave very differently across transports and hosting
- Declared output schemas catch problems early and make tool results reliable
- Deployment details (auth, CORS, streaming) matter as much as the protocol itself
What's next for MCP Lens
- Connect to real Alexa+ integrations and live tool servers beyond the notes demo
- Let developers point the Lens at any MCP server URL
- Add request replay, schema diffing and latency analytics
- Publish the friction log and contribute fixes or issues back to the spec and SDKs
Built With
- alexa-plus
- aws-lambda
- bearer-auth
- cors
- json-rpc
- json-schema
- lambda-function-url
- mcp
- model-context-protocol
- node.js
- react
- server-sent-events
- streamable-http
- tailwindcss
- typescript
- vite
- zod