IS

iceener/streamable-mcp-server-template

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

145 stars 55 forks 품질 76 트렌드 30MIT

iceener/streamable-mcp-server-template는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요

iceener/streamable-mcp-server-template는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요(AI 번역)

이 템플릿은 원격 모델 컨텍스트 프로토콜(MCP) 서버입니다. Bun와 Cloudflare Workers에서 실행됩니다. 공식 MCP TypeScript SDK를 사용합니다.

서버는 프로토콜 버전 2026-07-28를 사용합니다. 또한 2025년 프로토콜 버전을 사용하는 클라이언트도 받습니다.

템플릿에는 다음과 같은 기능이 포함되어 있습니다:

  • Host 및 Origin 헤더 검사.
  • OAuth 토큰 검사. 서버는 OAuth 리소스 서버입니다. 당신의 코드는 토큰을 받지 않습니다.
  • 오류 정책. 서버는 내부 오류 데이터를 클라이언트에 전송하지 않습니다.
  • Bun과 Cloudflare Workers에서 실행되는 테스트.

샘플 서버는 Open-Meteo에서 날씨 데이터를 제공합니다. Open-Meteo는 API 키가 필요하지 않습니다. 샘플을 도구로 교체하세요. 템플릿의 나머지 부분은 유지하세요.

요구 사항

  • 번 1.4 이상.
  • Node.js 22.18 또는 그 이후. 랭글러 명령과 연기 테스트는 Node.js을 사용합니다.

서버 시작

  1. 의존성 설치:

  2. 서버 시작:

서버 URL은 [[T3]입니다.

Cloudflare 로컬 런타임을 사용하려면 bun run dev:worker를 실행하세요. 서버 URL은 http://127.0.0.1:8787/mcp입니다.

고객을 연결해 주세요

서버 URL과 Streamable HTTP 전송을 사용하세요.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

MCP Server Template

This template is a remote Model Context Protocol (MCP) server. It runs on Bun and on Cloudflare Workers. It uses the official MCP TypeScript SDK.

The server uses protocol version 2026-07-28. It also accepts clients that use the 2025 protocol versions.

The template includes these functions:

  • Checks of the Host and Origin headers.
  • OAuth token checks. The server is an OAuth resource server. Your code does not receive the token.
  • An error policy. The server does not send internal error data to clients.
  • Tests that run on Bun and on Cloudflare Workers.

The sample server gives weather data from Open-Meteo. Open-Meteo does not require an API key. Replace the samples with your tools. Keep the other parts of the template.

Requirements

  • Bun 1.4 or later.
  • Node.js 22.18 or later. The Wrangler commands and the smoke tests use Node.js.

Start the server

  1. Install the dependencies:

    bun install
    
  2. Start the server:

    bun run dev
    

The server URL is http://127.0.0.1:3000/mcp.

To use the Cloudflare local runtime, run bun run dev:worker. The server URL is then http://127.0.0.1:8787/mcp.

Connect a client

Use the server URL and the Streamable HTTP transport.

Client Procedure
MCP Inspector Run bun run inspector. Select Streamable HTTP. Enter the server URL.
Claude Code Run claude mcp add --transport http weather http://127.0.0.1:3000/mcp.
VS Code Add { "servers": { "weather": { "type": "http", "url": "http://127.0.0.1:3000/mcp" } } } to .vscode/mcp.json.
Cursor Add { "mcpServers": { "weather": { "url": "http://127.0.0.1:3000/mcp" } } } to ~/.cursor/mcp.json.

To test the connection, send a request. For example: “What is the weather in Kraków this week?”

Samples

Each sample shows one procedure.

Sample Type Shows
get-forecast Tool A call to an external API through a service. It shows cancellation, progress, and errors that the model can correct.
echo Tool The smallest complete tool: an input schema, an output schema, and annotations.
whoami Tool How to read the identity of the verified caller.
confirm-action Tool How to ask the user for approval during a call (input_required). The tool also requires an OAuth scope.
docs://server/guide Resource A static resource.
weather://codes/{code} Resource template How to list, read, and complete URIs from a template.
weather-briefing Prompt Prompt arguments and argument completion.

Project structure

src/
  server.ts       Server identity, dependencies, token verification, extra routes, McpServer factory
  settings.ts     Settings for your code, for example API keys
  tools/          ┐
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →