Add local MCP gateway dev harness with smoke tests for Happy CLI #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
open_session,send_text, andvoice_token(plus new local testing utilities).npm run dev:mcp-gateway.dev/mcp-gateway/scripts/smoke.tsanddev/mcp-gateway/scripts/write-access-key.ts.Changes
New files
Build/Dev tooling
dev:mcp-gateway,prep:mcp-creds, andtest:mcp-gatewayto run the gateway, prepare credentials, and smoke-test the gateway respectively.Implementation overview
MCP Tools
Transport & Server
MCP_ALLOWED_HOSTSandMCP_ALLOWED_ORIGINScontrols.MCP_HTTP_PORT(default 3030) and serves at/mcp.Security / Notes
How to run
HAPPY_ACCESS_KEY_JSONto the contents of your access.key, orHAPPY_TOKEN(+ optionallyHAPPY_SECRET_B64) orHAPPY_PUBLIC_KEY_B64withHAPPY_MACHINE_KEY_B64.open_session,send_text, andvoice_tokentools.Quick start notes (from README)
MCP_HTTP_PORT(default 3030).Smoke test (optional)
dev/.happy/access.key(if missing), opens/creates session tagmcp-smoke, and sends a short user message to the hosted server.Test plan
open_sessionwith a tag; verify a session is prepared.send_textwith a tag and a message; verify acknowledgement and that the message is sent to the active session.voice_tokenwith optionalagentId/revenueCatPublicKey; verify a JSON token response from the server API.Potential follow-ups
🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/71e1c99b-2b5c-48ce-8a69-00dafd7761bf