What is Supos

supOS MCP Server

本MCP服务器是基于 Model Context Protocol (MCP) 协议提供的 typescript-sdk 进行开发,可以让任何支持MCP协议的客户端使用它。

它提供了一系列supOS的open-api,例如:查询topic树结构,topic详情等。

支持的API

Tools

  1. get-model-topic-tree

    • 查询topic 树结构菜单数据
    • 输入:
      • key (string): Fuzzy search keyword for child nodes
      • showRec (boolean): Number of records to display
      • type (string): Search type: 1--Text search, 2--Tag search
    • 返回: topic 树结构菜单数据
  2. get-model-topic-detail

    • 获取某个topic详情
    • 输入:
      • topic (string): The topic path corresponding to the model
    • 返回: 某个topic详情
  3. get-topic-realtime-data

    • 获取某个topic的实时数据
    • 输入:
      • topic (string): The topic path corresponding to the model
    • 返回: 某个topic实时数据
  4. get-all-topic-realtime-data

    • 获取所有topic的实时数据并分析
    • 返回: 所有topic实时数据

接下来跟随文档一起使用吧

开始使用

系统要求

  • Node.js

安装客户端

目前支持MCP协议的客户端已有很多,比如桌面端应用 Claude for Desktop,或者IDE的一些插件等(VSCodeCline 插件),想了解已支持的客户端可访问 Model Context Protocol Client

这里以 Claude for Desktop 为例。

  • 下载 Claude for Desktop

  • Claude for Desktop 配置所需的MCP 服务器。

    • 在文本编辑器中打开您的 Claude for Desktop 配置:~/Library/Application Support/Claude/claude_desktop_config.json
    • 也可以通过 File -> Setting -> Developer 点击 Edit Config 找到该配置文件位置: !alt text !alt text !alt text
    • 打开配置文件后,添加以下内容到 claude_desktop_config.json中,并重启应用:
      注意:每次修改该配置文件后都需要重启应用才会生效。

      {
        "mcpServers": {
          "supos": {
            "command": "npx",
            "args": [
              "-y",
              "mcp-server-supos"
            ],
            "env": {
              "SUPOS_API_KEY": "<API_KEY>",
              "SUPOS_API_URL": "<API_URL>",
              "SUPOS_MQTT_URL": "<MQTT_URL>"
            }
          }
        }
      }
      
    • 其中 API_URL 是可访问的supOS社区版地址。API_KEY 可通过登录社区版后,进入 DataModeling -> 查看某个具体的topic详情 -> Data Operation -> Fetch,找到对应的ApiKey复制即可,MQTT_URL可通过访问 UNS -> MqttBroker -> Listeners 查看可订阅的地址。

注意:以上配置MCP服务器是借助 npx 拉取 mcp-server-supos npm包并在本地运行的方式给客户端提供服务。但 npxWindows 系统下读取环境变量 env 配置时可能会出错,因此可以采用下面方式解决:

本地运行服务

以下两种方式选择一种即可:

  • 本地安装 mcp-server-supos,并通过node运行
  1. Install
npm install mcp-server-supos -g
  1. 找到安装的包路径,例如: "C://Users//<USER_NAME>//AppData//Roaming//npm/`/node_modules//mcp-server-supos//dist//index.js"```

  2. 修改 claude_desktop_config.json 的配置,并重启应用

{
  "mcpServers": {
    "supos": {
      "command": "node",
      "args": [
        "C:/`/Users//<USER_NAME>//AppData//Roaming//npm/`/node_modules//mcp-server-supos//dist//index.js"``
      ],
      "env": {
        "SUPOS_API_KEY": "<API_KEY>",
        "SUPOS_API_URL": "<API_URL>",
        "SUPOS_MQTT_URL": "<MQTT_URL>"
      }
    }
  }
}
  • 下载本仓库源码本地编译执行
  1. 复制仓库:
git clone https://github.com/FREEZONEX/mcp-server-supos.git
  1. 安装依赖
npm ci
  1. 编译
npm run build
  1. 修改 claude_desktop_config.json 的配置,并重启应用
{
  "mcpServers": {
    "supos": {
      "command": "node",
      "args": [
        "<本地项目地址>//dist//index.js"
      ],
      "env": {
        "SUPOS_API_KEY": "<API_KEY>",
        "SUPOS_API_URL": "<API_URL>",
        "SUPOS_MQTT_URL": "<MQTT_URL>"
      }
    }
  }
}

结语

以上就是使用该服务的全部教程,配置成功后可在以下面板中看到对应的服务和工具等: !alt text !alt text !alt text

最后的最后

supOS社区版 已集成 CopilotKit 作者开源的 open-mcp-client,并内置了 mcp-server-supos 服务,且支持ts版本的 agent,源码可访问 supOS-CE-McpClient

Leave a Comment

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.

What are MCP Servers?

MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.

How do MCP Servers work?

MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.

Are MCP Servers secure?

Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.

Related MCP Servers

aashari mcp server atlassian bitbucket avatar

aashari mcp server atlassian bitbucket

Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.

atlassianrepositorymcp
aashari mcp server atlassian confluence avatar

aashari mcp server atlassian confluence

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.

atlassianmcpconfluence
webflow mcp server avatar

webflow mcp server

Model Context Protocol (MCP) server for the Webflow Data API.

model-context-protocolapimcp
vionwinnie jap vocab anki mcp server avatar

vionwinnie jap vocab anki mcp server

Japanese Vocab Anki MCP Server

japanese-studymcpmcp-server
vgnshiyer apple books mcp avatar

vgnshiyer apple books mcp

Apple Books MCP Server

applemcpmcp-server
ttiimmaacc cinema4d mcp avatar

ttiimmaacc cinema4d mcp

Cinema 4D plugin integrating Claude AI for prompt-driven 3D modeling, scene creation, and manipulation.

plugincinema-4d-pluginai-integration
Rayyan9477 linkedin mcp avatar

Rayyan9477 linkedin mcp

A powerful Model Context Protocol server for LinkedIn interactions that enables AI assistants to search for jobs, generate resumes and cover letters, and manage job applications programmatically.

machine-learningsearchartificial-intelligence
Panth1823 formula1 mcp avatar

Panth1823 formula1 mcp

mcpmcp-serverformula1
Nekzus npm sentinel mcp avatar

Nekzus npm sentinel mcp

A powerful Model Context Protocol (MCP) server that revolutionizes NPM package analysis through AI.

npmmcpmcp-server
mario andreschak mcp veo2 avatar

mario andreschak mcp veo2

MCP for Video- or Image-Generation with Google VEO2

gomcpmcp-server

Submit Your MCP Server

Share your MCP server with the community

Submit Now