Cloudflare to GitHub Backup MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Retrieves projects from Cloudflare for backup purposes using the Cloudflare API

  • Backs up Cloudflare projects to GitHub repositories, allowing automatic storage and versioning of project data

Cloudflare 到 GitHub 备份 MCP 服务器

这是一个 MCP(模型上下文协议)服务器,可将 Cloudflare 项目备份到 GitHub 存储库。

先决条件

  • 已安装 Node.js 和 npm。
  • 具有对您的项目具有读取权限的 Cloudflare 帐户和 API 令牌。
  • 具有“repo”范围的 GitHub 帐户和个人访问令牌。
  • 您想要存储备份的 GitHub 存储库。

安装

通过 Smithery 安装

要通过Smithery自动将 Cloudflare 安装到 Claude Desktop 的 GitHub Backup:

npx -y @smithery/cli install @DynamicEndpoints/cloudflare-github-backup-mcp --client claude

手动安装

  1. 克隆此存储库:
    git clone <repository_url> cd cloudflare-github-backup
  2. 安装依赖项:
    npm install
  3. 构建项目
    npm run build

配置

  1. 获取您的 Cloudflare API 令牌:
    • 转到您的 Cloudflare 仪表板。
    • 导航到“我的个人资料”->“API 令牌”。
    • 点击“创建令牌”。
    • 确保令牌具有读取您的项目所需的权限。
    • 复制令牌。
  2. 获取您的 GitHub 个人访问令牌:
    • 转到您的 GitHub 设置。
    • 导航到“开发者设置”->“个人访问令牌”。
    • 点击“生成新令牌”。
    • 选择“repo”范围。
    • 复制令牌。
  3. 编辑cline_mcp_settings.json文件:
    { "mcpServers": { "cloudflare-backup": { "command": "node", "args": ["/path/to/cloudflare-github-backup/build/index.js"], "env": { "CLOUDFLARE_API_TOKEN": "your_cloudflare_api_token", "GITHUB_ACCESS_TOKEN": "your_github_access_token", "GITHUB_REPO_NAME": "your_github_repo_name" } } } }
    • /path/to/cloudflare-github-backup替换为cloudflare-github-backup目录的实际路径。
    • your_cloudflare_api_tokenyour_github_access_tokenyour_github_repo_name替换为您的实际令牌和存储库名称。

用法

  1. 通过重新启动 VS Code 扩展来启动 MCP 服务器。
  2. 使用use_mcp_tool工具调用backup_projects工具:
    <use_mcp_tool> <server_name>cloudflare-backup</server_name> <tool_name>backup_projects</tool_name> <arguments> {} </arguments> </use_mcp_tool>
    这将触发备份过程。服务器将向控制台记录指示进度的消息。

笔记

目前,备份逻辑只是一个占位符。它会将消息记录到控制台,但不会执行实际的备份。下一步是使用 Cloudflare 和 GitHub API 实现实际的备份逻辑。

-
security - not tested
F
license - not found
-
quality - not tested

MCP 服务器可自动将 Cloudflare 项目备份到 GitHub 存储库,从而提供一种系统的方式来保存 Cloudflare 配置和资产。

  1. Prerequisites
    1. Installation
      1. Installing via Smithery
      2. Manual Installation
    2. Configuration
      1. Usage
        1. Note
          ID: ekd11tfdbs