# Backblaze B2 MCP for AI Agents MCP

> Backblaze B2 MCP gives your AI agent direct control over cloud object storage management. You can audit buckets, create and delete partitions, manage file versions (hard/soft deletes), and check for failed large file uploads without leaving your editor.

## Overview
- **Category:** cloud-infrastructure
- **Price:** Free
- **Tags:** s3-compatible, object-storage, file-management, data-archiving, bucket-management, cloud-backup

## Description

Managing cloud infrastructure is complex, especially when you're dealing with version history and cleanup jobs. This MCP connects any AI agent to the full power of Backblaze B2 storage management. Instead of navigating multiple dashboards or running shell scripts, you talk to your agent and it handles the heavy lifting.

Need to audit what buckets exist or check if a multipart upload failed? Your agent can run those checks instantly. You can also create new private partitions, manage access rules by updating bucket permissions, and even delete old file versions that are hoarding space. It’s all done through natural conversation. If you use Vinkius for your MCP catalog, this tool gives you a single point of control for object storage architecture, allowing you to keep your workflow entirely within your preferred development environment.

## Tools

### authorize_account
Extracts the specific regional data ingress endpoint URL for your billing account to ensure proper connection routing.

### create_bucket
Provisions a new, empty logical Storage Bucket partition within your B2 account.

### delete_bucket
Irreversibly deletes an entirely empty Backblaze Storage Bucket; requires confirming no files or versions remain inside.

### delete_file_version
Permanently removes a specific, historical chunk of data from the disk arrays to reclaim storage space.

### get_file_info
Retrieves detailed metadata for a single file, including its checksum and content type.

### hide_file
Marks an active B2 file as hidden using a null-marker. The data remains untouched but is invisible to standard listing commands.

### list_buckets
Retrieves the exact list of all storage buckets currently existing globally on your B2 account.

### list_file_names
Paginates a clean list of primary, surface-level object names within a specific bucket.

### list_unfinished_large_files
Scans the B2 nodes to identify and report on stalled Multipart Upload chunk aggregates that failed to complete.

### update_bucket
Modifies the global Access Control List (ACL) privacy settings for a specific bucket, useful mainly for static asset endpoints.

## Prompt Examples

**Prompt:** 
```
What are the names of all the main asset buckets we have right now?
```

**Response:** 
```
**B2 Storage Audit Report**

| Bucket ID | Privacy Status | Object Count |
| :--- | :--- | :--- |
| `production-assets` | `allPublic` | 1,209,000 |
| `internal-logs` | `allPrivate` | 540,000 |
| `archive-dumps` | `allPrivate` | 3,100 |

We have three active storage buckets. Do you want to check for any unfinished large files in the `archive-dumps` bucket?
```

**Prompt:** 
```
I need to remove old versions of the quarterly reports from the finance bucket.
```

**Response:** 
```
Understood. I've identified 14 specific file versions dating back to Q1 that are no longer needed for compliance. **Action:** `delete_file_version` called.

✅ Success: All 14 specified chunks have been permanently removed from the disk arrays. This action is irreversible and frees up significant space.
```

**Prompt:** 
```
Check the file details and SHA1 for 'user-profile-pic.jpg' in the main bucket.
```

**Response:** 
```
**File Details: user-profile-pic.jpg**

*   **Content Type:** `image/jpeg`
*   **Size:** 345 KB globally
*   **Unique ID:** `4_zX...`
*   **SHA1 Hash:** `2f8bX...` (Confirmed integrity)

The file is fully accessible. Everything looks good to go.
```

## Capabilities

### Audit and Control Bucket Structure
You can list all existing buckets, create new ones, or irreversibly delete empty buckets to properly manage your cloud storage landscape.

### Manage File Lifecycles
Mark files as hidden (soft delete) without losing the data, retrieve detailed file information including checksums, or physically remove specific old versions of files from disk arrays.

### Validate Large Transfers and Object Integrity
Check for stalled multipart uploads to find failed large file chunks, or get full metadata details like SHA1 hashes to confirm object integrity.

## Use Cases

### Cleaning up abandoned logs after project migration
A developer suspects an old log bucket has accumulated junk data. They ask their agent to list all buckets, identify the target, and then run delete_file_version repeatedly until the desired object versions are purged.

### Auditing public vs private access policies
A sysadmin needs to verify if a new asset bucket is secure. They use list_buckets first, check its current permissions with update_bucket, and then confirm the correct privacy settings are applied before deployment.

### Debugging broken upload pipelines
A backend team notices large files aren't appearing in storage. They ask their agent to run list_unfinished_large_files, which identifies the exact source of the stalled chunk uploads that need attention.

## Benefits

- Instantly debug failed uploads. Instead of manually checking logs, you can use the list_unfinished_large_files tool to scan nodes for stalled multipart upload chunks.
- Control data retention with precision. Use delete_file_version when you need to remove specific old file versions that are unnecessary and contributing to storage waste.
- Maintain secure assets without extra clicks. You can hide files using the hide_file tool, ensuring they remain available for lifecycle sweeps but are invisible during normal listings.
- Perform full infrastructure audits quickly. Running list_buckets gives you a complete, up-to-date view of every bucket in your account at a glance.
- Verify data integrity with confidence. The get_file_info tool provides granular details and SHA1 hashes, confirming that the object you think you have is actually intact.

## How It Works

The bottom line is that you get immediate, programmatic access to critical cloud infrastructure functions without switching contexts.

1. Subscribe to this MCP and provide your Backblaze B2 Application Key ID and key credentials.
2. Your AI client uses these keys to connect directly to the specified regional data ingress endpoints assigned to your billing account.
3. You simply ask your agent to perform a storage operation, like 'Show me all public buckets' or 'Delete file version X,' and it executes the command.

## Frequently Asked Questions

**How do I check if my Backblaze B2 account has any broken or stalled large uploads?**
You use the MCP's capability to scan for unfinished multipart uploads. This tells you exactly which file transfers failed midway, allowing you to restart them without manual investigation.

**Can I safely delete an old bucket using the Backblaze B2 MCP?**
Yes, but you must ensure the bucket is completely empty first. The tool can list all contents and help confirm that no files or versions are left before running the final deletion command.

**What's the difference between soft deleting and hard deleting a file?**
Soft deleting (hiding) keeps the data intact but makes it invisible to most users. Hard deleting removes the actual physical data chunks, freeing up storage space immediately.

**Does using the Backblaze B2 MCP mean I need to change my workflow?**
Not really. You just talk to your agent like you normally do; it handles the complex cloud interactions behind the scenes. Your workflow remains focused on development, not infrastructure maintenance.

**How can Backblaze B2 MCP help me audit my current object storage rules?**
The MCP lets your agent list and verify all existing buckets and their associated access policies. This helps you confirm that data is stored with the correct privacy settings.