Token导航 LogoToken导航TokenDH.com
Tuxcare Eportal MCP logo
运维云端stdio官方级别未说明来源级核验

Tuxcare Eportal MCP

MCP Server

tuxcare-eportal-mcp

TuxCare ePortal MCP Server 是一个用于与TuxCare ePortal API集成的模型上下文协议(MCP)服务器,提供服务器、订阅源、注册密钥、补丁集和用户管理功能。

工具数

14

提示词数

0

GitHub Stars

0

资源数

0
TypeScriptClaude密钥管理Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Revmagi

提供方

Revmagi

最后核验

2026/5/17 20:22

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx tuxcare-eportal-mcp --help

详细介绍

TuxCare ePortal MCP服务器

用于与TuxCare ePortal API集成的模型上下文协议(MCP)服务器。该服务器提供MCP工具,用于通过ePortal API管理服务器、提要、注册密钥、补丁集和用户。

特性

  • 服务器管理:使用高级筛选列出、注册和注销服务器
  • 饲料管理:创建、修改和删除提要
  • 密钥管理:管理服务器注册的注册密钥
  • 补丁集管理:列出并管理patchset部署
  • 用户管理:列出ePortal用户
  • 服务器标记:设置和管理服务器标记
  • 灵活的身份验证:支持基本身份验证和API密钥

安装选项

选项1:NPM全局安装(推荐)

# Install globally from npm
npm install -g tuxcare-eportal-mcp

# Verify installation
tuxcare-eportal-mcp --help

选项2:NPX(无需安装)

# Run directly with npx
npx tuxcare-eportal-mcp --help

# Use in MCP configuration with npx
npx tuxcare-eportal-mcp --url https://your-eportal.com --auth-type basic --username admin --password secret

选项3:GitHub安装

# Install directly from GitHub
npm install -g github:Revmagi/tuxcare-eportal-mcp

# Or clone and install locally
git clone https://github.com/Revmagi/tuxcare-eportal-mcp.git
cd tuxcare-eportal-mcp
npm install
npm run build
npm link

配置指南

配置方法

您可以通过三种方式配置MCP服务器:

  1. 配置文件 (建议用于永久设置)
  2. 命令行参数 (适用于测试和Claude Code)
  3. 环境变量 (适用于集装箱化部署)

方法1:配置文件

创建JSON格式的配置文件:

基本身份验证示例(config.json):

{
  "eportal_url": "https://your-eportal.com",
  "auth": {
    "type": "basic",
    "username": "admin",
    "password": "your-password"
  }
}

API密钥验证示例(config.json):

{
  "eportal_url": "https://your-eportal.com",
  "auth": {
    "type": "api_key",
    "api_key": "your-api-key",
    "header_name": "X-Api-Key"
  }
}

配置文件位置

服务器按以下顺序查找配置文件:

  1. 指定的路径: --config /path/to/config.json
  2. 当前目录: ./config.json
  3. 主目录: ~/.tuxcare-eportal-mcp/config.json
  4. 系统目录: /etc/tuxcare-eportal-mcp/config.json

方法2:命令行参数

您可以通过命令行参数传递所有配置:

# Basic authentication
tuxcare-eportal-mcp \
  --url https://your-eportal.com \
  --auth-type basic \
  --username admin \
  --password your-password

# API key authentication
tuxcare-eportal-mcp \
  --url https://your-eportal.com \
  --auth-type api_key \
  --api-key your-api-key \
  --header-name X-Api-Key

方法3:环境变量

设置安全配置的环境变量:

export TUXCARE_EPORTAL_URL="https://your-eportal.com"
export TUXCARE_AUTH_TYPE="basic"
export TUXCARE_USERNAME="admin"
export TUXCARE_PASSWORD="your-password"

# Or for API key
export TUXCARE_AUTH_TYPE="api_key"
export TUXCARE_API_KEY="your-api-key"
export TUXCARE_HEADER_NAME="X-Api-Key"

MCP客户端配置

Claude代码配置

方法1:使用配置文件

  1. 在项目目录中创建配置文件:
   {
     "eportal_url": "https://your-eportal.com",
     "auth": {
       "type": "basic",
       "username": "admin",
       "password": "your-password"
     }
   }
  1. 添加到您的Claude Code MCP设置中:
   {
     "mcpServers": {
       "tuxcare-eportal": {
         "command": "npx",
         "args": ["tuxcare-eportal-mcp", "--config", "./config.json"]
       }
     }
   }

方法2:使用命令行参数(无配置文件)

基本身份验证:

{
  "mcpServers": {
    "tuxcare-eportal": {
      "command": "npx",
      "args": [
        "tuxcare-eportal-mcp@1.0.4",
        "--url", "https://your-eportal.com",
        "--auth-type", "basic",
        "--username", "admin",
        "--password", "your-password"
      ]
    }
  }
}

API密钥验证:

{
  "mcpServers": {
    "tuxcare-eportal": {
      "command": "npx",
      "args": [
        "tuxcare-eportal-mcp@1.0.4",
        "--url", "https://your-eportal.com",
        "--auth-type", "api_key",
        "--api-key", "your-api-key"
      ]
    }
  }
}

带有自定义标头的API密钥:

{
  "mcpServers": {
    "tuxcare-eportal": {
      "command": "npx",
      "args": [
        "tuxcare-eportal-mcp@1.0.4",
        "--url", "https://your-eportal.com",
        "--auth-type", "api_key",
        "--api-key", "your-api-key",
        "--header-name", "X-API-Key"
      ]
    }
  }
}

方法3:使用环境变量(最安全)

基本身份验证:

{
  "mcpServers": {
    "tuxcare-eportal": {
      "command": "npx",
      "args": ["tuxcare-eportal-mcp@1.0.4"],
      "env": {
        "TUXCARE_EPORTAL_URL": "https://your-eportal.com",
        "TUXCARE_AUTH_TYPE": "basic",
        "TUXCARE_USERNAME": "admin",
        "TUXCARE_PASSWORD": "your-password"
      }
    }
  }
}

API密钥验证:

{
  "mcpServers": {
    "tuxcare-eportal": {
      "command": "npx",
      "args": ["tuxcare-eportal-mcp@1.0.4"],
      "env": {
        "TUXCARE_EPORTAL_URL": "https://your-eportal.com",
        "TUXCARE_AUTH_TYPE": "api_key",
        "TUXCARE_API_KEY": "your-api-key"
      }
    }
  }
}

带有自定义标头的API密钥:

{
  "mcpServers": {
    "tuxcare-eportal": {
      "command": "npx",
      "args": ["tuxcare-eportal-mcp@1.0.4"],
      "env": {
        "TUXCARE_EPORTAL_URL": "https://your-eportal.com",
        "TUXCARE_AUTH_TYPE": "api_key",
        "TUXCARE_API_KEY": "your-api-key",
        "TUXCARE_HEADER_NAME": "X-API-Key"
      }
    }
  }
}

继续dev配置

添加到您的 continue.json:

{
  "mcpServers": {
    "tuxcare-eportal": {
      "command": "npx",
      "args": ["tuxcare-eportal-mcp", "--config", "./config.json"]
    }
  }
}

临床配置

添加到MCP设置中:

{
  "mcpServers": {
    "tuxcare-eportal": {
      "command": "tuxcare-eportal-mcp",
      "args": [
        "--url", "https://your-eportal.com",
        "--auth-type", "basic",
        "--username", "admin",
        "--password", "your-password"
      ]
    }
  }
}

通用MCP客户端配置

对于任何MCP客户端,请使用以下格式:

{
  "mcpServers": {
    "tuxcare-eportal": {
      "command": "tuxcare-eportal-mcp",
      "args": ["--config", "/path/to/config.json"]
    }
  }
}

配置设置命令

快速设置命令

以交互方式生成配置文件:

# Create config file with prompts
npx tuxcare-eportal-mcp --setup

# Create config file with basic auth
npx tuxcare-eportal-mcp --setup --url https://your-eportal.com --auth-type basic

# Create config file with API key
npx tuxcare-eportal-mcp --setup --url https://your-eportal.com --auth-type api_key

测试配置

验证您的配置是否有效:

# Test with config file
tuxcare-eportal-mcp --config ./config.json --test

# Test with command line args
tuxcare-eportal-mcp --url https://your-eportal.com --auth-type basic --username admin --password secret --test

可用工具

服务器管理

  • list_servers:列出具有筛选选项的服务器
  • register_host:注册新主机
  • unregister_host:按主机名、IP或服务器ID注销主机
  • bulk_unregister_hosts:批量注销非活动主机
  • set_server_tags:为服务器设置标签

饲料管理

  • list_feeds:列出所有订阅源
  • create_feed:创建或修改提要
  • delete_feed:删除提要

密钥管理

  • list_keys:列出注册密钥
  • create_key:创建或修改注册密钥
  • delete_key:删除注册密钥

补丁集管理

  • list_patchsets:列出饲料和产品的零件集
  • manage_patchsets:启用、禁用或管理patchset部署

用户管理

  • list_users:列出所有ePortal用户

工具使用示例

列出服务器

// List all servers
await callTool("list_servers", {});

// List servers with filtering
await callTool("list_servers", {
  hostname: "web%",
  tag: "env:production",
  limit: 50
});

// Get server count only
await callTool("list_servers", {
  only_count: true
});

注册主机

await callTool("register_host", {
  key: "production-key",
  hostname: "web-server-01"
});

管理补丁集

// Enable a patchset
await callTool("manage_patchsets", {
  patchset: "K20240101_01",
  feed: ["main", "staging"],
  action: "enable",
  product: "kernel"
});

// Enable all patchsets up to a specific one
await callTool("manage_patchsets", {
  patchset: "K20240101_01",
  feed: ["main"],
  action: "enable-upto",
  product: "kernel"
});

设置服务器标签

await callTool("set_server_tags", {
  server_id: "abc123",
  tags: "env:production;team:platform;ubuntu"
});

认证

基本身份验证

{
  "auth": {
    "type": "basic",
    "username": "your-username",
    "password": "your-password"
  }
}

API密钥验证

{
  "auth": {
    "type": "api_key",
    "api_key": "your-api-key",
    "header_name": "X-Api-Key"
  }
}

安全最佳实践

  1. 从不提交凭据 到版本控制
  2. 使用环境变量 敏感数据
  3. 限制文件权限 在配置文件上: chmod 600 config.json
  4. 使用API密钥 尽可能使用密码
  5. 轮换凭据 定期
  6. 使用HTTPS 适用于所有ePortal连接

故障排除

常见问题

连接错误

# Test connection
curl -v https://your-eportal.com/api/v1/servers

# Check DNS resolution
nslookup your-eportal.com

身份验证失败

# Test basic auth
curl -u username:password https://your-eportal.com/api/v1/servers

# Test API key
curl -H "X-Api-Key: your-key" https://your-eportal.com/api/v1/servers

配置问题

# Validate configuration file
npx tuxcare-eportal-mcp --config ./config.json --validate

# Show current configuration
npx tuxcare-eportal-mcp --config ./config.json --show-config

调试模式

启用调试日志记录:

# Debug mode
DEBUG=tuxcare:* tuxcare-eportal-mcp --config ./config.json

# Verbose output
tuxcare-eportal-mcp --config ./config.json --verbose

错误处理

服务器提供全面的错误处理:

  • 身份验证错误:清除凭证问题的消息
  • API错误:来自ePortal API的详细错误消息
  • 验证错误:输入验证,并显示有用的错误消息
  • 网络错误:超时和连接错误处理

发展

设置

git clone https://github.com/Revmagi/tuxcare-eportal-mcp.git
cd tuxcare-eportal-mcp
npm install

构建

npm run build

发展模式

npm run dev

测试

npm test

代码检查

npm run lint
npm run lint:fix

贡献

  1. 分叉存储库
  2. 创建要素分支
  3. 进行更改
  4. 如果适用,添加测试
  5. 运行linting和测试
  6. 提交拉取请求

许可证

MIT许可证-请参阅 许可证 文件以获取详细信息。

支持

  • 问题:
  • 文档: Tuxcare文档
  • ePortal API:请参阅ePortal API文档,了解API的详细参考资料

版本历史记录

  • 1.0.0:具有完整ePortal API支持的初始版本

目录标签

目录标签

TypeScriptClaude密钥管理服务器管理本地部署订阅源管理补丁管理用户管理API集成

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

tuxcare-eportal-mcp

工具数量(toolCount,工具数)

14

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP