Get the FREE Ultimate OpenClaw Setup Guide →

mcp-streamable-http-typescript

Starter for MCP Server with a Streamable HTTP Transport

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ferrants-mcp-streamable-http-typescript-server node build/index.js \
  --env PORT="3000"

How to use

This MCP server implements a Streamable HTTP transport-based server built with TypeScript. It starts from a TypeScript SDK example and provides a starting point for a streamable MCP server that serves HTTP endpoints and maintains a session-aware streamable protocol. To use it, install dependencies, build the project, and run the server. By default it listens on port 3000, and you can override the port with the PORT environment variable. A typical workflow is to install, build, and run in production or switch to development mode for continuous rebuilding. The README also shows a sample client configuration you can use to connect to the running server via the mcp-config.json example, which points to http://localhost:3000.

Key capabilities you can expect to leverage include: the Streamable HTTP transport layer, session management scaffolding, and a path to extend with additional tools or authentication (as noted in future enhancements). You can connect a client by matching the configuration in mcp-config.json and hitting the server’s HTTP endpoints on the configured port.

How to install

Prerequisites:

  • Node.js and npm (recommended latest LTS)

Installation steps:

  1. Clone the repository git clone <repository-url> cd <repository-directory>

  2. Install dependencies npm install

  3. Build the project npm run build

  4. Run the server (production) PORT=3000 npm start

    or directly

    node build/index.js

  5. Run the server in development mode (auto rebuilds on changes) npm run dev

    with a custom port

    PORT=3002 npm run dev

Note: If you modify environment settings, ensure the PORT value aligns with your networking and any reverse proxy configuration you may be using.

Additional notes

Tips and common notes:

  • The server defaults to port 3000; override with the PORT environment variable as shown.
  • If you use npm start, ensure you have built the project first (npm run build). In development, npm run dev will watch for changes and rebuild.
  • The mcp_config.json example demonstrates how to point a client to http://localhost:3000. Adjust the URL if you run on a different host or port.
  • This is a TypeScript-based implementation aligned with the Streamable HTTP transport introduced around 2025, so you may want to review the related MCP spec changelog for any compatibility notes.
  • Future enhancements mentioned include OAuth authentication and more tool examples; consider adding env-based toggles or feature flags as you extend the server.

Related MCP Servers

Sponsor this space

Reach thousands of developers