github-project-archiver-cloudflare
Orchestrates the automated transfer of Cloudflare project configurations into a designated GitHub repository for reliable archival and version control.
Author

DynamicEndpoints
Quick Info
Actions
Tags
Cloudflare Repository Synchronization Utility
This Model Context Protocol (MCP) server is designed to execute routine snapshots of Cloudflare workspace assets, pushing the resultant data structure securely to a specified remote Git repository hosted on GitHub.
Prerequisites for Deployment
To successfully instantiate and operate this utility, the following dependencies must be satisfied:
- Runtime Environment: A functional installation of Node.js along with its package manager (npm).
- Cloudflare Credentials: Valid credentials for the Cloudflare account, specifically an API token endowed with 'read' permissions pertinent to accessing project data.
- GitHub Credentials: A GitHub Personal Access Token (PAT) authorized with the necessary 'repo' scope to permit write operations.
- Target Repository: Identification of the existing GitHub repository intended to serve as the persistent storage destination for all archived data.
Installation Procedures
Deployment via Smithery CLI
For seamless integration into Claude Desktop environments via the Smithery framework, utilize the following command:
bash npx -y @smithery/cli install @DynamicEndpoints/cloudflare-github-backup-mcp --client claude
Manual Setup Guide
-
Clone Source Code: Retrieve a local copy of the repository: bash git clone
cd cloudflare-github-backup -
Dependency Resolution: Install all required software packages: bash npm install
-
Compilation: Build the executable artifact: bash npm run build
Configuration Workflow
Configuration necessitates securing and referencing external secrets and paths within the cline_mcp_settings.json configuration file.
-
Acquire Cloudflare API Credential:
- Navigate to the Cloudflare portal and access 'My Profile' settings.
- Locate the 'API Tokens' section and initiate a new token creation.
- Grant permissions specifically for reading project details.
- Securely record the generated token.
-
Acquire GitHub Access Credential:
- Access your GitHub account settings.
- Proceed to 'Developer settings' followed by 'Personal access tokens'.
- Generate a fresh token, ensuring the 'repo' permission set is enabled.
- Securely record the generated token.
-
Configure Settings File: Modify the structure of
cline_mcp_settings.jsonas demonstrated below:{ "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 Substitution: Substitute
/path/to/cloudflare-github-backupwith the absolute file system location of the project directory. - Token Insertion: Replace placeholders with the actual Cloudflare token, GitHub PAT, and the desired repository identifier.
- Path Substitution: Substitute
Operational Execution
- Initiate the MCP service by reloading the associated VS Code extension environment.
- Invoke the archival utility via the
use_mcp_tooldirective, referencing thebackup_projectsfunction:
xml
Executing this triggers the scheduled archival routine. Console output will provide real-time feedback on the backup process status.
Current Status Note
Be advised that the current implementation serves as a structural scaffold; it emits console logs to confirm invocation but lacks the functional implementation for interacting with the Cloudflare and GitHub APIs for actual data transfer. Subsequent development phases will focus on populating the API interaction logic.
