Skip to main content
Blitz
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

MCP servers

The Model Context Protocol lets the agent use tools other programs offer: your issue tracker, a database, a design tool, a company knowledge base. Add a server once, and its tools appear beside Blitz’s own, with the same approvals.

Spec: MCP.

For PostgreSQL, AlloyDB, SQLite and BigQuery there’s no server to add: Blitz has one built in, set up in Studio › Resources › Connectors. See Databases and Connectors.

Add a server

The quickest way: ask. In a session, /configure the MCP server at https://github.com/github/github-mcp-server (or blitz configure … in a shell) has Blitz read the page, find the server’s command or address and what it needs, and add it to this workspace. You see every setting before it’s saved, with the page it came from; a token or key it needs you type yourself, hidden, and it’s kept as a Blitz secret the settings name as {secrets:NAME}. Then it checks the server answers and lists its tools. Asking in plain words works too: “add the Linear MCP server, its docs are at linear.app/docs/mcp”.

Blitz speaks the two current transports: stdio (a command it starts) and streamable HTTP (a URL). The older SSE transport isn’t supported.

# a command (stdio), with an environment variable
blitz mcp add github npx -y @modelcontextprotocol/server-github --env GITHUB_TOKEN=ghp_…

# a URL (streamable HTTP), with a header
blitz mcp add docs https://mcp.example.com/mcp --header "X-Team:core"

# then, for a server that signs in with OAuth
blitz mcp login docs

--prefix gh names its tools gh__create_issue; --agents "*" offers them to every agent (the default is the main agent only). The running service picks up a new server when it restarts: blitz service restart, or Settings › System › Service in the desktop app.

Command Does
blitz mcp list The servers, which are disabled or signed in
blitz mcp get <name> One server’s settings, its environment and header values masked
blitz mcp disable <name>, enable <name> Keep it configured without starting it, or start it again
blitz mcp remove <name> Remove it
blitz mcp login <name>, logout <name> Sign in to an HTTP server in the browser (OAuth), or forget the sign-in
blitz doctor --online Connects to each server and counts its tools
blitz mcp … --workspace (-w) Any of the above for this workspace’s own servers (--dir, else the current directory): list -w shows every server it runs with its scope, disable -w on a global one turns it off here alone
blitz mcp make-global <name> Moves one of this workspace’s servers to the global settings, for every workspace

In a session, /mcp lists the servers, which are disabled, and whether their tools ask first, /tools shows which tools each agent gets, and /status names them. The desktop app has the same /mcp, /tools and /status. In the app, add your global servers in Settings › Resources › Connectors › MCP servers, and a workspace’s own in Studio › Resources › Connectors (one workspace’s servers). The app’s form has every setting below but disabled (that’s the switch); it never shows the environment and header values you’ve saved (a {secrets:…} name aside): leave one empty to keep it.

In the settings file

blitz mcp add writes to ~/.blitz/.env.toml; you can write it yourself, with a few settings the command doesn’t set:

[[mcp.servers]]
name = "github"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
env = { GITHUB_TOKEN = "ghp_…" }
# url = "https://example.com/mcp"   # streamable HTTP instead of a command
# headers = { X-Team = "core" }     # sent to an HTTP server
# tools = ["create_issue"]          # only these of its tools (their own names)
# prefix = "gh"                     # expose them as gh__create_issue
# agents = ["blitz", "qa"]          # who gets them; "*" for every agent
# auto_approve = false              # true: its tools don't ask first
# sandbox = true                    # stdio servers run in the OS sandbox
# timeout_seconds = 300             # the longest one tool call may take
# disabled = true                   # configured, never started

Each server needs a unique name and exactly one of command or url; otherwise the workspace won’t open, saying why.

Keep the file private. env and headers values are stored as written, in plain text (Blitz masks them in its logs and in blitz config show). Only OAuth sign-ins (blitz mcp login) go to the system keychain. Prefer a server that reads its token from its own config, or OAuth, when you can.

One workspace’s servers

A server only one project needs (its staging database, its design files) belongs to that workspace, not to every one. In the desktop app, open Studio › Resources › Connectors: under MCP servers you’ll find every server the workspace runs, each saying whose it is.

  • This workspace: its own. + adds one; edit, remove it, or Make global to move it to your global settings for every workspace.
  • Every workspace: your global servers, shown as they are. The switch turns one off in this workspace only; the gear edits it in Settings. Studio never changes what other workspaces run.
  • From the project’s settings: what the repository brings (below), shown as it is.

A workspace’s own servers are kept in its settings in your settings folder (~/.blitz/workspaces/<name>-<id>/.env.toml), never in the project, so they aren’t committed and a clone can’t add them. The same file lists the global servers turned off there:

# ~/.blitz/workspaces/shop-1a2b3c4d/.env.toml
[[mcp.servers]]
name = "figma"
url = "https://mcp.figma.example/mcp"

[mcp]
off = ["github"]   # global servers this workspace doesn't run

They add to the global ones; one with a global server’s name stands in for it in that workspace. From the terminal, add --workspace (-w) to any blitz mcp command:

cd ~/code/shop
blitz mcp add -w figma https://mcp.figma.example/mcp   # this workspace only
blitz mcp disable -w github                            # a global server, off here alone
blitz mcp list -w                                      # every server it runs, with its scope
blitz mcp make-global figma                            # now every workspace has it

Servers a project brings

A repository can suggest servers in .mcp.json, .agents/mcp_config.json or .blitz/settings.toml, in the shape other tools use:

{ "mcpServers": { "issues": { "command": "node", "args": ["tools/issues-mcp.js"] } } }

An entry Blitz can’t start (an SSE server, or one with neither a command nor a URL) is skipped, and the project’s settings review says why. They start only after you trust the project’s settings (the desktop app asks; blitz trust in the terminal), and again after any change to them or the scripts they run. A project’s server always runs in the sandbox and always asks before its tools run. A server of your own with the same name wins. Plugins can bring servers too (plugins).

Approvals and permissions

An MCP tool asks before it runs, like a shell command, showing the tool, the server and its arguments. Allow once, for the session or always, works per server and tool. auto_approve = true skips the question, for the server’s tools and its resources alike (your deny and ask rules still apply), and you can write rules for them:

[permissions]
allow = ["mcp(github:list_*)"]
deny  = ["mcp(github:delete_*)"]

The rule names the server and the tool as the agent sees it (with its prefix, if it has one). Plan mode and read-only commands refuse MCP tools, except reading a server’s resources. A job may use one only with a mcp:<server>:<tool> permission.

Prompts and resources

  • Prompts a server offers become slash commands: /mcp__<server>__<prompt>, with arguments as name=value or in order. They’re listed with your commands in /help and the ⌘K palette.
  • Resources (files, records, documents a server exposes) are read with @<server>:<uri> in a prompt, or by the agent with list_mcp_resources and read_mcp_resource.
  • Questions a server asks (elicitation) come to you like the agent’s own questions; in an unattended run they’re declined.

When a server misbehaves

  • Startup: stdio servers start the first time their tools are needed, not when the workspace opens. A crashed one starts again on the next call.
  • Failures: after two failures in a row its tools pause for 15 seconds, then longer each time (up to 5 minutes), and come back by themselves. A tool call that runs past timeout_seconds fails.
  • Where to look: a server going unavailable, being paused and coming back shows in the conversation where it happened. Everything else is in the service’s log (Settings › System › Logs in the desktop app): look for mcp server … unavailable, keeps failing or needs signing in again: blitz mcp login ….
  • Names: a tool named like one of Blitz’s own is skipped, and when two servers offer the same name the first wins; a prefix fixes both.
  • Checks: blitz doctor says whether each server’s command is on the PATH; blitz doctor --online connects and lists its tools.