Install
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
Windows / Linux path
%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"io-github-backblaze-labs-b2-mcp": {
"command": "npx",
"args": [
"-y",
"@backblaze-labs/b2-mcp"
],
"env": {
"B2_APPLICATION_KEY_ID": "<YOUR_VALUE>",
"B2_APPLICATION_KEY": "<YOUR_VALUE>",
"B2_REGION": "us-west-004",
"B2_MASTER_KEY_ID": "<YOUR_VALUE>",
"B2_MASTER_KEY": "<YOUR_VALUE>",
"PORT": "3000",
"B2_APP_KEY": "<VALUE>",
"B2_LOG_FILE": "stderr",
"B2_HTTP_HOST": "<VALUE>",
"B2_APP_KEY_ID": "<VALUE>",
"B2_SECRET_SINK": "file",
"B2_MAX_SESSIONS": "1000",
"B2_ALLOWED_HOSTS": "<VALUE>",
"B2_MCP_TRANSPORT": "stdio",
"B2_MCP_UA_SUFFIX": "<VALUE>",
"B2_ALLOWED_ORIGINS": "<VALUE>",
"B2_SECRET_SINK_FILE": "~/.b2-mcp/secrets.jsonl",
"B2_MCP_OUTPUT_FORMAT": "json",
"B2_DESTRUCTIVE_POLICY": "confirm",
"B2_MCP_RATE_LIMIT_RPS": "60",
"B2_ALLOW_UNSCOPED_KEYS": "false",
"B2_TRUST_PROXY_HEADERS": "false",
"B2_ALLOW_INLINE_SECRETS": "false",
"B2_HTTP_CREDENTIAL_MODE": "headers",
"B2_MAX_SESSIONS_PER_KEY": "20",
"B2_MCP_RATE_LIMIT_BURST": "120",
"B2_ALLOW_KEY_MGMT_GRANTS": "false",
"B2_CAPABILITY_CACHE_TTL_MS": "300000",
"B2_DESTRUCTIVE_ELICITATION": "on",
"B2_HTTP_HEADERS_TIMEOUT_MS": "10000",
"B2_HTTP_REQUEST_TIMEOUT_MS": "30000",
"B2_MAX_KEY_DURATION_SECONDS": "<VALUE>",
"B2_PRINCIPAL_CREDENTIAL_MAP": "<VALUE>",
"B2_STDIO_CAPABILITY_TIMEOUT_MS": "10000",
"B2_CAPABILITY_CACHE_MAX_ENTRIES": "10000",
"B2_S3_SAVE_TO_PATH_IDLE_TIMEOUT_MS": "60000"
}
}
}
}
Restart Claude Desktop to activate the new server.
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
Windows / Linux path
.cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global).cursor/mcp.json (project) or ~/.cursor/mcp.json (global){
"mcpServers": {
"io-github-backblaze-labs-b2-mcp": {
"command": "npx",
"args": [
"-y",
"@backblaze-labs/b2-mcp"
],
"env": {
"B2_APPLICATION_KEY_ID": "<YOUR_VALUE>",
"B2_APPLICATION_KEY": "<YOUR_VALUE>",
"B2_REGION": "us-west-004",
"B2_MASTER_KEY_ID": "<YOUR_VALUE>",
"B2_MASTER_KEY": "<YOUR_VALUE>",
"PORT": "3000",
"B2_APP_KEY": "<VALUE>",
"B2_LOG_FILE": "stderr",
"B2_HTTP_HOST": "<VALUE>",
"B2_APP_KEY_ID": "<VALUE>",
"B2_SECRET_SINK": "file",
"B2_MAX_SESSIONS": "1000",
"B2_ALLOWED_HOSTS": "<VALUE>",
"B2_MCP_TRANSPORT": "stdio",
"B2_MCP_UA_SUFFIX": "<VALUE>",
"B2_ALLOWED_ORIGINS": "<VALUE>",
"B2_SECRET_SINK_FILE": "~/.b2-mcp/secrets.jsonl",
"B2_MCP_OUTPUT_FORMAT": "json",
"B2_DESTRUCTIVE_POLICY": "confirm",
"B2_MCP_RATE_LIMIT_RPS": "60",
"B2_ALLOW_UNSCOPED_KEYS": "false",
"B2_TRUST_PROXY_HEADERS": "false",
"B2_ALLOW_INLINE_SECRETS": "false",
"B2_HTTP_CREDENTIAL_MODE": "headers",
"B2_MAX_SESSIONS_PER_KEY": "20",
"B2_MCP_RATE_LIMIT_BURST": "120",
"B2_ALLOW_KEY_MGMT_GRANTS": "false",
"B2_CAPABILITY_CACHE_TTL_MS": "300000",
"B2_DESTRUCTIVE_ELICITATION": "on",
"B2_HTTP_HEADERS_TIMEOUT_MS": "10000",
"B2_HTTP_REQUEST_TIMEOUT_MS": "30000",
"B2_MAX_KEY_DURATION_SECONDS": "<VALUE>",
"B2_PRINCIPAL_CREDENTIAL_MAP": "<VALUE>",
"B2_STDIO_CAPABILITY_TIMEOUT_MS": "10000",
"B2_CAPABILITY_CACHE_MAX_ENTRIES": "10000",
"B2_S3_SAVE_TO_PATH_IDLE_TIMEOUT_MS": "60000"
}
}
}
}
Cursor usually picks up config changes automatically; if the server does not appear, reload the window.
Add to .mcp.json (project) or ~/.claude.json (global)
Windows / Linux path
.mcp.json (project) or %USERPROFILE%\.claude.json (global).mcp.json (project) or ~/.claude.json (global){
"mcpServers": {
"io-github-backblaze-labs-b2-mcp": {
"command": "npx",
"args": [
"-y",
"@backblaze-labs/b2-mcp"
],
"env": {
"B2_APPLICATION_KEY_ID": "<YOUR_VALUE>",
"B2_APPLICATION_KEY": "<YOUR_VALUE>",
"B2_REGION": "us-west-004",
"B2_MASTER_KEY_ID": "<YOUR_VALUE>",
"B2_MASTER_KEY": "<YOUR_VALUE>",
"PORT": "3000",
"B2_APP_KEY": "<VALUE>",
"B2_LOG_FILE": "stderr",
"B2_HTTP_HOST": "<VALUE>",
"B2_APP_KEY_ID": "<VALUE>",
"B2_SECRET_SINK": "file",
"B2_MAX_SESSIONS": "1000",
"B2_ALLOWED_HOSTS": "<VALUE>",
"B2_MCP_TRANSPORT": "stdio",
"B2_MCP_UA_SUFFIX": "<VALUE>",
"B2_ALLOWED_ORIGINS": "<VALUE>",
"B2_SECRET_SINK_FILE": "~/.b2-mcp/secrets.jsonl",
"B2_MCP_OUTPUT_FORMAT": "json",
"B2_DESTRUCTIVE_POLICY": "confirm",
"B2_MCP_RATE_LIMIT_RPS": "60",
"B2_ALLOW_UNSCOPED_KEYS": "false",
"B2_TRUST_PROXY_HEADERS": "false",
"B2_ALLOW_INLINE_SECRETS": "false",
"B2_HTTP_CREDENTIAL_MODE": "headers",
"B2_MAX_SESSIONS_PER_KEY": "20",
"B2_MCP_RATE_LIMIT_BURST": "120",
"B2_ALLOW_KEY_MGMT_GRANTS": "false",
"B2_CAPABILITY_CACHE_TTL_MS": "300000",
"B2_DESTRUCTIVE_ELICITATION": "on",
"B2_HTTP_HEADERS_TIMEOUT_MS": "10000",
"B2_HTTP_REQUEST_TIMEOUT_MS": "30000",
"B2_MAX_KEY_DURATION_SECONDS": "<VALUE>",
"B2_PRINCIPAL_CREDENTIAL_MAP": "<VALUE>",
"B2_STDIO_CAPABILITY_TIMEOUT_MS": "10000",
"B2_CAPABILITY_CACHE_MAX_ENTRIES": "10000",
"B2_S3_SAVE_TO_PATH_IDLE_TIMEOUT_MS": "60000"
}
}
}
}
The server will be available in the next Claude Code session.
Add to .vscode/mcp.json
Windows / Linux path
.vscode\mcp.json.vscode/mcp.json{
"servers": {
"io-github-backblaze-labs-b2-mcp": {
"command": "npx",
"args": [
"-y",
"@backblaze-labs/b2-mcp"
],
"env": {
"B2_APPLICATION_KEY_ID": "<YOUR_VALUE>",
"B2_APPLICATION_KEY": "<YOUR_VALUE>",
"B2_REGION": "us-west-004",
"B2_MASTER_KEY_ID": "<YOUR_VALUE>",
"B2_MASTER_KEY": "<YOUR_VALUE>",
"PORT": "3000",
"B2_APP_KEY": "<VALUE>",
"B2_LOG_FILE": "stderr",
"B2_HTTP_HOST": "<VALUE>",
"B2_APP_KEY_ID": "<VALUE>",
"B2_SECRET_SINK": "file",
"B2_MAX_SESSIONS": "1000",
"B2_ALLOWED_HOSTS": "<VALUE>",
"B2_MCP_TRANSPORT": "stdio",
"B2_MCP_UA_SUFFIX": "<VALUE>",
"B2_ALLOWED_ORIGINS": "<VALUE>",
"B2_SECRET_SINK_FILE": "~/.b2-mcp/secrets.jsonl",
"B2_MCP_OUTPUT_FORMAT": "json",
"B2_DESTRUCTIVE_POLICY": "confirm",
"B2_MCP_RATE_LIMIT_RPS": "60",
"B2_ALLOW_UNSCOPED_KEYS": "false",
"B2_TRUST_PROXY_HEADERS": "false",
"B2_ALLOW_INLINE_SECRETS": "false",
"B2_HTTP_CREDENTIAL_MODE": "headers",
"B2_MAX_SESSIONS_PER_KEY": "20",
"B2_MCP_RATE_LIMIT_BURST": "120",
"B2_ALLOW_KEY_MGMT_GRANTS": "false",
"B2_CAPABILITY_CACHE_TTL_MS": "300000",
"B2_DESTRUCTIVE_ELICITATION": "on",
"B2_HTTP_HEADERS_TIMEOUT_MS": "10000",
"B2_HTTP_REQUEST_TIMEOUT_MS": "30000",
"B2_MAX_KEY_DURATION_SECONDS": "<VALUE>",
"B2_PRINCIPAL_CREDENTIAL_MAP": "<VALUE>",
"B2_STDIO_CAPABILITY_TIMEOUT_MS": "10000",
"B2_CAPABILITY_CACHE_MAX_ENTRIES": "10000",
"B2_S3_SAVE_TO_PATH_IDLE_TIMEOUT_MS": "60000"
}
}
}
}
Reload the VS Code window to activate.
Add to ~/.codeium/windsurf/mcp_config.json
Windows / Linux path
%USERPROFILE%\.codeium\windsurf\mcp_config.json~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"io-github-backblaze-labs-b2-mcp": {
"command": "npx",
"args": [
"-y",
"@backblaze-labs/b2-mcp"
],
"env": {
"B2_APPLICATION_KEY_ID": "<YOUR_VALUE>",
"B2_APPLICATION_KEY": "<YOUR_VALUE>",
"B2_REGION": "us-west-004",
"B2_MASTER_KEY_ID": "<YOUR_VALUE>",
"B2_MASTER_KEY": "<YOUR_VALUE>",
"PORT": "3000",
"B2_APP_KEY": "<VALUE>",
"B2_LOG_FILE": "stderr",
"B2_HTTP_HOST": "<VALUE>",
"B2_APP_KEY_ID": "<VALUE>",
"B2_SECRET_SINK": "file",
"B2_MAX_SESSIONS": "1000",
"B2_ALLOWED_HOSTS": "<VALUE>",
"B2_MCP_TRANSPORT": "stdio",
"B2_MCP_UA_SUFFIX": "<VALUE>",
"B2_ALLOWED_ORIGINS": "<VALUE>",
"B2_SECRET_SINK_FILE": "~/.b2-mcp/secrets.jsonl",
"B2_MCP_OUTPUT_FORMAT": "json",
"B2_DESTRUCTIVE_POLICY": "confirm",
"B2_MCP_RATE_LIMIT_RPS": "60",
"B2_ALLOW_UNSCOPED_KEYS": "false",
"B2_TRUST_PROXY_HEADERS": "false",
"B2_ALLOW_INLINE_SECRETS": "false",
"B2_HTTP_CREDENTIAL_MODE": "headers",
"B2_MAX_SESSIONS_PER_KEY": "20",
"B2_MCP_RATE_LIMIT_BURST": "120",
"B2_ALLOW_KEY_MGMT_GRANTS": "false",
"B2_CAPABILITY_CACHE_TTL_MS": "300000",
"B2_DESTRUCTIVE_ELICITATION": "on",
"B2_HTTP_HEADERS_TIMEOUT_MS": "10000",
"B2_HTTP_REQUEST_TIMEOUT_MS": "30000",
"B2_MAX_KEY_DURATION_SECONDS": "<VALUE>",
"B2_PRINCIPAL_CREDENTIAL_MAP": "<VALUE>",
"B2_STDIO_CAPABILITY_TIMEOUT_MS": "10000",
"B2_CAPABILITY_CACHE_MAX_ENTRIES": "10000",
"B2_S3_SAVE_TO_PATH_IDLE_TIMEOUT_MS": "60000"
}
}
}
}
Restart Windsurf (or refresh its MCP servers panel) to activate the new server.
Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.
Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows / Linux path
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json{
"mcpServers": {
"io-github-backblaze-labs-b2-mcp": {
"command": "npx",
"args": [
"-y",
"@backblaze-labs/b2-mcp"
],
"env": {
"B2_APPLICATION_KEY_ID": "<YOUR_VALUE>",
"B2_APPLICATION_KEY": "<YOUR_VALUE>",
"B2_REGION": "us-west-004",
"B2_MASTER_KEY_ID": "<YOUR_VALUE>",
"B2_MASTER_KEY": "<YOUR_VALUE>",
"PORT": "3000",
"B2_APP_KEY": "<VALUE>",
"B2_LOG_FILE": "stderr",
"B2_HTTP_HOST": "<VALUE>",
"B2_APP_KEY_ID": "<VALUE>",
"B2_SECRET_SINK": "file",
"B2_MAX_SESSIONS": "1000",
"B2_ALLOWED_HOSTS": "<VALUE>",
"B2_MCP_TRANSPORT": "stdio",
"B2_MCP_UA_SUFFIX": "<VALUE>",
"B2_ALLOWED_ORIGINS": "<VALUE>",
"B2_SECRET_SINK_FILE": "~/.b2-mcp/secrets.jsonl",
"B2_MCP_OUTPUT_FORMAT": "json",
"B2_DESTRUCTIVE_POLICY": "confirm",
"B2_MCP_RATE_LIMIT_RPS": "60",
"B2_ALLOW_UNSCOPED_KEYS": "false",
"B2_TRUST_PROXY_HEADERS": "false",
"B2_ALLOW_INLINE_SECRETS": "false",
"B2_HTTP_CREDENTIAL_MODE": "headers",
"B2_MAX_SESSIONS_PER_KEY": "20",
"B2_MCP_RATE_LIMIT_BURST": "120",
"B2_ALLOW_KEY_MGMT_GRANTS": "false",
"B2_CAPABILITY_CACHE_TTL_MS": "300000",
"B2_DESTRUCTIVE_ELICITATION": "on",
"B2_HTTP_HEADERS_TIMEOUT_MS": "10000",
"B2_HTTP_REQUEST_TIMEOUT_MS": "30000",
"B2_MAX_KEY_DURATION_SECONDS": "<VALUE>",
"B2_PRINCIPAL_CREDENTIAL_MAP": "<VALUE>",
"B2_STDIO_CAPABILITY_TIMEOUT_MS": "10000",
"B2_CAPABILITY_CACHE_MAX_ENTRIES": "10000",
"B2_S3_SAVE_TO_PATH_IDLE_TIMEOUT_MS": "60000"
}
}
}
}
Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.
Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.
Configuration
Environment variables this server reads. Secrets stay on your machine.
| Name | Required | Description |
|---|---|---|
| B2_APPLICATION_KEY_ID secret | Yes | Application key ID (non-master) — the workhorse for native B2 and S3-compatible tools |
| B2_APPLICATION_KEY secret | Yes | Application key secret |
| B2_REGION | No | Fallback/default S3-compatible endpoint region; authorized B2 responses override this for S3/report tools Default: us-west-004 |
| B2_MASTER_KEY_ID secret | No | Master credential ID for SDK-backed Partner/Groups tools; required with Partner API entitlement for those operations |
| B2_MASTER_KEY secret | No | Master credential secret for SDK-backed Partner/Groups tools; required with Partner API entitlement for those operations |
| PORT | No | HTTP listen port (default: PORT or 3000) used when no --port argument is provided Default: 3000 |
| B2_APP_KEY | No | Legacy alias for B2_APPLICATION_KEY retained for compatibility |
| B2_LOG_FILE | No | Optional path for redacted structured JSON logs. When set, the file replaces stderr; stdout is never used for logs Default: stderr |
| B2_HTTP_HOST | No | Standalone Node HTTP listen host; set to 127.0.0.1 when binding behind a same-host reverse proxy |
| B2_APP_KEY_ID | No | Legacy alias for B2_APPLICATION_KEY_ID retained for compatibility |
| B2_SECRET_SINK | No | Durable-secret output mode: file, inline, or off. File mode supports b2_create_key and b2_create_group_member; b2_reserve_trial_create_account requires explicit inline mode Default: file |
| B2_MAX_SESSIONS | No | HTTP transport: global concurrent in-flight request cap Default: 1000 |
| B2_ALLOWED_HOSTS | No | HTTP transport Host allowlist (DNS-rebinding protection) — set for any internet-facing HTTP deployment |
| B2_MCP_TRANSPORT | No | CLI default transport when no stdio/http argument or --transport flag is passed; Docker images set this to http Default: stdio |
| B2_MCP_UA_SUFFIX | No | Optional operator token appended after the built-in b2-mcp/<version> product token on the outbound User-Agent |
| B2_ALLOWED_ORIGINS | No | HTTP transport Origin allowlist (DNS-rebinding protection) — set for any internet-facing HTTP deployment |
| B2_SECRET_SINK_FILE | No | Append-only plaintext JSONL credential ledger for file sink mode Default: ~/.b2-mcp/secrets.jsonl |
| B2_MCP_OUTPUT_FORMAT | No | LLM-facing TextContent.text format for structured successes: compact json or opt-in toon Default: json |
| B2_DESTRUCTIVE_POLICY | No | Gate on destructive tools: confirm, elicit, block, or allow Default: confirm |
| B2_MCP_RATE_LIMIT_RPS | No | HTTP transport: per-credential request throttling (requests per second) Default: 60 |
| B2_ALLOW_UNSCOPED_KEYS | No | Explicitly allow b2_create_key to mint unscoped keys with write/delete capabilities Default: false |
| B2_TRUST_PROXY_HEADERS | No | HTTP transport: trust X-Forwarded-For / X-Real-IP for unauthenticated admission keys only behind a trusted proxy Default: false |
| B2_ALLOW_INLINE_SECRETS | No | Dedicated HTTP/serverless opt-in required before B2_SECRET_SINK=inline can return durable secrets in MCP responses Default: false |
| B2_HTTP_CREDENTIAL_MODE | No | headers, server, or principal; unset preserves existing header-based clients Default: headers |
| B2_MAX_SESSIONS_PER_KEY | No | HTTP transport: per-credential concurrent in-flight request cap Default: 20 |
| B2_MCP_RATE_LIMIT_BURST | No | HTTP transport: per-credential request throttling burst size Default: 120 |
| B2_ALLOW_KEY_MGMT_GRANTS | No | Explicitly allow b2_create_key to mint keys with listKeys, writeKeys, or deleteKeys Default: false |
| B2_CAPABILITY_CACHE_TTL_MS | No | Bounded capability-discovery cache TTL Default: 300000 |
| B2_DESTRUCTIVE_ELICITATION | No | Set to off, false, or 0 to disable MCP form elicitation Default: on |
| B2_HTTP_HEADERS_TIMEOUT_MS | No | Standalone Node HTTP transport headers timeout Default: 10000 |
| B2_HTTP_REQUEST_TIMEOUT_MS | No | Standalone Node HTTP transport request timeout Default: 30000 |
| B2_MAX_KEY_DURATION_SECONDS | No | Optional maximum for b2_create_key; when set, non-expiring keys and longer durations are refused before any B2 create call |
| B2_PRINCIPAL_CREDENTIAL_MAP | No | JSON map from verified MCP principal to a customer-managed credential reference |
| B2_STDIO_CAPABILITY_TIMEOUT_MS | No | Stdio bootstrap capability-discovery deadline; local expiry starts with a fail-closed tool surface Default: 10000 |
| B2_CAPABILITY_CACHE_MAX_ENTRIES | No | Bounded capability-discovery cache maximum entries Default: 10000 |
| B2_S3_SAVE_TO_PATH_IDLE_TIMEOUT_MS | No | Idle timeout while streaming s3_get_object results to saveToPath Default: 60000 |