MCP Server
Give your AI coding tool StackBlaze tools: deploy apps, read logs and metrics, and fix problems without leaving the editor.
StackBlaze runs a hosted Model Context Protocol server at https://mcp.stackblaze.cloud/mcp. Any MCP client that speaks streamable HTTP can connect to it: Claude Code, Cursor, Codex, VS Code (Copilot), Windsurf, OpenCode and others. The tools act as you: every request carries your API token, so the agent sees exactly the projects and apps your account can see, with your role's permissions.
Set it up with the CLI
The quickest way is the StackBlaze CLI. After stackblaze login, one command adds a stackblaze server to your editor's MCP config and keeps every other server and setting:
stackblaze login
stackblaze setup mcp --ide claude # or cursor, codex, vscode, windsurf
stackblaze setup agent -y # every AI tool on this machineRestart the editor afterwards. --print prints the snippet instead of writing the file (with the token as a placeholder), for example to commit a workspace .vscode/mcp.json without a secret in it. See setup in the CLI reference for the file each editor uses.
Connect by hand
- 1
Create an API token
In the dashboard, open Settings → API tokens and create a token, or runstackblaze tokens create claude-mcp. Tokens start withsb_pat_and are shown once. Olderkbr_pat_tokens keep working. - 2
Add the server to your client
Point the client athttps://mcp.stackblaze.cloud/mcpand send the token asAuthorization: Bearer sb_pat_…. Examples below. - 3
Check the connection
Ask the agent something like "list my StackBlaze projects". In Claude Code,claude mcp listshould showstackblaze: … ✓ Connected.
Claude Code
claude mcp add --transport http --scope user \
--header "Authorization: Bearer sb_pat_…" \
stackblaze https://mcp.stackblaze.cloud/mcpCursor, Windsurf and other JSON configs
Cursor reads ~/.cursor/mcp.json (or .cursor/mcp.json in a project). Most clients use the same shape:
{
"mcpServers": {
"stackblaze": {
"url": "https://mcp.stackblaze.cloud/mcp",
"headers": { "Authorization": "Bearer sb_pat_…" }
}
}
}VS Code (Copilot)
{
"servers": {
"stackblaze": {
"type": "http",
"url": "https://mcp.stackblaze.cloud/mcp",
"headers": { "Authorization": "Bearer ${input:stackblaze-token}" }
}
},
"inputs": [
{ "id": "stackblaze-token", "type": "promptString", "description": "StackBlaze API token", "password": true }
]
}Warning
What the tools can do
By default the server offers a focused set of tools for deploying and troubleshooting, so it doesn't crowd your agent's context. Two more tools, find_tools and run_tool, let the agent find and use the rest when a task needs them.
| Area | Examples |
|---|---|
| Browse | list_pipelines, get_app, list_addons, list_builds |
| Deploy | inspect_repo, create_pipeline, deploy_app, deploy_template, update_app, redeploy, wait_for_app |
| Troubleshoot | check_app_health, get_logs, search_logs, get_metrics, get_app_events, diagnose_app_performance |
| Operate | restart_app, scale_app, repair_addon_connection, delete_app |
| Data | inspect_database (read only), snapshot_app, restore_snapshot, clone_app, migrate_app |
| Account | get_billing, get_audit, support tickets |
Tool names have no prefix: ask for get_app, not stackblaze_get_app. Deleting an app or a project is permanent and removes its data: delete_app and delete_pipeline only run with confirm: true and tell the agent to ask you first, so read what your agent proposes before you approve.
Good to know
| Topic | Details |
|---|---|
| Live logs | The tools read log history. For a live tail, use stackblaze logs -f or the dashboard. |
| Private repositories | inspect_repo reads public HTTPS repositories. Deploy private code through the GitHub App connection in the dashboard. |
| Errors | A request without a valid token gets HTTP 401. Plan limits come back with the server's message, for example when a plan allows one replica per service. |