MCP ExplorerExplorer

Mcp Streamable Http Typescript Server

@ferrantson 9 months ago
8 MIT
FreeCommunity
AI Systems
Starter for MCP Server with a Streamable HTTP Transport

Overview

What is Mcp Streamable Http Typescript Server

mcp-streamable-http-typescript-server is a starter template for building a Streamable HTTP MCP Server using TypeScript. It leverages the Model Context Protocol and is designed to facilitate the development of applications that require streamable HTTP transport.

Use cases

Use cases for mcp-streamable-http-typescript-server include building real-time collaborative applications, streaming data services, and integrating with other systems that require efficient data transport mechanisms. It can also be used in scenarios where session management is crucial.

How to use

To use mcp-streamable-http-typescript-server, clone or fork the repository, install the dependencies with ‘npm install’, build the project using ‘npm run build’, and run the server with ‘node build/index.js’. The server runs on port 3000 by default, but you can specify a different port using the PORT environment variable.

Key features

Key features include a TypeScript-based implementation, support for Streamable HTTP transport, session management examples, sensible dependencies, and a straightforward setup process. Future enhancements may include direct TypeScript execution, automatic reload on changes, and OAuth authentication handling.

Where to use

mcp-streamable-http-typescript-server can be used in various fields such as web development, real-time data streaming applications, and any scenario where efficient HTTP communication is required. It is particularly suitable for applications that need to manage sessions and handle streaming data.

Content

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

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers