coyote-mcp
v1.0.0
Published
Console MCP server for DG-LAB Coyote 3.0 over the official mobile app WebSocket bridge.
Readme
coyote-mcp
Console MCP server for DG-LAB Coyote 3.0 on Node.js.
What it does:
- Starts a DG-LAB-compatible WebSocket bridge for the mobile app.
- Generates a QR image file so the app can pair by scanning it.
- Can run in a demo mode where no real app or device is connected, but MCP tools still behave like a live session.
- Can run either as an MCP
stdioserver fornpx-based clients or as a local Streamable HTTP endpoint. - Provides English resources, prompts, and read/write tools for connection status, strength control, pulse playback, queue clearing, and raw app commands.
- Supports higher-level timed game scenarios built from multi-step action timelines.
Quick start with npx
npx -y coyote-mcpBy default the package starts in MCP stdio mode, which is the mode expected by most desktop MCP clients.
Server logs and pairing instructions are written to stderr so they do not break the MCP protocol on stdout.
If your MCP client hides stderr, call the get_pairing_qr tool or read the coyote://pairing/guide resource to retrieve the current QR image path and pairing payload through MCP itself.
Example MCP client configuration:
{
"mcpServers": {
"coyote": {
"command": "npx",
"args": ["-y", "coyote-mcp"]
}
}
}HTTP mode
If you want to run the bridge as a standalone local HTTP MCP endpoint instead of stdio:
npx -y coyote-mcp --transport httpOr locally from the repo:
npm install
npm run build
npm startDemo mode
For testing without a physical DG-LAB session:
npx -y coyote-mcp --demoOr:
COYOTE_DEMO_MODE=true npx -y coyote-mcpIn demo mode the server:
- auto-pairs a virtual app session after startup;
- reports
mode: "demo"in connection status; - simulates strength acknowledgements, pulse acceptance, queue clearing, reconnect after QR rotation, and basic feedback events;
- never talks to a real phone or device.
Default HTTP endpoints:
- MCP:
http://127.0.0.1:8869/mcp - DG-LAB WebSocket bridge:
ws://<your-lan-ip>:8765/<controller-id>
Pairing flow
- Start the server.
- Scan the generated QR image with the DG-LAB app.
- Wait for the console to print
App paired successfully. - In
stdiomode, keep the MCP client connected. - In HTTP mode, add the MCP endpoint to your AI agent:
http://127.0.0.1:8869/mcp
CLI options
--transport stdio: start as a standard MCP stdio server. This is the default.--transport http: expose the local Streamable HTTP MCP endpoint.--stdio: shorthand for--transport stdio.--http: shorthand for--transport http.--demo: enable virtual demo mode with no real DG-LAB app/device.--help: print usage information.
Environment variables
COYOTE_MCP_TRANSPORT: default transport when CLI flags are not provided.COYOTE_DEMO_MODE:true/1enables the virtual demo session.MCP_HOST/MCP_PORT/MCP_PATH: local MCP HTTP endpoint settings.COYOTE_WS_HOST/COYOTE_WS_PORT: bind address for the DG-LAB WebSocket bridge. By default the server uses the computer's detected LAN IP instead oflocalhost.COYOTE_WS_PUBLIC_ORIGIN: optional publicws://orwss://origin used inside the QR code.COYOTE_WS_PUBLIC_HOST: optional host used for QR generation whenCOYOTE_WS_PUBLIC_ORIGINis not set.COYOTE_WS_PROTOCOL:wsorwssfor QR generation whenCOYOTE_WS_PUBLIC_ORIGINis not set.COYOTE_HEARTBEAT_INTERVAL_MS: heartbeat interval sent to the paired app.COYOTE_DEFAULT_REPEAT_SECONDS: default pulse resend duration forsend_pulse_sequence.COYOTE_DEFAULT_REPEAT_HZ: default pulse resend frequency forsend_pulse_sequence.
Tooling highlights
get_active_scenariovalidate_game_scenariostart_game_scenariostop_game_scenarioget_pairing_qrget_connection_statusget_recent_eventsbuild_waveform_framesrefresh_pairing_qrset_channel_strengthadjust_channel_strengthclear_pulse_queuesend_pulse_sequencestop_all_outputsend_raw_app_command
Complex game scenarios
For richer scene orchestration, the server now exposes scenario tools that work as a timed action runner over the low-level DG-LAB controls.
A scenario is a JSON object with:
nameand optionaldescriptionsteps: an ordered array of timeline steps- each step contains
delayMs, optionallabel, and one or moreactions
Supported action types:
setStrengthadjustStrengthclearPulseQueuesendPulsesendRawCommandstopAllOutput
Recommended flow:
- Generate any pulse frames you need with
build_waveform_frames. - Validate the timeline with
validate_game_scenario. - Start it with
start_game_scenario. - Track progress with
get_active_scenario. - Cancel it with
stop_game_scenarioif needed.
