LLM 响应 MCP 服务器
模型上下文协议 (MCP) 服务器允许多个 AI 代理共享和读取彼此对同一提示的响应。
概述
该项目实现了一个 MCP 服务器,其中包含两个主要工具调用:
submit-response:允许法学硕士提交对提示的响应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 inspectinspect脚本使用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 访问实例
部署步骤
将存储库克隆到您的 EC2 实例:
git clone <your-repository-url> cd <repository-directory>使部署脚本可执行:
chmod +x deploy.sh运行部署脚本:
./deploy.sh
该脚本将:
如果尚未安装 Docker 和 Docker Compose,请安装它们
构建 Docker 镜像
以分离模式启动容器
显示可访问 MCP 服务器的公共 URL
手动部署
如果您希望手动部署:
构建 Docker 镜像:
docker-compose build启动容器:
docker-compose up -d验证容器正在运行:
docker-compose ps
访问服务器
部署完成后,您的 MCP 服务器将可以通过以下方式访问:
http://<ec2-public-ip>:62886/sse- SSE 端点http://<ec2-public-ip>:62886/messages- 消息端点
确保端口 62886 在您的 EC2 安全组中已打开!
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.