Add Streamable HTTP transport for remote MCP access
Some checks failed
CI/CD Pipeline / build (push) Has been cancelled
CI/CD Pipeline / publish-npm (push) Has been cancelled
CI/CD Pipeline / docker (push) Has been cancelled

- Convert from stdio-only to dual-mode (stdio + HTTP)
- Add Express server with /mcp endpoint for Streamable HTTP
- Add /health endpoint for Railway health checks
- Update MCP SDK to v1.12.0 for Streamable HTTP support
- Add railway.toml for Railway deployment
- Default to HTTP mode, use --stdio flag for local mode
This commit is contained in:
Krishna Kumar
2025-12-31 11:56:21 -06:00
parent 50c2c43fd9
commit 3e0ed2d6c6
5 changed files with 925 additions and 320 deletions

View File

@@ -39,9 +39,15 @@ RUN npx tsc && \
# Switch to production for runtime
ENV NODE_ENV=production
# Default port for HTTP transport
ENV PORT=3001
# The API key should be passed at runtime
# ENV OPENROUTER_API_KEY=your-api-key-here
# ENV OPENROUTER_DEFAULT_MODEL=your-default-model
# Run the server
# Expose HTTP port
EXPOSE 3001
# Run the server in HTTP mode (default)
CMD ["node", "dist/index.js"]