Sakura Cloud MCP Server

Sakura Cloud MCP Server

一个 MCP 服务器实现,使 AI 助手能够与 Sakura Cloud 基础设施进行交互和管理,包括服务器、磁盘、网络和容器化应用程序。

Category
访问服务器

Tools

get_interface_info

Get detailed information about a specific network interface

get_icon_list

Get list of icons

get_icon_info

Get detailed information about a specific icon

get_note_list

Get list of notes and startup scripts

get_note_info

Get detailed information about a specific note or startup script

get_sshkey_list

Get list of SSH keys

get_sshkey_info

Get detailed information about a specific SSH key

get_region_list

Get list of regions

get_region_info

Get detailed information about a specific region

get_zone_list

Get list of zones

get_zone_info

Get detailed information about a specific zone

get_product_info

Get detailed information about specific product offerings

get_commonserviceitem_list

Get list of common service items (DNS, Simple Monitor, etc.)

get_commonserviceitem_info

Get detailed information about a specific common service item

get_license_list

Get list of licenses

get_license_info

Get detailed information about a specific license

get_bill_info

Get billing information for a specific month

get_bill_detail

Get detailed billing information for a specific month

get_coupon_info

Get information about a specific coupon

get_privatehost_info

Get detailed information about a specific private host

get_public_price

Get public pricing information for Sakura Cloud services

get_apprun_list

Get list of all AppRun applications

get_apprun_info

Get detailed information about a specific AppRun application

get_router_info

Get detailed information about a specific router

get_interface_list

Get list of network interfaces

get_server_info

Get detailed information about a specific server

get_server_list

Get list of servers

get_switch_list

Get list of switches

get_switch_info

Get detailed information about a specific switch

get_appliance_list

Get list of appliances

get_appliance_info

Get detailed information about a specific appliance

get_disk_list

Get list of disks

get_disk_info

Get detailed information about a specific disk

get_archive_list

Get list of archives

get_archive_info

Get detailed information about a specific archive

get_cdrom_list

Get list of ISO images

get_cdrom_info

Get detailed information about a specific ISO image

get_bridge_list

Get list of bridges

get_bridge_info

Get detailed information about a specific bridge

get_router_list

Get list of routers

create_apprun

Create a new AppRun application

delete_apprun

Delete an AppRun application

start_apprun

Start an AppRun application

stop_apprun

Stop an AppRun application

update_apprun

Update an existing AppRun application

get_apprun_logs

Get logs from an AppRun application

README

Sakura Cloud MCP 服务器

一个用于与 Sakura Cloud API 交互的模型上下文协议 (MCP) 服务器实现。

什么是 MCP?

模型上下文协议 (MCP) 是一种标准化的通信协议,使 AI 应用程序能够安全地与外部系统和数据源交互。它遵循客户端-服务器架构,其中 LLM 应用程序发起与暴露资源和工具的服务器的连接。

概述

本项目实现了一个 MCP 服务器,允许 AI 助手通过标准化的接口与 Sakura Cloud 基础设施交互。它使 AI 助手能够:

  • 访问 Sakura Cloud 资源,如服务器、磁盘、网络等
  • 使用工具列出资源并检索有关特定资源的详细信息
  • 查询公共定价信息,无需身份验证
  • 管理 AppRun 容器化应用程序

前提条件

  • Node.js (v16 或更高版本)
  • Sakura Cloud API 凭据(令牌和密钥)
  • Claude 桌面应用程序,用于与 Claude 一起使用(MCP 目前仅在桌面应用程序中受支持)

安装

# 克隆仓库
git clone https://github.com/hidenorigoto/sacloud-mcp.git
cd sacloud-mcp

# 安装依赖
npm install

# 构建项目
npm run build

配置

设置以下环境变量:

  • SACLOUD_API_TOKEN: 您的 Sakura Cloud API 令牌
  • SACLOUD_API_SECRET: 您的 Sakura Cloud API 密钥

用法

可用资源

资源 URI 描述
sakura:///servers 列出您 Sakura Cloud 帐户中的所有服务器
sakura:///switches 列出您 Sakura Cloud 帐户中的所有交换机
sakura:///appliances 列出您 Sakura Cloud 帐户中的所有 appliance
sakura:///disks 列出您 Sakura Cloud 帐户中的所有磁盘
sakura:///archives 列出您 Sakura Cloud 帐户中的所有归档
sakura:///cdrom 列出您 Sakura Cloud 帐户中的所有 ISO 镜像 (CD-ROM)
sakura:///bridge 列出您 Sakura Cloud 帐户中的所有网桥
sakura:///internet 列出您 Sakura Cloud 帐户中的所有路由器
sakura:///interface 列出您 Sakura Cloud 帐户中的所有网络接口
sakura:///icon 列出您 Sakura Cloud 帐户中的所有图标
sakura:///note 列出您 Sakura Cloud 帐户中的所有启动脚本和备注
sakura:///sshkey 列出您 Sakura Cloud 帐户中的所有 SSH 密钥
sakura:///region 列出您 Sakura Cloud 帐户中的所有区域
sakura:///zone 列出您 Sakura Cloud 帐户中的所有可用区
sakura:///product 列出您 Sakura Cloud 帐户中的所有可用产品
sakura:///commonserviceitem 列出您 Sakura Cloud 帐户中的所有通用服务项(DNS、简单监控等)
sakura:///license 列出您 Sakura Cloud 帐户中的所有许可证
sakura:///auth-status 显示当前身份验证状态和权限
sakura:///bill 显示每月账单信息
sakura:///bill-detail 显示账单信息的详细分解
sakura:///coupon 列出所有可用优惠券
sakura:///privatehost 列出您 Sakura Cloud 帐户中的所有私有主机
sakura:///public-price 显示 Sakura Cloud 服务的公共定价信息(无需身份验证)
sakura:///apprun 列出您 Sakura Cloud 帐户中的所有 AppRun 应用程序

可用工具

工具名称 描述 必需参数
get_server_list 检索所有服务器的列表
get_server_info 检索有关特定服务器的详细信息 serverId
get_switch_list 检索所有交换机的列表
get_switch_info 检索有关特定交换机的详细信息 switchId
get_appliance_list 检索所有 appliance 的列表
get_appliance_info 检索有关特定 appliance 的详细信息 applianceId
get_disk_list 检索所有磁盘的列表
get_disk_info 检索有关特定磁盘的详细信息 diskId
get_archive_list 检索所有归档的列表
get_archive_info 检索有关特定归档的详细信息 archiveId
get_cdrom_list 检索所有 ISO 镜像的列表
get_cdrom_info 检索有关特定 ISO 镜像的详细信息 cdromId
get_bridge_list 检索所有网桥的列表
get_bridge_info 检索有关特定网桥的详细信息 bridgeId
get_router_list 检索所有路由器的列表
get_router_info 检索有关特定路由器的详细信息 routerId
get_interface_list 检索所有网络接口的列表
get_interface_info 检索有关特定网络接口的详细信息 interfaceId
get_icon_list 检索所有图标的列表
get_icon_info 检索有关特定图标的详细信息 iconId
get_note_list 检索所有备注和启动脚本的列表
get_note_info 检索有关特定备注或启动脚本的详细信息 noteId
get_sshkey_list 检索所有 SSH 密钥的列表
get_sshkey_info 检索有关特定 SSH 密钥的详细信息 sshkeyId
get_region_list 检索所有区域的列表
get_region_info 检索有关特定区域的详细信息 regionId
get_zone_list 检索所有可用区的列表
get_zone_info 检索有关特定可用区的详细信息 zoneId
get_product_info 检索有关特定产品产品的详细信息 productType
get_commonserviceitem_list 检索所有通用服务项的列表
get_commonserviceitem_info 检索有关特定通用服务项的详细信息 itemId
get_license_list 检索所有许可证的列表
get_license_info 检索有关特定许可证的详细信息 licenseId
get_bill_info 检索特定月份的账单信息 year, month
get_bill_detail 检索特定月份的详细账单信息 year, month
get_coupon_info 检索有关特定优惠券的信息 couponId
get_privatehost_info 检索有关特定私有主机的详细信息 privateHostId
get_public_price 检索 Sakura Cloud 服务的公共定价信息
get_apprun_list 检索所有 AppRun 应用程序的列表
get_apprun_info 检索有关特定 AppRun 应用程序的详细信息 appId
create_apprun 创建一个新的 AppRun 应用程序 name, dockerImage, planId
delete_apprun 删除一个 AppRun 应用程序 appId
start_apprun 启动一个 AppRun 应用程序 appId
stop_apprun 停止一个 AppRun 应用程序 appId
update_apprun 更新一个现有的 AppRun 应用程序 appId
get_apprun_logs 从 AppRun 应用程序获取日志 appId

AppRun 集成

Sakura Cloud AppRun 是一个容器化应用程序平台,允许您运行 Docker 容器而无需管理基础设施。此 MCP 服务器提供完整的 AppRun 管理功能:

  • 查看所有 AppRun 应用程序
  • 使用自定义 Docker 镜像创建新应用程序
  • 更新现有应用程序(更改镜像、配置等)
  • 启动和停止应用程序
  • 查看应用程序日志
  • 删除不再需要的应用程序

创建或更新 AppRun 应用程序时,您可以指定:

  • 应用程序名称和描述
  • 要使用的 Docker 镜像
  • 计划 ID(确定分配的资源)
  • 环境变量作为键值对

可用区支持

所有 API 调用都支持指定可用区参数以定位特定的 Sakura Cloud 数据中心。默认可用区为 tk1v(东京),但您可以指定其他可用区,例如:

  • is1a(石狩)
  • tk1a(东京)
  • 还有更多...

带有可用区参数的 URI 示例:sakura:///servers?zone=is1a

与 Claude 集成

Claude 桌面应用程序提供 MCP 支持。按照以下步骤将此服务器与 Claude 集成:

  1. 确保服务器在本地或可访问的主机上运行。

  2. 在您的操作系统对应的位置创建一个 claude_desktop_config.json 文件:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  3. 将以下配置添加到文件中:

{
  "sacloud-server": {
    "command": "node",
    "args": ["path/to/mcp/dist/server.js"],
    "env": {
      "SACLOUD_API_TOKEN": "your_token_here",
      "SACLOUD_API_SECRET": "your_secret_here"
    }
  }
}
  1. 重新启动 Claude 桌面应用程序以应用配置。

  2. 在与 Claude 的对话中,您现在可以访问 Sakura Cloud 资源和工具。

安全注意事项

  • 此服务器处理敏感的 API 凭据
  • 永远不要将 API 令牌或密钥提交到版本控制
  • 对所有敏感信息使用环境变量
  • 在生产环境中实施适当的访问控制

许可证

ISC

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选