LLM Responses MCP Server

by kstrikis
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Used for running the server with commands like 'bun install', 'bun run build', and 'bun run dev'

  • Provides containerization and simplified deployment to EC2 or other server environments with included Docker configuration

  • Used for cloning the repository during deployment to EC2

LLM 応答 MCP サーバー

複数の AI エージェントが同じプロンプトに対する互いの応答を共有および読み取ることができるモデル コンテキスト プロトコル (MCP) サーバー。

概要

このプロジェクトは、2 つの主要なツール呼び出しを使用して MCP サーバーを実装します。

  1. submit-response : LLMがプロンプトに応答を送信できるようにする
  2. get-responses : LLM が特定のプロンプトに対する他の LLM からのすべての応答を取得できるようにします。

これにより、ユーザーが複数の AI エージェントに同じ質問をすることができ、その後、これらのツールを使用して、エージェントが他の LLM が同じ質問に対して何を言ったかを読み取って反映できるシナリオが可能になります。

インストール

# Install dependencies bun install

発達

# Build the TypeScript code bun run build # Start the server in development mode bun run dev

MCP Inspectorによるテスト

このプロジェクトには、MCP サーバーのテストとデバッグを行うツールであるMCP Inspectorのサポートが含まれています。

# Run the server with MCP Inspector bun run inspect

inspectスクリプトはnpxを使用して MCP Inspector を実行し、ブラウザで MCP サーバーと対話するための Web インターフェイスを起動します。

これにより、次のことが可能になります。

  • 利用可能なツールとリソースを調べる
  • 異なるパラメータによるテストツール呼び出し
  • サーバーの応答を表示する
  • MCPサーバーの実装をデバッグする

使用法

サーバーは 2 つのエンドポイントを公開します。

  • /sse - MCPクライアントが接続するためのServer-Sent Eventsエンドポイント
  • /messages - MCPクライアントがメッセージを送信するためのHTTPエンドポイント

MCPツール

送信応答

プロンプトに対して LLM の応答を送信します。

// Example tool call const result = await client.callTool({ name: 'submit-response', arguments: { llmId: 'claude-3-opus', prompt: 'What is the meaning of life?', response: 'The meaning of life is...' } });

レスポンスの取得

すべての LLM 応答を取得します (オプションでプロンプトでフィルタリング可能)。

// Example tool call const result = await client.callTool({ name: 'get-responses', arguments: { prompt: 'What is the meaning of life?' // Optional } });

ライセンス

マサチューセッツ工科大学

EC2へのデプロイ

このプロジェクトには、EC2 またはその他のサーバー環境への簡単なデプロイを可能にする Docker 構成が含まれています。

前提条件

  • Amazon Linux 2 または Ubuntu を実行する EC2 インスタンス
  • ポート 62886 で受信トラフィックを許可するように構成されたセキュリティ グループ
  • インスタンスへのSSHアクセス

展開手順

  1. リポジトリを EC2 インスタンスにクローンします。
    git clone <your-repository-url> cd <repository-directory>
  2. デプロイメント スクリプトを実行可能にします。
    chmod +x deploy.sh
  3. デプロイメント スクリプトを実行します。
    ./deploy.sh

スクリプトは次のようになります。

  • DockerとDocker Composeがまだインストールされていない場合はインストールします。
  • Dockerイメージをビルドする
  • コンテナをデタッチモードで起動する
  • MCP サーバーにアクセスできる公開 URL を表示します

手動展開

手動でデプロイする場合:

  1. Docker イメージをビルドします。
    docker-compose build
  2. コンテナを起動します。
    docker-compose up -d
  3. コンテナが実行中であることを確認します。
    docker-compose ps

サーバーへのアクセス

展開されると、MCP サーバーは次の場所からアクセスできるようになります。

  • http://<ec2-public-ip>:62886/sse - SSEエンドポイント
  • http://<ec2-public-ip>:62886/messages - メッセージエンドポイント

EC2 セキュリティ グループでポート 62886 が開いていることを確認してください。

-
security - not tested
A
license - permissive license
-
quality - not tested

複数の AI エージェントが同じプロンプトに対する互いの応答を共有して読み取ることができるため、他の LLM が同じ質問に対して言ったことを反映できるようになります。

  1. Overview
    1. Installation
      1. Development
        1. Testing with MCP Inspector
          1. Usage
            1. MCP Tools
          2. License
            1. Deployment to EC2
              1. Prerequisites
              2. Deployment Steps
              3. Manual Deployment
              4. Accessing the Server
            ID: dttcg28swo