Sponsored by Deepsite.site

Streamable HTTP Transport for Web Fetch API

Created By
enZane6 months ago
A Stremeable Http Transport for the Model Context Protocol (MCP) suited for frameworks like Hono, enabling real-time communication using Server-Sent Events (SSE) and standard HTTP requests. Implements the MCP Streamable HTTP transport specification for edge-compatible environments.
Content

Streamable HTTP Transport for Web Fetch API

GitHub Repo stars npm GitHub GitHub top language

This repository hosts EdgeStreamableHTTPTransport, an edge-compatible server transport for the Model Context Protocol (MCP). It enables real-time, bi-directional communication using Server-Sent Events (SSE) and standard HTTP requests, making it suitable for modern web frameworks like Hono. The transport is designed to implement the MCP Streamable HTTP transport specification and is optimized for edge environments.

Overview

The core of this project is to provide a reliable and efficient transport layer for applications requiring real-time data streaming, particularly those leveraging the Model Context Protocol. It's built with TypeScript and designed to be easily integrated into various server setups, especially those running on edge computing platforms.

Packages

This monorepo contains the following primary package:

  • packages/stremeable-http-transport:
    • Implements the EdgeStreamableHTTPTransport.
    • Supports SSE streaming and direct HTTP responses.
    • Features session management (stateful and stateless modes).
    • Includes resumability support via an extensible event store.
    • For more details, see the package README.

Development

This project utilizes a modern development stack to ensure code quality, maintainability, and ease of contribution.

Tools

The development environment is configured with the following tools:

  • TypeScript: For strong typing and modern JavaScript features.
  • pnpm workspaces: For managing the monorepo structure and dependencies.
  • Vitest: For fast and reliable unit and integration testing.
  • Biome: For consistent code formatting and linting.
  • tsdown: For efficient bundling of TypeScript code into CJS and ESM formats.
  • Changeset: For streamlined version management and changelog generation.
  • GitHub Actions: For automating CI/CD pipelines, including testing, building, and publishing.
  • Lefthook: For managing Git hooks.

Key Scripts (run from the repository root)

  • pnpm install: Install dependencies for all packages.
  • pnpm run build: Build all packages.
  • pnpm run test: Run tests for all packages.
  • pnpm run check: Lint and format code across the repository.
  • pnpm run dev: Start the development environment, typically in watch mode for relevant packages.
  • pnpm changeset: To create a new changeset for versioning.
  • pnpm changeset version: To apply changesets and update package versions.

Please refer to the package.json in the root and within each package for more specific scripts.

Contributing

Contributions are welcome! Please read the CONTRIBUTING.md guide for details on how to contribute to this project, including information on reporting bugs, proposing features, and submitting pull requests.

Also, please adhere to our CODE_OF_CONDUCT.md.

Security

For security vulnerabilities, please refer to our SECURITY.MD policy.

License

This project is licensed under the terms of the LICENSE file.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
DeepChatYour AI Partner on Desktop
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
Tavily Mcp