mcpField
S
SSE MCP Server

SSE MCP Server

Local
github.com/champierreDeveloper Tools2Updated 86w ago

About SSE MCP Server

SSE MCP Server is a sample MCP server implementation using Server-Sent Events, designed for deployment with Netlify Edge Functions. It includes a simple client interface for testing connections and message exchange.

Key features

  1. 01Real-time communication over SSE
  2. 02Server-side implementation with Netlify Edge Functions
  3. 03Simple client interface
  4. 04Periodic ping messages to maintain SSE connections

Use cases

  1. 01Test an SSE-based MCP connection
  2. 02Deploy an example server with Netlify Edge Functions
  3. 03Check connection status and message exchange

MCP support

It is a sample MCP server that communicates through Server-Sent Events. The `/sse` endpoint supports connections, with messages handled through `/message`.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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でのサーバーサイド実装
  • シンプルなクライアントインターフェース

開発環境のセットアップ

  1. リポジトリをクローン

    git clone https://github.com/yourusername/sse-mcp-server.git
    cd sse-mcp-server
    
  2. 依存関係をインストール

    npm install
    
  3. 開発サーバーを起動

    npm run dev
    

Netlifyへのデプロイ

  1. Netlify CLIをインストール(既にインストール済みの場合はスキップ)

    npm install -g netlify-cli
    
  2. Netlifyにログイン

    netlify login
    
  3. サイトを初期化(初回のみ)

    netlify init
    
  4. デプロイ

    npm run deploy
    

Netlifyデプロイ後の動作確認方法

デプロイが完了したら、以下の手順で動作確認を行うことができます:

  1. デプロイされたサイトのURLにアクセスする

    • デプロイ完了時にコンソールに表示されるURLか、Netlifyダッシュボードから確認できます
    • 例: https://your-site-name.netlify.app
  2. トップページにアクセスすると、「SSE MCP Server is running. Access /sse to connect.」というメッセージが表示されます

    • これはサーバーが正常に動作していることを示しています
  3. デモページを使用してSSE接続をテストする

    • トップページ(index.html)にはSSE接続をテストするためのUIが用意されています
    • 「接続」ボタンをクリックしてSSEサーバーに接続します
    • 接続が成功すると、ステータスが「接続中」に変わり、接続IDが表示されます
  4. メッセージの送受信をテストする

    • テキスト入力欄にメッセージを入力し、「送信」ボタンをクリックします
    • 送信したメッセージがサーバーから返信され、画面に表示されます
  5. 以下の点を確認する

    • 接続状態が正しく表示されるか
    • 定期的なpingメッセージが受信されるか
    • メッセージの送受信が正常に行われるか
    • エラー発生時の処理が適切に行われるか
  6. 必要に応じて、開発者ツール(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ライセンス

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.