Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-streamable-http-typescript-server

MCP.Pizza Chef: ferrants

The mcp-streamable-http-typescript-server is a TypeScript-based starter MCP server implementing the new streamable HTTP transport protocol. It provides a foundation for building MCP servers with session management, leveraging the latest MCP spec updates from 2025-03-26. Designed for easy setup and extension, it includes sensible dependencies and configurations to quickly launch a streamable HTTP MCP server on port 3000 by default.

Use This MCP server To

Build custom MCP servers with streamable HTTP transport Implement session-managed MCP server endpoints Prototype MCP server features using TypeScript Host MCP servers locally for development and testing Extend MCP server functionality with custom logic Deploy scalable MCP servers with HTTP streaming support

README

streamable-mcp-server

This is a starting place for a new streamable-http MCP Server built with typescript.

Streamable HTTP Transport was introduced on 2025-03-26. See MCP Spec Changelog.

Starts with the Model Context Protocol Typescript SDK Streamable HTTP with Session Management Example and contains some sensible dependencies and tsconfig to get rolling.

Clone or fork this repo, make updates and start building your Streamable HTTP MCP Server.

Install and Run Locally

To install the dependencies, run:

npm install

Then build:

npm run build

Running the Server

Production Mode

To run the server in production mode:

npm start
# or directly with
node build/index.js

It runs on port 3000 by default. If you need another port, you can specify with the PORT env var.

PORT=3002 npm start
# or
PORT=3002 node build/index.js

Development Mode

For development, you can use the dev mode which automatically watches for changes in your source files, rebuilds, and restarts the server:

npm run dev

With a custom port:

PORT=3002 npm run dev

Connect a Client

You can connect a client to your Streamable HTTP MCP Server once it's running. Configure per the client's configuration. There is the mcp-config.json that has an example configuration that looks like this:

{
  "mcpServers": {
    "streamable-mcp-server": {
      "type": "streamable-http",
      "url": "http://localhost:3000"
    }
  }
}

Future enhancements:

  • handle oauth authentication
  • more tool examples

mcp-streamable-http-typescript-server FAQ

How do I install the mcp-streamable-http-typescript-server?
Run 'npm install' to install dependencies, then 'npm run build' to compile the server.
How do I start the server in production mode?
Use 'npm start' or run 'node build/index.js' to launch the server on port 3000 by default.
Can I change the default server port?
Yes, set the PORT environment variable to your desired port before starting the server.
What MCP transport protocol does this server use?
It uses the streamable HTTP transport introduced in the MCP spec update on 2025-03-26.
Is session management supported?
Yes, the server includes session management based on the TypeScript SDK example.
Can I customize the server dependencies and configuration?
Yes, the project includes sensible defaults but is designed for easy customization.
What programming language is this server built with?
The server is built using TypeScript for type safety and modern JavaScript features.
Where can I find the MCP spec changelog for the streamable HTTP transport?
The changelog is available at https://modelcontextprotocol.io/specification/2025-03-26/changelog.