Almost
Integrates with Amazon Alexa+ to provide voice-driven detection of creative near-misses in jam sessions, walk-back to approach moments, and export of MIDI/audio seeds via MCP tools.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Almost
“Alexa, what did I just walk past?”
Consent-based Alexa+/MCP agent that detects creative near-misses in a jam — moments you approached something new, then abandoned the thread — and walks you back with a reconstructable event graph plus an exportable seed (MIDI-JSON notes or an audio-clip reference) for the abandoned thread.
What this build is: a working MCP server and a web Alexa+ simulator, running on synthetic fixture jams. The detector really is deterministic code, but its inputs are hand-authored feature frames. This build has no live audio capture or DSP. See What's real vs. fixture.
Contest
Amazon Build/Ship/Shape — Alexa+ track
Due: Fri Oct 23 2026 12:00pm PDT
MCP server (spec 2025-11-25+, Streamable HTTP) or Agent Skill or web-simulated Alexa+
Related MCP server: activity-frames
Monorepo
almost/
apps/web/ Next.js Alexa+ sim + event graph viz (MCP-first, core fallback)
apps/mcp-server/ Streamable HTTP MCP (7 tools, stateful Mcp-Session-Id)
packages/core/ Deterministic scoring, types, fixture store
fixtures/sessions/ Synthetic canned jams (JSON + tiny wav placeholders)
docs/DEMO.md ≤3 min demo script
docs/FRICTION_LOG.md
docs/PRODUCT_FEEDBACK.md
scripts/smoke-mcp.mjs
scripts/demo.mjs npm run demo — MCP + web togetherTwo demo modes
Mode | When | Path |
Live MCP |
| Web server actions call Streamable HTTP tools ( |
Core fallback | MCP health check fails or a tool call errors | Same server actions use in-process |
Scoring is always deterministic in @almost/core — MCP is a transport, not a second scorer. No LLM keys required for either mode today.
Per-session active jam: the MCP server is stateful Streamable HTTP. Each client gets a Mcp-Session-Id; the “active” jam pointer is keyed by that id (cleaned up on session close). Concurrent clients do not clobber each other. The web Alexa+ sim uses one-shot MCP connections and therefore always passes the jam sessionId in tool args for continuity across calls.
Quick start
git clone https://github.com/RemkellekmeR/almost && cd almost
npm install
npm run build
# One command — MCP + web (production builds)
npm run demo
# → MCP http://127.0.0.1:3100/mcp (health: /health)
# → Web http://localhost:3000 (mode pill should read "live MCP")
# Ctrl+C stops bothDev (two terminals):
# Terminal A — MCP (live mode)
npm run dev:mcp
# → http://127.0.0.1:3100/mcp health: /health
# Terminal B — Web Alexa+ sim (prefers MCP, falls back to core)
npm run dev:web
# → http://localhost:3000Web-only (core fallback — MCP optional):
npm run build -w @almost/core
npm run dev:web
# Mode pill shows "core fallback" until MCP is reachableTypecheck / build everything:
npm run typecheck
npm run buildScore fixtures from CLI (no MCP):
npm run demo:scoreSmoke live MCP (Neon Corridor peaks @ 30s / 62s + concurrent-client isolation):
npm run start:mcp # terminal A (built dist)
npm run smoke:mcp # terminal BDemo utterances (Neon Corridor)
Say | Expect |
“Alexa, what did I just walk past?” | Top unmarked near-miss (peaks @ 30s and 62s in the fixture). |
“Alexa, the other one” | Switches to the other peak and re-explains. |
“Alexa, take me back” | Cue at Approach for the selected miss. |
“Alexa, export that seed” | Fixture seed window: MIDI-JSON notes (or a placeholder audio-clip ref). |
Verify web → MCP
npm run buildnpm run start:mcp→ confirmcurl -s http://127.0.0.1:3100/healthnpm run smoke:mcp→ expect Neon Corridor @ 30s / 62s and isolation PASSnpm run demo(orMCP_PUBLIC_URL=http://127.0.0.1:3100/mcp npm run start -w @almost/web) → open http://localhost:3000
Mode pill should read live MCP; ask “what did I just walk past?” then “the other one.”
MCP tools
Tool | Role |
| Activate a fixture/demo session (per MCP session). Requires |
| Append events, re-score |
| Unmarked near-misses (full objects + graph) |
| Fixture explanation + graph (LLM stub later) |
| Walk back to Approach |
| Return the fixture seed window for a near-miss (MIDI-JSON notes, or a placeholder audio-clip ref) |
| Session rollup |
Near-miss scoring
Deterministic sliding-window heuristics (packages/core/src/scoring.ts) over per-frame features (flux, onsetDensity, repetition, commitment):
novelty =
clamp(flux·0.5 + onsetDensity·0.5 − repetition·0.3)repetition and commitment decide whether you went back to a safe loop
In this build the feature frames are hand-authored fixture values (2 s frames in fixtures/sessions/*.json). Their names follow the audio features they model (spectral flux, onset density, self-similarity), but no audio is analyzed. A real DSP front end that extracts them from a live jam is future work.
Near-miss = high novelty ramp then return to high-repetition safe pattern without a capture/export marker near the peak.
Graph: Approach → Peak → Abandon → SafeLoop
LLM is not used for scoring (explanations only, stubbed with fixtures today).
What's real vs. fixture
Piece | Status |
MCP server: spec 2025-11-25, Streamable HTTP, 7 tools, stateful | Real and live. |
Consent gate on | Real. Anything other than an explicit |
Near-miss detector + event graph | Real deterministic code, running on hand-authored feature frames |
Explanations | Templated from detector output (no LLM) |
Seed export | Returns the fixture's seed windows: synthetic MIDI-JSON notes, or an audio-clip ref to |
Alexa+ | Web simulator (text + optional browser speech) calling the MCP server. It has not been tested against a hosted Alexa+ client |
AWS services | Not used in this build |
Environment
See .env.example:
LLM_API_KEY,LLM_PROVIDER— explanations only (unused this pass)MCP_PUBLIC_URL— Streamable HTTP URL web server actions call (alsoNEXT_PUBLIC_MCP_URL)MCP_PORT,MCP_HOST— MCP listen addressALLOWED_HOSTS— comma-separated Host allowlist when exposing beyond localhost (defaults tolocalhost,127.0.0.1ifMCP_HOST=0.0.0.0)AWS_*— optional Bedrock stretch (not used in this build)DATABASE_URL— optional; fixtures work in-memory
Docs for judges
docs/DEMO.md— ≤3 min scriptdocs/FRICTION_LOG.md— friction log (full-format entries)docs/PRODUCT_FEEDBACK.md— product feedback for the tools used + feature requests
License
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Create, co-edit, analyze, publish, and export collaborative step-sequencer sessions through MCP.
Remote MCP for MCP consent scope receipt, structured receipts, audit logs, and reviewer-ready eviden
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Autonomous music production for AI agents with MIDI generation, QC and provenance.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceUniversal AI session memory substrate providing persistent context across sessions, with MCP tools for recall, search, recent events, and knowledge graph queries.68 npm2AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceCompiles locally captured screen activity into deterministic, evidence-backed records and executable workflows that agents can consume through MCP tools. Enables agents to fetch recent context, day summaries, click-by-click replay steps, repetitive-workflow patterns, and communication surfaces so routine tasks can be repeated instead of re-derived from scratch.MIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP-enabled editors and agents to run structured thesis–antithesis–synthesis analysis and player–coach verified coding loops, with tools for independent verification and session persistence.-
- FlicenseNot gradedqualityAmaintenanceEnables users to force LLMs through dialectical thesis→antithesis→synthesis workflows and player-coach autocoding loops, with session state and independent verification, through MCP tools.-