Skip to content

ci(ai): bring up remote MCP server in prod deploy + health check#349

Merged
mrviduus merged 1 commit into
mainfrom
ai-049-deploy-remote-mcp
Jun 17, 2026
Merged

ci(ai): bring up remote MCP server in prod deploy + health check#349
mrviduus merged 1 commit into
mainfrom
ai-049-deploy-remote-mcp

Conversation

@mrviduus

Copy link
Copy Markdown
Owner

Make the remote MCP endpoint go live

AI-049 built the HTTP/streamable transport + the mcp-server Docker service + the nginx /mcp route, but the service is profile-gated (profiles:[mcp]) so CI's bare docker compose up (docker/e2e jobs) never builds or runs it. Side effect: the prod deploy also skipped it → nginx /mcp would point at nothing (502).

Change

  • deploy.ymldocker compose --profile mcp -f ... up -d --build so prod opts the service in. CI stays unchanged (still excludes it — verified: --profile mcp config includes mcp-server, default config excludes it).
  • The nginx /mcp block already syncs via the existing Sync nginx config step (infra/nginx/textstack.conf → server + nginx -t + reload on change).
  • New Health check MCP server deploy step (fail-loud): asserts mcp-server /health is up and a real MCP initialize POST through nginx /mcp (Host-routed, like a real client) returns 200. A misconfigured route fails the deploy instead of silently 502-ing.

Result

After merge + deploy, https://textstack.app/mcp is 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

  • http transport locally: /health → 200; POST /mcp initialize → Content-Type: text/event-stream, 200, serverInfo: textstack.
  • docker compose --profile mcp config includes mcp-server; default excludes it.
  • deploy.yml YAML valid; nginx /mcp upstream+location present.

No app-code change — deploy/ops only. Deploy-only-via-Actions (no manual SSH) preserved.

🤖 Generated with Claude Code

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>
@mrviduus mrviduus merged commit 346a8d0 into main Jun 17, 2026
5 checks passed
@mrviduus mrviduus deleted the ai-049-deploy-remote-mcp branch June 17, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant