Cloudflare 到 GitHub 备份 MCP 服务器
这是一个 MCP(模型上下文协议)服务器,可将 Cloudflare 项目备份到 GitHub 存储库。
先决条件
已安装 Node.js 和 npm。
具有对您的项目具有读取权限的 Cloudflare 帐户和 API 令牌。
具有“repo”范围的 GitHub 帐户和个人访问令牌。
您想要存储备份的 GitHub 存储库。
安装
通过 Smithery 安装
要通过Smithery自动将 Cloudflare 安装到 Claude Desktop 的 GitHub Backup:
手动安装
克隆此存储库:
git clone <repository_url> cd cloudflare-github-backup安装依赖项:
npm install构建项目
npm run build
配置
获取您的 Cloudflare API 令牌:
转到您的 Cloudflare 仪表板。
导航到“我的个人资料”->“API 令牌”。
点击“创建令牌”。
确保令牌具有读取您的项目所需的权限。
复制令牌。
获取您的 GitHub 个人访问令牌:
转到您的 GitHub 设置。
导航到“开发者设置”->“个人访问令牌”。
点击“生成新令牌”。
选择“repo”范围。
复制令牌。
编辑
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_token、your_github_access_token和your_github_repo_name替换为您的实际令牌和存储库名称。
用法
通过重新启动 VS Code 扩展来启动 MCP 服务器。
使用
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 实现实际的备份逻辑。
This server cannot be installed
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.
MCP 服务器可自动将 Cloudflare 项目备份到 GitHub 存储库,从而提供一种系统的方式来保存 Cloudflare 配置和资产。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityMCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.Last updated -22,57371,192MIT License
- AsecurityFlicenseAqualityMCP Server for the GitHub API, providing features for file operations, repository management, and advanced search, with automatic branch creation and comprehensive error handling.Last updated -1804
- MIT License
- -securityFlicense-qualityAn MCP server that enables Git repository operations and GitHub PR workflows, allowing users to manage repositories, create branches, commit changes, and create pull requests through natural language.Last updated -1