当前位置: 首页 > Skill >

Tencent Cloud Lighthouse

Tencent Cloud Lighthouse

Tencent Cloud Lighthouse

管理腾讯云轻量应用服务器——自动部署 mcporter + MCP、查询实例、监控告警、自诊断、防火墙、快照、远程...

1.0.0 2026.11.27 959
获取Skill文件查看使用说明
作 者:周川 许可证: 更新时间:2026.11.27
本文目录展开

Lighthouse 云服务器运维

通过 mcporter + lighthouse-mcp-server 管理腾讯云轻量应用服务器。

首次使用 — 自动设置

当用户首次要求管理云服务器时,按以下流程操作:

步骤 1:检查当前状态

{baseDir}/scripts/setup.sh --check-only

如果输出显示一切 OK(mcporter 已安装、config 已配置、lighthouse 已就绪),跳到「调用格式」。

步骤 2:如果未配置,引导用户提供密钥

告诉用户:

我需要你的腾讯云 API 密钥来连接 Lighthouse 服务器。请提供:

  1. SecretId — 腾讯云 API 密钥 ID
  2. SecretKey — 腾讯云 API 密钥 Key

你可以在 腾讯云控制台 > 访问管理 > API密钥管理 获取。

步骤 3:用户提供密钥后,运行自动设置

{baseDir}/scripts/setup.sh --secret-id "<用户提供的SecretId>" --secret-key "<用户提供的SecretKey>"

脚本会自动:

  • 检查并安装 mcporter(如未安装)
  • 创建 ~/.mcporter/mcporter.json 配置文件
  • 写入 lighthouse MCP 服务器配置和密钥
  • 验证连接

设置完成后即可开始使用。

调用格式

所有 mcporter 命令必须使用以下格式:

mcporter call lighthouse.<tool_name> --config ~/.mcporter/mcporter.json --output json [--args '<JSON>']

列出可用工具:

mcporter list lighthouse --config ~/.mcporter/mcporter.json --schema

工具总览

本 MCP Server 包含以下工具类别:

类别 说明
地域查询 获取可用地域列表(唯一不需要 Region 参数的操作)
实例管理 查询、启动实例,查看流量包/套餐/配额等(需要 Region)
监控与告警 获取多指标监控数据、设置告警策略、服务器自检(需要 Region)
防火墙 规则增删改查、防火墙模板管理(需要 Region)
远程命令(TAT) 在实例上执行命令、查询任务状态(需要 Region)

常用操作

以下所有示例省略了公共前缀 mcporter call lighthouse. 和 --config ~/.mcporter/mcporter.json --output json。 完整命令格式:mcporter call lighthouse.<tool_name> --config ~/.mcporter/mcporter.json --output json --args '<JSON>'

获取地域列表(不需要 Region 参数)

# 查询所有可用地域 — 唯一不需要 Region 参数的操作
# 首次使用时应先调用此接口获取可用 Region 列表
mcporter call lighthouse.describe_regions --config ~/.mcporter/mcporter.json --output json

实例管理

# 查询实例列表(Region 必填,可选参数: InstanceIds, Offset, Limit)
mcporter call lighthouse.describe_instances --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","Limit":20,"Offset":0}'

# 查询指定实例
mcporter call lighthouse.describe_instances --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceIds":["lhins-xxxxxxxx"]}'

# 启动实例
mcporter call lighthouse.start_instances --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceIds":["lhins-xxxxxxxx"]}'

# 获取实例登录终端地址
mcporter call lighthouse.describe_instance_login_url --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx"}'

# 查询所有应用镜像
mcporter call lighthouse.describe_all_applications --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou"}'
# BlueprintType 可选: APP_OS | PURE_OS | DOCKER | ALL(默认ALL)

监控与告警

# 获取监控数据(支持多指标同时查询,默认最近6小时)
mcporter call lighthouse.get_monitor_data --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx","Indicators":["CPU利用率","内存利用率"]}'

# 获取监控数据(指定时间范围)
mcporter call lighthouse.get_monitor_data --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx","Indicators":["公网出带宽","公网入带宽"],"StartTime":"2026-02-09 00:00:00","EndTime":"2026-02-10 00:00:00"}'

# 支持的监控指标(中文名称):
# CPU利用率 | 内存利用率 | 公网出带宽 | 公网入带宽
# 系统盘读IO | 系统盘写IO | 公网流量包

# 设置告警策略
# Alarms 中的 Frequency/Points/Size 均为字符串类型
mcporter call lighthouse.set_alerting_strategy --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx","Indicator":"CPU利用率","Alarms":[{"Frequency":"300","Threshold":"80%","Level":"严重","Points":"3","Size":"60"}],"PolicyName":"CPU高负载告警"}'
# Frequency(秒): "300"|"600"|"900"|"1800"|"3600"|"7200"|"10800"|"21600"|"43200"|"86400"
# Level: "提示"|"严重"|"紧急"    Points: "1"-"5"    Size: "60"|"300"

# 服务器自检(检测网络、防火墙、存储、状态、性能)
mcporter call lighthouse.self_test --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx"}'

防火墙

# 查询防火墙规则
mcporter call lighthouse.describe_firewall_rules --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx"}'

# 添加防火墙规则
mcporter call lighthouse.create_firewall_rules --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx","FirewallRules":[{"Protocol":"TCP","Port":"8080","CidrBlock":"0.0.0.0/0","Action":"ACCEPT","FirewallRuleDescription":"开放8080端口"}]}'

# 删除防火墙规则
mcporter call lighthouse.delete_firewall_rules --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx","FirewallRules":[{"Protocol":"TCP","Port":"8080"}]}'

远程命令执行 (TAT)

# 在 Linux 实例上执行命令
mcporter call lighthouse.execute_command --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx","Command":"uptime && df -h && free -m","SystemType":"Linux"}'

# 在 Windows 实例上执行命令
mcporter call lighthouse.execute_command --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InstanceId":"lhins-xxxxxxxx","Command":"Get-Process | Sort-Object CPU -Descending | Select-Object -First 10","SystemType":"Windows"}'

# 查询命令执行任务详情(自动轮询直到完成)
mcporter call lighthouse.describe_command_tasks --config ~/.mcporter/mcporter.json --output json --args '{"Region":"ap-guangzhou","InvocationTaskId":"invt-xxxxxxxx"}'

# 注意: Command 最大 2048 字符,超长命令建议登录实例手动执行

使用规范

  1. 每次调用必须带 --config ~/.mcporter/mcporter.json
  2. 始终加 --output json 获取结构化输出
  3. Region 参数规则: 除 describe_regions 外,所有操作都必须传入 Region 参数。如果用户未指定 Region,应先调用 describe_regions 获取可用地域列表,再让用户选择或根据上下文确定
  4. 首次使用流程: 先调用 describe_regions 获取地域列表 → 再调用 describe_instances 获取实例列表 → 记住 InstanceId 和 Region 供后续使用
  5. 用实际的 InstanceId 替换示例中的 lhins-xxxxxxxx(先通过 describe_instances 获取)
  6. 监控指标用中文: get_monitor_data 的 Indicators 参数使用中文名称(CPU利用率、内存利用率等)
  7. 命令长度限制: execute_command 的 Command 参数最大 2048 字符,超长建议登录实例执行
  8. 危险操作前先确认: 防火墙修改、命令执行、实例关机/重启等,先向用户确认
  9. 错误处理: 如果调用失败,先用 {baseDir}/scripts/setup.sh --check-only 诊断问题,或用 self_test 检测实例状态

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,042
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,036
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,023
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,023
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,021
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,017
Skill 文件
  • SKILL.md
    • Lighthouse 云服务器运维
    • 首次使用 — 自动设置
      • 步骤 1:检查当前状态
      • 步骤 2:如果未配置,引导用户提供密钥
      • 步骤 3:用户提供密钥后,运行自动设置
    • 调用格式
    • 工具总览
    • 常用操作
      • 获取地域列表(不需要 Region 参数)
      • 实例管理
      • 监控与告警
      • 防火墙
      • 远程命令执行 (TAT)
    • 使用规范
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期