Skip to main content
Glama
@mcp-apps/streamable-ui-kit

@mcp-apps/streamable-ui-kit

@mcp-apps/streamable-ui-kit

A Node host for MCP Streamable HTTP, protocol 2025-11-25. MIT licensed. Extracted from Claimbite so other projects can run the same host without the bill-auditing app.

It wraps @modelcontextprotocol/sdk 1.32.1 WebStandardStreamableHTTPServerTransport and fixes two gaps that showed up when that transport was mounted on Node http:

  • A pre-read request body was forwarded into the web-standard transport, and Node then wrote raw SSE bytes where a chunk-size header belonged.

  • A 202 or 204 with no Content-Length was framed as chunked, and fetch().text() never returned.

writeWebResponse drops transfer-encoding from the SDK response and sets Content-Length: 0 on 202 and 204.

Run the example

Node 22 or newer.

npm install
npm start

That listens on http://127.0.0.1:<port>/mcp and registers one tool, ping. Origins other than localhost are rejected. GET /.well-known/oauth-protected-resource returns RFC 9728 metadata with authorization_servers: [].

npm test

Related MCP server: MCP Compatible Server

Use it

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { startStreamableMcpServer } from "@mcp-apps/streamable-ui-kit";

const running = await startStreamableMcpServer({
  createServer: (client) => {
    const server = new McpServer({ name: "example", version: "0.0.1" });
    if (!client.elicitation) {
      // The client did not advertise elicitation. Refuse side effects in your tools.
    }
    return server;
  },
});

client.elicitation is true when the initialize body includes capabilities.elicitation. This package reports that flag. It does not refuse a tool call by itself.

parseSseEvents and parseSseJson live in @mcp-apps/streamable-ui-kit/sse and import nothing. A browser client can use them to read notifications/progress and a mid-stream elicitation/create before the POST body closes.

The package depends on @modelcontextprotocol/sdk and @cfworker/json-schema. It is not published to npm. Install from this repository.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      A dual-protocol MCP server that supports both modern Streamable HTTP and legacy HTTP+SSE protocols, providing backward compatibility for clients while offering advanced features like session resumability.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A reference implementation demonstrating proper MCP server patterns with HTTP transport, featuring session management, progress notifications, and example tools for testing server functionality. Serves as a clean template for building MCP servers with streamable responses and comprehensive error handling.
      7
      MIT