Add local MCP gateway dev harness with smoke tests for Happy CLI#4
Open
jakenuts wants to merge 2 commits intodocs/technical-summaryfrom
Open
Add local MCP gateway dev harness with smoke tests for Happy CLI#4jakenuts wants to merge 2 commits intodocs/technical-summaryfrom
jakenuts wants to merge 2 commits intodocs/technical-summaryfrom
Conversation
- Implement Streamable HTTP MCP server on localhost port 3030 - Provide tools: open_session, send_text, voice_token - Use existing Happy CLI credentials and E2E encryption - Add .env example and README for local dev usage - Configure TypeScript and npm scripts for dev gateway This enables local dev harness that proxies MCP protocol requests to the hosted Happy Server securely using CLI credentials. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
- Introduced dev/mcp-gateway/scripts/smoke.ts for connectivity smoke tests - Added dev/mcp-gateway/scripts/write-access-key.ts to write access keys from env vars - Updated README and env example with usage instructions - Added prep:mcp-creds and test:mcp-gateway npm scripts for developer workflow - Modified package.json to use node --import tsx consistently for dev commands - Updated .gitignore and HAPPY_HOME_DIR for local dev environment isolation The smoke test verifies session connectivity and message sending. The write-access-key script safely generates access.key from environment inputs. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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