
yunusemredilber/express-mcp-sse-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
モデルコンテクストプロトコル(MCP)サーバーの実装で、サーバーに送信されたイベント(SSE)ベースの通信を有効にします.
概要
モデルコンテクストプロトコル(MCP)サーバーの実装で、サーバーに送信されたイベント(SSE)ベースの通信を有効にします。 MCP SSE Server は、サーバー・セント・イベント (SSE) を使用してリアルタイム通信を可能にするモデル・コンテキスト・プロトコル・実装を提供しています。 アプリケーションと連携し、モデルやリソースを管理・伝達する標準化された方法を提供するように設計されています。 - モデルコンテキストプロトコル(MCP)の実装 - リアルタイム通信のためのサーバー・セント・イベント(SSE) - リソースのテンプレートと管理 - Node.js(v14以上推奨) - ヤーンパッケージマネージャ(簡単に変更できます) リポジトリをクローンし、依存関係をインストールします。 開発モードでサーバーを起動するには: デバッグ用にMCPインスペクタでサーバーを実行します。 デフォルトでは、サーバーはポート3001で実行されます。 PORT 環境変数を設定することでこれをオーバーライドできます
概要(AI 翻訳)
モデルコンテクストプロトコル(MCP)サーバーの実装で、サーバーに送信されたイベント(SSE)ベースの通信を有効にします。
概要
MCP SSE Server は、サーバー・セント・イベント (SSE) を使用してリアルタイム通信を可能にするモデル・コンテキスト・プロトコル・実装を提供しています。 アプリケーションと連携し、モデルやリソースを管理・伝達する標準化された方法を提供するように設計されています。
##特徴
- モデルコンテキストプロトコル(MCP)の実装
- リアルタイム通信のためのサーバー送信イベント(SSE)
- 資源の蓄積と管理
前提条件
- Node.js(v14以上推奨)
- ヤーンのパッケージのマネージャー(容易に変えることができます)
インストール
リポジトリをクローンし、依存関係をインストールします。
使用法
サーバーの起動
開発モードでサーバーを起動するには:
デバッグ用にMCPインスペクタでサーバーを実行します。
生産モードのサーバーを始めるため:
デフォルトでは、サーバーはポート3001で実行されます。 [PORT]環境変数を設定することでこれをオーバーライドできます。
エンドポイント
- [
/sse- 持続的な接続を確立するためのSSEエンドポイント - [
/messages- MCP サーバーにメッセージを送信するエンドポイント
プロジェクト構成
- `src/index.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
Example MCP SSE Server
A Model Context Protocol (MCP) server implementation, enabling server-sent events (SSE) based communication.
Overview
Example MCP SSE Server provides a Model Context Protocol implementation that allows for real-time communication using Server-Sent Events (SSE). It’s designed to work with applications and provides a standardized way of managing and communicating with models and resources.
Features
- Model Context Protocol (MCP) implementation
- Server-Sent Events (SSE) for real-time communication
- Resource templating and management
Prerequisites
- Node.js (v14 or higher recommended)
- Yarn package manager (can be changed easily)
Installation
Clone the repository and install dependencies:
git clone [email protected]:yunusemredilber/express-mcp-sse-server.git
cd express-mcp-sse-server
yarn install
Usage
Starting the Server
To start the server in development mode:
yarn dev
This will run the server with the MCP inspector for debugging.
To start the server in production mode:
yarn start
By default, the server runs on port 3001. You can override this by setting the PORT environment variable:
PORT=5000 yarn start
Endpoints
/sse- SSE endpoint for establishing persistent connections/messages- Endpoint for sending messages to the MCP server
Project Structure
src/index.ts- Main entry point of the applicationsrc/mcp-server.ts- Implementation of the MCP server and resource definitionssrc/sse-server.ts- SSE server implementation using Express
Dependencies
- @modelcontextprotocol/sdk - SDK for Model Context Protocol
- Express - Web framework for Node.js
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →