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 服务器

模型上下文协议 (MCP) 服务器允许多个 AI 代理共享和读取彼此对同一提示的响应。

概述

该项目实现了一个 MCP 服务器,其中包含两个主要工具调用:

  1. submit-response :允许法学硕士提交对提示的响应
  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 Inspector 的支持,它是用于测试和调试 MCP 服务器的工具。

# Run the server with MCP Inspector bun run inspect

inspect脚本使用npx运行 MCP 检查器,它将在您的浏览器中启动一个 Web 界面以与您的 MCP 服务器进行交互。

这将允许您:

  • 探索可用的工具和资源
  • 使用不同参数的测试工具调用
  • 查看服务器的响应
  • 调试您的 MCP 服务器实现

用法

服务器公开两个端点:

  • /sse - MCP 客户端连接的服务器发送事件端点
  • /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

该项目包括 Docker 配置,可轻松部署到 EC2 或任何其他服务器环境。

先决条件

  • 运行 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 - 消息端点

确保端口 62886 在您的 EC2 安全组中已打开!

-
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