Most tutorials for Model Context Protocol (MCP) servers assume two things:
- Users want to install Node/Python locally and babysit
stdioprocesses. - Web-data tools need heavyweight Playwright containers and residential proxies.
In practice, neither scales well for real AI agents in Claude Desktop, Cursor, Windsurf, or n8n.
Over the past week I built and deployed 11 hosted Streamable HTTP Remote MCP servers (/mcp), every single one running in a 256 MB Node.js 22 container with zero headless browsers and zero proxies.
Here are the architectural lessons that actually mattered in production—plus the open-source STDIO/HTTP bridge and a free 1-click JSON config generator.
1. Stateless Streamable HTTP (/mcp) Beats Long-Lived Sessions
For hosted remote MCP servers behind serverless/standby autoscalers, sticky in-memory sessions break on cold restarts. Using @modelcontextprotocol/sdk's StreamableHTTPServerTransport in stateless JSON-response mode (sessionIdGenerator: undefined, enableJsonResponse: true) creates a clean server + transport per request and tears it down cleanly on res.on('close').
Result: Zero memory leaks, sub-200ms warm tool execution, and 256 MB RAM ceiling.
2. Two-Stage Docker Builds Cut Image Size & Avoid NODE_ENV=production Traps
Base Node production images often run with NODE_ENV=production, causing npm install to silently skip TypeScript (tsc). Using a clean 2-stage Dockerfile (npm install --include=dev && npm run build in builder, copying only dist/ to the runtime stage with --omit=dev) keeps deployments fast and deterministic.
3. Real-World Public API Gotchas We Hit (So You Don't Have To)
- Substack:
/api/v1/archivemigrated fromoffset=(now returns HTTP 400) tocursor=<nextCursor>. - Kalshi v2: Live prices now live in dollar-denominated fields (
yes_bid_dollars,yes_ask_dollars) and querying/trade-api/v2/events?status=open&with_nested_markets=trueavoids noisy combo-parlay clutter. - SEC EDGAR XBRL (
companyfacts): Always merge across multiple US-GAAP revenue tags (Revenues,RevenueFromContractWithCustomerExcludingAssessedTax,SalesRevenueNet) and filter duration length (300+ days for annual 10-K) so prior-year comparative rows never overwrite current fiscal years. - Empty-Input QA Hardening: Always provide real
defaultvalues in schemas and runtime fallbacks when{}is passed so automated health checks never fail.
Try Them Live or Generate Your MCP Config in 1 Click
- Open-Source STDIO Bridge & All 11 Hosted Endpoints (MIT): https://github.com/shawn1905/zero-proxy-mcp-suite
- Free 1-Click Remote MCP Config Generator + 2026 MoR Fee Calculator: https://shawn1905.github.io/indie-builder-toolkit/
- Full Apify Store Portfolio (Substack, ESPN 16 Leagues, 5-Board Remote Jobs, Google News, Polymarket & Kalshi, Shopify, Podcasts, YC 6,400+ Startups, SEC EDGAR, Website Contacts & Tech Stack, Fast Website-to-Markdown): https://apify.com/shawn1905
If you are building automated workflows on top of these endpoints, I also bundled 5 ready-to-run self-hosted n8n workflows + Docker Compose here: https://fengyetnot.gumroad.com/l/skuqx
Curious what remote MCP data sources developers here still struggle to find without paying $200/mo in proxies—drop them below!
![AMR Operations, Deployment, and MLOps — Ch.04: Fleet Management [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fphajz60uq731julzkt59.png)
![AMR Operations, Deployment, and MLOps — Ch.03: Remote Monitoring [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgf8gh1nt81hujq8e6uup.png)
![AMR Operations, Deployment, and MLOps — Ch.02: Field Operations [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkzb8hmbgu0kqd06z853j.png)
![AMR Operations, Deployment, and MLOps — Ch.01: Deployment Strategy [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3kfyl7aa0ui2y8vm900y.png)
