AI agent & MCP

AI agent and MCP

Chat with the StackBlaze agent from your terminal and set up coding tools.

stackblaze agent

Without a prompt, starts an interactive chat with the StackBlaze agent. With a prompt (positional or --prompt), sends one message, prints the answer and exits. Sessions are saved in the CLI's config directory (see login).

usage
stackblaze agent [prompt...] [options]

In the interactive chat, slash commands change the scope without restarting: /project <name> (also /pipeline), /environment <name> (also /env and /phase), /app <name> and /addon <name>. Run one without a name to clear it. /context shows the current scope, /clear resets the conversation, /help lists the commands and /exit or /quit ends the session.

When the agent wants to take a destructive action, it asks you first. Without a terminal those requests are declined unless you pass -y. A one-shot run whose turn fails exits 3.

FlagDescription
--prompt <text>One-shot prompt (or pass it positionally)
-p, --project, -e, --env, -a, --appScope the conversation to a project, environment or app
--jsonOne-shot only: print the response and tool calls as JSON
--plainPlain text, without the streaming terminal UI
-y, --yesApprove the agent's destructive actions automatically
--listList saved sessions on this machine
--thread-id, --session-id <id>Resume a saved session

Examples

terminal
stackblaze agent
stackblaze agent "why did my last deploy fail?" -a api
stackblaze agent --json --prompt "list my apps" | jq -r .response
stackblaze agent --list

stackblaze setup

Sets up AI coding tools to work with StackBlaze. agent installs the skills and configures MCP for each detected tool. mcp merges a stackblaze MCP server into one editor's config: Cursor (the default), Claude Code, Codex, VS Code (Copilot), Windsurf or OpenCode; other servers and settings are kept. It is also available as stackblaze mcp. skills writes the StackBlaze skill files for Cursor and Claude Code; it is also available as stackblaze skills.

usage
stackblaze setup agent [--agent <name>] [-y]
stackblaze setup mcp [--ide cursor|claude|codex|vscode|windsurf|opencode|copilot] [--print]
stackblaze setup skills [--agent cursor|claude|all]

Files written by mcp: Cursor ~/.cursor/mcp.json, Claude Code ~/.claude.json, Codex ~/.codex/config.toml ([mcp_servers.stackblaze]), VS Code the user mcp.json (alias copilot), Windsurf ~/.codeium/windsurf/mcp_config.json, OpenCode ~/.config/opencode/opencode.json.

--print prints the config snippet instead of writing the file, with the token as a placeholder, for example to paste into a workspace .vscode/mcp.json.

The MCP entry points at the hosted server, https://mcp.stackblaze.cloud/mcp, and stores your API token in the editor's config file (created with mode 600). Restart the editor after setup.

FlagDescription
--agent <name>agent: cursor, claude, codex, vscode, windsurf, opencode, copilot or all; skills: cursor, claude or all (default all)
--ide <name>mcp: cursor (default), claude, codex, vscode, windsurf, opencode or copilot
--printmcp: print the config snippet instead of writing the file (token shown as a placeholder)
-y, --yesagent: non-interactive (the default for this command)
--mcp-path <path>agent, mcp: use a local MCP server build over stdio instead of the hosted server
--forceagent, mcp: use the hosted server even if a local one is found
--token <token>, --api-url <url>Credentials to use (default: your saved login)

Examples

terminal
stackblaze setup agent -y
stackblaze setup mcp --ide claude
stackblaze setup mcp --ide codex
stackblaze setup mcp --ide vscode --print > .vscode/mcp.json