Back to MCP directory
publicPublicdnsLocal runtime

mcp-server-rhoai

该项目是一个用于实现与RHOAI协作的MCP服务器的学士学位论文项目,提供了在Cursor IDE中设置和使用MCP服务器的指南。

article

README

🚀 MCP服务器 - RHOAI

本项目旨在实现与RHOAI协同工作的MCP服务器,并且作为学士学位论文项目。

🚀 快速开始

在Cursor中设置MCP服务器

  1. 编译main.go函数(在仓库中执行go build -o any_name)。
  2. 在Cursor中按下Ctrl + Shift + P,然后输入Open MCP Settings
  3. 点击New MCP server

以下是可用于创建新MCP服务器的示例代码(命令为你构建的二进制文件的路径):

{
  "mcpServers": {
    "greeter": {
      "command": "/home/amaly/MCP-test/greeter"
    },
    "podslist": {
      "command": "/home/amaly/MCP-test/podslist"
    },
    "workbenchlist": {
      "command": "/home/amaly/MCP-test/WorkbenchList"
    }
  }
}
  1. 检查服务器是否在Cursor MCP设置中已启用,并且有一些可用的工具。
  2. 现在你可以通过在Cursor中与AI代理对话来使用MCP工具(例如提示:在命名空间mcp - test中查找工作台)。

⚠️ 重要提示

要使用与OpenShift集群交互的工具,你需要先登录。

📦 安装指南

代码检查工具安装

本仓库使用golangci - lint进行代码检查。

  • 安装方式
    • 使用Go安装:go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
    • 或者查看https://golangci-lint.run获取其他安装选项。
  • 本地运行
    • 使用Makefile:make lint
    • 直接运行:golangci-lint run

配置文件位于.golangci.yml

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client