API, SDKs & AI assistants
Back to section

Connect a local MCP client

Run the Python MCP server locally with an API key and understand its tool and credential limits.

Local MCP runs on your computer as bf-api-mcp, installed with the Python SDK. It uses an API key to call BlazingFast. Hosted MCP instead uses OAuth and your AI connection policy; follow the hosted connection guide for that flow.

Configure a local client

Install the Python SDK using the CLI guide. Point your MCP client to the executable's absolute path. Linux/macOS normally use .venv/bin/bf-api-mcp; Windows uses .venv\Scripts\bf-api-mcp.exe. Desktop applications may not inherit your shell's environment or PATH.

For clients using the mcpServers configuration format:

{
  "mcpServers": {
    "blazingfast-local": {
      "command": "/ABSOLUTE/PATH/.venv/bin/bf-api-mcp",
      "args": [],
      "env": {
        "BF_API_BASE_URL": "https://api.blazingfast.io",
        "BF_API_KEY": "YOUR_KEY_PREFIX",
        "BF_API_SECRET": "YOUR_ONE_TIME_SECRET"
      }
    }
  }
}

Use your client's protected secret storage or a private user configuration. Never commit credentials. Other clients may use a different top-level configuration key; consult that client's instructions.

First tools

Ask the agent to use bf_service_list, bf_billing_balance, bf_dns_record_list, bf_vps_status or bf_dedicated_status with the discovered owned resource. The client calls tools; these names are not shell commands.

Local and hosted names differ. Hosted equivalents include list_services, get_balance, list_dns_records, get_vps_status and get_dedicated_status. Discover the actual tools exposed by your client rather than guessing a name.

Permissions and writes

Local viewing tools are enabled by default. BF_API_MCP_ENABLE_MUTATIONS=1 exposes selected write tools, including VPS power, basic DNS zone/record changes, service autopay/cancellation, dedicated deployment/power/reinstall/rescue/password reset. They execute directly under the API key's permissions; they do not wait for hosted AI dashboard approval.

Keep mutations disabled for reporting. Reinstallation erases disks and rescue/reset interrupts connections. Dedicated mutations use explicit confirmations and stable idempotency keys; inspect returned tasks after uncertain outcomes.

bf_service_list accepts status and type filters, for example status suspended and type dedicated. Recorded hostnames are included in safe summaries. bf_vps_console and bf_dedicated_console return browser links; browser login and ownership are still required. Hosted equivalents are get_vps_console and get_dedicated_console.

BF_API_MCP_ENABLE_CREDENTIALS=1 separately exposes VPS and dedicated credential tools, including bf_vps_credentials, with their corresponding credential-read scopes. Leave it disabled for normal AI use: credential output may enter your AI client's conversation/history. Hosted MCP does not expose passwords or private keys at all.

Purchase discovery and execution recovery

Hosted MCP uses https://mcp.blazingfast.io/mcp and your OAuth connection policy. Local MCP uses the installed SDK/CLI 0.1.17 and your API credentials. Discover the tools actually exposed by the client; their names differ:

  • Optional quote: hosted quote_product_variant; local bf_product_variant_quote.
  • Execution receipt: hosted get_operation; local bf_operation_get.
  • Original-key recovery: hosted recover_operation; local bf_operation_recover.

For both recovery tools, the argument is idempotency_key, even though hosted write tools use request_key. This example recovers an existing VPS reboot; substitute the exact original key and owned service UUID:

{
  "idempotency_key": "ORIGINAL_KEY",
  "method": "POST",
  "path": "/v1/vps/SERVICE_UUID/reboot"
}

Recovery is read-only and does not repeat a mutation. Supply method and path together when needed and credential_id only to select the original credential. Reads require current account access and the matching operation-read scope.

Hosted deploy_product is the preferred canonical atomic-purchase workflow. Discover purchase eligibility and configuration first; never invent product/variant IDs, OS codes, SSH-key IDs or regions. A quote is optional, and max_total is the authorized spending ceiling. Hosted writes use request_key as the server Idempotency-Key and honor Read only, Write with approval or Full access. get_operation_request tracks dashboard approval; get_operation tracks execution. Approval is not completion.

Local bf_product_variant_deploy is available only when selected mutations are enabled with BF_API_MCP_ENABLE_MUTATIONS set to 1. It executes under API-key scopes without hosted dashboard approval. Both interfaces retain separate credential controls; execution receipts never expose passwords or private keys. DNSSEC has local tools and its own state contract, with no hosted DNSSEC tool.

See purchase policies, receipt statuses and recovery limitations.

Coverage limits

Local MCP is a curated subset, not a generic API proxy. It has no hosted-style invoice-payment or general-order tools, no Website Protection/TCP Proxy tools, no full DNS import-preview workflow, and only storage listing. Use the API/SDK/CLI or hosted MCP where the coverage matrix documents support.

If a tool is missing, confirm the installed SDK version, refresh tool discovery and review the opt-in environment settings. Do not broaden credentials just to work around an absent tool.