Skip to main content
Glama
maxi-max-dev

Just Press It MCP Server

by maxi-max-dev
README.md
# Just Press It · 会对话的设备说明书

Local review prototype, 2026-10-23. Tell the assistant the device and goal. It retrieves reviewed manufacturer guidance, asks for observations, and resumes interrupted tasks without blindly replaying actions. Each step links to its source.

## Run

Node.js 22+, then:

```sh
npm ci
npm run build
npm start
# http://127.0.0.1:4317/
```

For natural-language retrieval, run a local Ollama service with `qwen2.5:7b` installed. Install Ollama and run `ollama pull qwen2.5:7b`, then `ollama serve` if its service is not already running. Optional model override: `JPI_LANGUAGE_MODEL`. Requests go only to `127.0.0.1:11434`. Without the model, the UI reports the limitation; source-linked buttons and progress still work. No cloud API key is required.

For voice input: `whisper-cli`, `ffmpeg`, and the local quantized Whisper small model. On a fresh Mac, install `whisper-cpp` and `ffmpeg`, then run `sh scripts/setup-audio.sh`. It downloads and checks the published model hash. `WHISPER_BIN`, `FFMPEG_BIN`, `WHISPER_MODEL` override paths. Record up to 12 seconds, review the transcript, then send. Runtime audio stays in memory. TTS uses the browser and requires separate audible acceptance.

## Try the three reviewed tasks

- Sony WH-CH520: Bluetooth pairing, including first/subsequent pairing and interruption recheck.
- Canon PIXMA TS3450: one A4 standard monochrome copy; the series manual explicitly covers this model. Start with the printer powered on.
- Epson PowerLite Home Cinema 1080, 2007 CPD-23384R1: focus an already projected image. Do not apply to same-name newer models.

Type a question such as `WH-CH520怎么连另一部手机` or `TS3450原稿朝上还是朝下`. Enter the corresponding guide, choose rehearsal or user-reported physical use, and confirm the exact model. Ask `看不清`, `暂停`, or `继续`. Natural-language observations are proposals requiring confirmation. Unsupported models/questions do not produce new device instructions.

The prior synthetic AC demo and its old sessions remain at `/demo.html`.

## Verification

```sh
npm run check
# With Google Chrome and the local server/model running:
node tests/manual-browser.mjs
# Prior AC regression:
node tests/browser.mjs
```

Unit/integration tests cover state transitions, source metadata/graph integrity, persistence, duplicate/stale actions, failed writes and MCP transport. Browser checks use actual local Qwen inference and synthetic Chinese audio through MediaRecorder → local Whisper. Test recordings do not prove a real microphone, real appliance or real user outcome.

## Architecture and boundaries

The language model selects reviewed catalog IDs under a JSON schema. Application code validates the returned ID; it cannot turn arbitrary model text into an executable instruction. Interpretation can still be wrong, so the user confirms observations and sees source links. This does not guarantee zero hallucination or universal device coverage.

Sources and reviewed procedures: `src/manual-catalog.js`. Procedure version changes freeze old sessions. Steps and events retain manufacturer URL, edition and section/page. State is atomically saved in `data/sessions.json.manuals.json`; browser localStorage retains per-device session entries. This is a single-process localhost review app, without public authentication or cross-device sync.

MCP endpoint: `http://127.0.0.1:4317/mcp`, official SDK Streamable HTTP. New tools: `manual_catalog`, `manual_start`, `manual_get`, `manual_ask`, `manual_act`. `manual_ask` is read-only. Existing `guide_*` and synthetic bridge tools are retained. No actual Alexa integration, camera input, web-wide crawler, arbitrary PDF ingestion or physical control is implemented. The Home Assistant adapter remains fixture-tested only, with writes unexposed.


## Amazon Developer Hackathon 2026
Alexa+ track: self-hosted MCP / simulated assistant experience. The code imports and uses the official MCP SDK with Streamable HTTP; the installed SDK supports protocol 2025-11-25. It is a localhost prototype, not an Alexa production integration.

The earlier static appliance-guide concept predates this hackathon. This entry adds persistent conversational execution, local speech and language models, source-linked manufacturer workflows, exact-model confirmation, ambiguity handling, interruption recovery, and MCP transport.

Original application code is MIT licensed. Manufacturer manuals are linked, not bundled; manufacturer names identify the supported models and do not imply endorsement. Third-party dependencies and downloaded models retain their respective licenses.