Skip to main content
Glama

LLM 响应 MCP 服务器

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

概述

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

  1. submit-response :允许法学硕士提交对提示的响应

  2. get-responses :允许 LLM 检索其他 LLM 对特定提示的所有响应

这使得用户可以向多个 AI 代理提出相同的问题,然后使用这些工具,代理可以阅读并反思其他 LLM 对同一问题的回答。

Related MCP server: Model Context Provider (MCP) Server

安装

# 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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kstrikis/ephor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server