ci(ai): bring up remote MCP server in prod deploy + health check#349
Merged
Conversation
The mcp-server Docker service is profile-gated (profiles:[mcp]) so CI's bare 'compose up' (docker/e2e jobs) never builds/runs it — but that also meant the prod deploy skipped it, leaving nginx /mcp pointing at nothing. - deploy.yml now runs 'docker compose --profile mcp ...' so prod opts the service in (CI still excludes it; the nginx /mcp block already syncs via the existing Sync-nginx step). - New 'Health check MCP server' deploy step (fail-loud): mcp-server /health up AND a real MCP initialize POST through nginx /mcp returns 200. After merge+deploy, https://textstack.app/mcp is the remote streamable-HTTP MCP endpoint (ChatGPT/Cursor/remote Claude), per-request device-flow-JWT auth. http transport verified locally (/health 200, POST /mcp initialize → text/event-stream 200). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Make the remote MCP endpoint go live
AI-049 built the HTTP/streamable transport + the
mcp-serverDocker service + the nginx/mcproute, but the service is profile-gated (profiles:[mcp]) so CI's baredocker compose up(docker/e2e jobs) never builds or runs it. Side effect: the prod deploy also skipped it → nginx/mcpwould point at nothing (502).Change
deploy.yml→docker compose --profile mcp -f ... up -d --buildso prod opts the service in. CI stays unchanged (still excludes it — verified:--profile mcp configincludesmcp-server, defaultconfigexcludes it)./mcpblock already syncs via the existing Sync nginx config step (infra/nginx/textstack.conf→ server +nginx -t+ reload on change).mcp-server/healthis up and a real MCPinitializePOST through nginx/mcp(Host-routed, like a real client) returns200. A misconfigured route fails the deploy instead of silently 502-ing.Result
After merge + deploy,
https://textstack.app/mcpis the remote streamable-HTTP MCP endpoint — usable by ChatGPT / Cursor / remote Claude, authenticated per-request via the device-flow JWT (HttpContextTokenProvider). The local stdio path (Claude Desktop) is unaffected.Verified
/health→ 200;POST /mcpinitialize →Content-Type: text/event-stream,200,serverInfo: textstack.docker compose --profile mcp configincludesmcp-server; default excludes it.deploy.ymlYAML valid; nginx/mcpupstream+location present.No app-code change — deploy/ops only. Deploy-only-via-Actions (no manual SSH) preserved.
🤖 Generated with Claude Code