feat: replace StdioTransport with StreamableHTTP + Node.js cluster #10

Merged
aleleba merged 1 commits from feat/streamable-http into main 2026-05-30 21:16:48 -06:00
Owner

Summary

Integrates StreamableHTTP natively into the MCP server, replacing StdioServerTransport with StreamableHTTPServerTransport + Node.js cluster for concurrent client support.

  • src/index.ts: Replace stdio transport with StreamableHTTP. Node.js cluster primary forks N workers; each worker handles HTTP requests on :8080/mcp with a serializing mutex (stateless, 1 request at a time per worker).
  • Dockerfile: Multi-stage build (node:22-slim builder + runtime). No patches needed — StreamableHTTP is now native in the source.
  • .gitea/workflows/docker-build.yml: CI/CD pipeline — on push to main, builds and pushes Docker image to gitea.p-lao.com/aleleba/docmost-mcp.

Environment variables

  • MCP_WORKERS (default: 4) — number of cluster workers

Test plan

  • npm run build compiles without errors
  • Pipeline runs on merge to main and publishes image to Gitea registry
  • Image can be pulled and run: workers log listening on port 8080, path /mcp

🤖 Generated with Claude Code

## Summary Integrates StreamableHTTP natively into the MCP server, replacing `StdioServerTransport` with `StreamableHTTPServerTransport` + Node.js `cluster` for concurrent client support. - **`src/index.ts`**: Replace stdio transport with StreamableHTTP. Node.js cluster primary forks N workers; each worker handles HTTP requests on `:8080/mcp` with a serializing mutex (stateless, 1 request at a time per worker). - **`Dockerfile`**: Multi-stage build (`node:22-slim` builder + runtime). No patches needed — StreamableHTTP is now native in the source. - **`.gitea/workflows/docker-build.yml`**: CI/CD pipeline — on push to `main`, builds and pushes Docker image to `gitea.p-lao.com/aleleba/docmost-mcp`. ## Environment variables - `MCP_WORKERS` (default: `4`) — number of cluster workers ## Test plan - [x] `npm run build` compiles without errors - [ ] Pipeline runs on merge to `main` and publishes image to Gitea registry - [ ] Image can be pulled and run: workers log `listening on port 8080, path /mcp` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
aleleba added 1 commit 2026-05-30 21:15:53 -06:00
Integrates StreamableHTTP natively into the MCP server instead of
using StdioServerTransport. Adds Node.js cluster support so multiple
workers can handle concurrent MCP clients simultaneously.

Changes:
- src/index.ts: replace StdioServerTransport with StreamableHTTPServerTransport
  + Node.js cluster (primary forks N workers, each worker handles HTTP
  requests on :8080/mcp with a serializing mutex)
- Dockerfile: multi-stage build (node:22-slim builder + runtime)
- .gitea/workflows/docker-build.yml: CI/CD pipeline — on push to main,
  builds and pushes Docker image to gitea.p-lao.com registry

Environment variables:
- MCP_WORKERS (default: 4) — number of cluster workers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
aleleba merged commit a089a92205 into main 2026-05-30 21:16:48 -06:00
Sign in to join this conversation.