- Explore MCP Servers
- sse-mcp-server
Sse Mcp Server
What is Sse Mcp Server
The sse-mcp-server is a sample implementation of a Model Context Protocol (MCP) server that utilizes Server-Sent Events (SSE) for real-time communication. It is designed to be deployed using Netlify Edge Functions.
Use cases
Use cases for sse-mcp-server include real-time messaging systems, live data feeds, and interactive applications where immediate updates are crucial.
How to use
To use sse-mcp-server, clone the repository, install dependencies using ‘npm install’, and start the development server with ‘npm run dev’. For deployment, install Netlify CLI, log in, initialize the site, and deploy using ‘npm run deploy’.
Key features
Key features include real-time communication via SSE, server-side implementation with Netlify Edge Functions, and a simple client interface for testing the SSE connection.
Where to use
sse-mcp-server can be used in web applications that require real-time updates, such as chat applications, live notifications, and collaborative tools.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Sse Mcp Server
The sse-mcp-server is a sample implementation of a Model Context Protocol (MCP) server that utilizes Server-Sent Events (SSE) for real-time communication. It is designed to be deployed using Netlify Edge Functions.
Use cases
Use cases for sse-mcp-server include real-time messaging systems, live data feeds, and interactive applications where immediate updates are crucial.
How to use
To use sse-mcp-server, clone the repository, install dependencies using ‘npm install’, and start the development server with ‘npm run dev’. For deployment, install Netlify CLI, log in, initialize the site, and deploy using ‘npm run deploy’.
Key features
Key features include real-time communication via SSE, server-side implementation with Netlify Edge Functions, and a simple client interface for testing the SSE connection.
Where to use
sse-mcp-server can be used in web applications that require real-time updates, such as chat applications, live notifications, and collaborative tools.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
SSE MCP Server
このリポジトリは、Server-Sent Events (SSE) を使用したModel Context Protocol (MCP) サーバーのサンプル実装です。Netlify Edge Functionsを使用してデプロイできるように設計されています。
最新の更新
- 2025/3/11: Netlify Edge Functionsでの502エラーを修正しました。SSE接続を維持するために定期的なpingメッセージを送信する機能を追加しました。
機能
- SSEを使用したリアルタイム通信
- Netlify Edge Functionsでのサーバーサイド実装
- シンプルなクライアントインターフェース
開発環境のセットアップ
-
リポジトリをクローン
git clone https://github.com/yourusername/sse-mcp-server.git cd sse-mcp-server -
依存関係をインストール
npm install -
開発サーバーを起動
npm run dev
Netlifyへのデプロイ
-
Netlify CLIをインストール(既にインストール済みの場合はスキップ)
npm install -g netlify-cli -
Netlifyにログイン
netlify login -
サイトを初期化(初回のみ)
netlify init -
デプロイ
npm run deploy
Netlifyデプロイ後の動作確認方法
デプロイが完了したら、以下の手順で動作確認を行うことができます:
-
デプロイされたサイトのURLにアクセスする
- デプロイ完了時にコンソールに表示されるURLか、Netlifyダッシュボードから確認できます
- 例:
https://your-site-name.netlify.app
-
トップページにアクセスすると、「SSE MCP Server is running. Access /sse to connect.」というメッセージが表示されます
- これはサーバーが正常に動作していることを示しています
-
デモページを使用してSSE接続をテストする
- トップページ(index.html)にはSSE接続をテストするためのUIが用意されています
- 「接続」ボタンをクリックしてSSEサーバーに接続します
- 接続が成功すると、ステータスが「接続中」に変わり、接続IDが表示されます
-
メッセージの送受信をテストする
- テキスト入力欄にメッセージを入力し、「送信」ボタンをクリックします
- 送信したメッセージがサーバーから返信され、画面に表示されます
-
以下の点を確認する
- 接続状態が正しく表示されるか
- 定期的なpingメッセージが受信されるか
- メッセージの送受信が正常に行われるか
- エラー発生時の処理が適切に行われるか
-
必要に応じて、開発者ツール(F12)のネットワークタブでSSE接続の詳細を確認する
/sseエンドポイントへのリクエストと、イベントストリームの状態を確認できます/messageエンドポイントへのPOSTリクエストが正常に処理されているか確認できます
これらの確認が成功すれば、SSE MCP Serverが正常にNetlifyにデプロイされ、動作していることが確認できます。
ファイル構成
everything.ts- MCPサーバーの実装sse.ts- Express.jsを使用したSSEサーバーnetlify/edge-functions/sse.ts- Netlify Edge Functionsを使用したSSEサーバーindex.html- クライアント側のデモページ
ライセンス
MITライセンス
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










