Streamable MCP Server Template
Production-ready MCP server template with Streamable HTTP transport. Supports Node.js (Hono) and Cloudflare Workers. Includes OAuth 2.1, multi-tenant sessions, tool/resource/prompt registration, and AES-256-GCM token encryption.
What is Streamable MCP Server Template?
Streamable MCP Server Template is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to production-ready mcp server template with streamable http transport. supports node.js (hono) and cloudflare workers. includes oauth 2.1, multi-tenant sessions, tool/resource/prompt registration, and a...
Production-ready MCP server template with Streamable HTTP transport. Supports Node.js (Hono) and Cloudflare Workers. Includes OAuth 2.1, multi-tenant sessions, tool/resource/prompt registration, and AES-256-GCM token encryption.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Production-ready MCP server template with Streamable HTTP tr
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx streamable-mcp-server-templateConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Streamable MCP Server Template
The Streamable MCP Server Template is a production-ready starting point for building MCP servers that use the Streamable HTTP transport. It supports two deployment targets—Node.js with Hono and Cloudflare Workers—and comes pre-configured with OAuth 2.1 authentication, multi-tenant session management, AES-256-GCM token encryption, and full MCP capability registration (tools, resources, prompts). It is designed to reduce the boilerplate required to ship a secure, scalable MCP server to production.
Prerequisites
- Node.js 18+ and Bun package manager installed
- For Cloudflare Workers deployment: a Cloudflare account with Wrangler CLI configured
- An OAuth 2.1 provider (or use the bearer/API key auth strategies for simpler setups)
- OpenSSL available for generating the AES-256-GCM encryption key
- An MCP-compatible client such as Claude Desktop for testing
Clone the template repository
Clone the streamable-mcp-server-template repository from GitHub to start your project.
git clone https://github.com/iceener/streamable-mcp-server-template.git
cd streamable-mcp-server-template
bun installGenerate an encryption key
Generate a secure AES-256-GCM token encryption key. This is required for RS_TOKENS_ENC_KEY.
openssl rand -base64 32 | tr -d '=' | tr '+/' '-_'Configure environment variables
Copy the example env file and fill in your OAuth provider credentials and encryption key. For simpler setups, set AUTH_STRATEGY=bearer or AUTH_STRATEGY=api_key instead of OAuth.
cp .env.example .envSet required variables in .env
Configure authentication and provider settings. AUTH_STRATEGY can be oauth, bearer, api_key, custom, or none. For bearer auth, set BEARER_TOKEN. For OAuth, set PROVIDER_CLIENT_ID, PROVIDER_CLIENT_SECRET, PROVIDER_ACCOUNTS_URL, and PROVIDER_API_URL.
PROVIDER_CLIENT_ID=your_oauth_client_id
PROVIDER_CLIENT_SECRET=your_oauth_client_secret
PROVIDER_ACCOUNTS_URL=https://your-provider.com/oauth
PROVIDER_API_URL=https://your-provider.com/api
AUTH_STRATEGY=oauth
RS_TOKENS_ENC_KEY=your_generated_keyStart the development server
Run the Node.js development server. It starts on localhost:3000/mcp by default.
bun devAdd your custom tools
Create tool files in src/shared/tools/ using the defineTool() helper with a Zod schema, then register them in src/shared/tools/registry.ts. The template includes health check and echo example tools.
Deploy to Cloudflare Workers (optional)
For Cloudflare Workers deployment, create the KV namespace and set secrets via Wrangler, then deploy.
wrangler kv:namespace create TOKENS
wrangler secret put PROVIDER_CLIENT_ID
wrangler secret put PROVIDER_CLIENT_SECRET
wrangler secret put RS_TOKENS_ENC_KEY
wrangler deployStreamable MCP Server Template Examples
Client configuration
Connect Claude Desktop to your running Streamable MCP server using the mcp-remote adapter.
{
"mcpServers": {
"streamable-mcp": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3000/mcp"]
}
}
}Prompts to try
Test the built-in example tools and your custom tools with these prompts after connecting.
- "Check the health status of the MCP server"
- "Echo back the message 'Hello from Claude'"
- "List all available tools on this MCP server"
- "Call the [your-custom-tool] with parameter X"
- "What resources and prompts are available on this server?"Troubleshooting Streamable MCP Server Template
OAuth callback fails or token encryption errors on startup
Ensure RS_TOKENS_ENC_KEY is set and was generated with the provided openssl command (base64 URL-safe, no padding). The key must be exactly 32 bytes when decoded. For testing, switch to AUTH_STRATEGY=none or AUTH_STRATEGY=bearer to bypass OAuth.
Cloudflare Workers deployment fails with KV namespace errors
Run 'wrangler kv:namespace create TOKENS' and copy the namespace ID it outputs into wrangler.toml under [[kv_namespaces]]. The TOKENS KV namespace must exist before deploying.
Custom tools not being discovered by MCP clients
After creating a tool file in src/shared/tools/, you must register it in src/shared/tools/registry.ts by adding it to the sharedTools array. The server only exposes tools that are explicitly registered.
Frequently Asked Questions about Streamable MCP Server Template
What is Streamable MCP Server Template?
Streamable MCP Server Template is a Model Context Protocol (MCP) server that production-ready mcp server template with streamable http transport. supports node.js (hono) and cloudflare workers. includes oauth 2.1, multi-tenant sessions, tool/resource/prompt registration, and aes-256-gcm token encryption. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Streamable MCP Server Template?
Follow the installation instructions on the Streamable MCP Server Template GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Streamable MCP Server Template?
Streamable MCP Server Template works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Streamable MCP Server Template free to use?
Yes, Streamable MCP Server Template is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Streamable MCP Server Template Alternatives — Similar Developer Tools Servers
Looking for alternatives to Streamable MCP Server Template? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Streamable MCP Server Template in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Streamable MCP Server Template?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.