@sup-platform/mcp-server
v1.2.4
Published
SupOS Platform MCP Server - Model Context Protocol Server for SupOS
Readme
supOS MCP Server
supOS MCP Server 是一个基于 Model Context Protocol (MCP) 的服务器,用于与 SupOS CE 平台进行交互。
安装
npm install -g @sup-platform/mcp-server使用方法
命令行参数
MCP Server 支持以下命令行参数:
| 参数 | 描述 | 默认值 | 示例 |
|------|------|--------|------|
| --port | 服务器监听端口号 | 3000 | --port 8080 |
| --transport | 传输类型,支持 stdio 或 streamable | stdio | --transport streamable |
| --supos-api-url | SupOS API 的基础 URL | - | --supos-api-url https://api.supos.com |
| --supos-api-key | SupOS API 的访问密钥 | - | --supos-api-key your-api-key |
| --openapi-path | OpenAPI 规范文件的路径 | ${supos-api-url}/swagger-ui/v3/api-docs/supOS-openAPI | --openapi-path http://api.supos.com/openapi.yaml |
环境变量
除了命令行参数外,MCP Server 还支持通过环境变量配置:
| 环境变量 | 描述 | 对应的命令行参数 |
|----------|------|-----------------|
| SUPOS_API_URL | SupOS API 的基础 URL | --supos-api-url |
| SUPOS_API_KEY | SupOS API 的访问密钥 | --supos-api-key |
桌面应用集成
要将 MCP Server 集成到桌面应用中,请在应用的服务器配置中添加以下内容(以 Cline 插件为例):
{
"mcpServers": {
"mcp-server-supos-stdio": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "npx",
"args": ["-y", "@sup-platform/mcp-server"],
"env": {
"SUPOS_API_URL": "xxx",
"SUPOS_API_KEY": "xxx"
}
},
"mcp-server-supos-streamable": {
"timeout": 60,
"url": "http://localhost:3000/mcp", // streamable 服务器监听地址
"type": "streamableHttp"
}
}
}开发
本地开发调试
stdio 模式(默认)
stdio 模式下直接使用:
pnpm run inspectorstreamable 模式
streamable 模式下使用以下命令:
- 先启动 streamable 服务
pnpm run start:streamable- 然后启动 inspector
pnpm run inspector自定义参数示例
指定端口
pnpm run start:streamable --port 8080指定 SupOS API URL 和 Key
pnpm run start:streamable --supos-api-url https://api.supos.com --supos-api-key your-api-key指定 OpenAPI 规范文件路径
pnpm run start:streamable --openapi-path ./path/to/openapi.yaml组合使用多个参数
pnpm run start:streamable --port 8080 --transport streamable --openapi-path ./path/to/openapi.yaml构建
pnpm run build许可证
ISC
