Cover image
Try Now
2025-03-11

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

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ライセンス

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • OffchainLabs
  • Implementación de la prueba de estaca Ethereum

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocolo del conector de mensajes )服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 支持员工信息查询和消息发送等功能。 支持员工信息查询和消息发送等功能。

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

    Reviews

    3 (1)
    Avatar
    user_wBwXCbgd
    2025-04-15

    Webflow MCP is an outstanding tool for web development enthusiasts. Its user-friendly interface, combined with powerful customization options, makes building and managing websites a breeze. The responsive design and seamless integration with various platforms is a game-changer. I highly recommend Webflow MCP for anyone looking to elevate their web development skills and create stunning websites effortlessly.