The stacktape mcp command starts a local MCP (Model Context Protocol) server that exposes Stacktape tools and documentation to AI coding agents. The server communicates over stdio and is spawned automatically by MCP-compatible clients like Claude Code, Codex, Cursor, Windsurf, and VS Code Copilot.
Usage
You typically do not run this command directly. Instead, configure your AI coding agent to spawn it as an MCP server. The mcp add command automates this setup for supported clients.
stacktape mcpCLI options-h, --helpstringShow Help
If provided, the command will not execute and will instead print help information.
--log-level"info" | "debug" | "error"Log Level
The level of logs to print to the console.
info: Basic information about the operation.error: Only errors.debug: Detailed information for debugging.
--quietbooleanQuiet
Hide progress, banners, success messages and hints. Command output, warnings and errors are still printed.
What the server provides
The MCP server exposes five focused tools that AI agents use to investigate incidents, search docs, inspect projects, plan or run CLI commands, and control dev mode:
| Tool | Purpose |
|---|---|
stacktape_incident | Fetch an incident's context (action: "show") or find incidents (action: "list") |
stacktape_docs | Search docs (action: "search") or fetch exact docs (action: "get") |
stacktape_project | Inspect the local workspace for Stacktape config files, package scripts, and inferred defaults |
stacktape_cli | List, describe, plan, or run Stacktape CLI commands with validation and safety gates |
stacktape_dev | Plan, start, inspect, rebuild, and stop dev mode sessions; query, reset and seed local databases; invoke functions with a test event |
How it works
When an MCP-compatible client starts the server, Stacktape registers the five tools and begins listening over stdio immediately, then initializes its bundled documentation index asynchronously. Incident context (stacktape_incident) comes from the same incident show and incidents commands you can run yourself. Infrastructure operations and diagnostics (stacktape_cli) execute Stacktape CLI commands with validation and safety gates. Documentation queries (stacktape_docs) search the local lexical index. Project scanning (stacktape_project) reads local config files and package scripts. Dev-mode follow-up operations like status checks, log reading, rebuilds, local database queries, resets and stop (stacktape_dev) communicate with the dev agent API started by stacktape dev.
stacktape mcp itself does not require an API key. Operations that run Stacktape CLI commands requiring account access — such as deploy, delete, diagnostics, and starting dev mode — need credentials configured with stacktape login.
Client configuration
Run stacktape mcp add to connect your coding agents. It writes the right entry for each agent and checks that the server starts.
To configure a client by hand, point it at the command stacktape with the argument mcp, for example:
MCP server setup has the exact configuration for each agent.
The server speaks the current MCP revision (2026-07-28) and the earlier 2025 revisions, so it also works with agents that still negotiate the older protocol.
Examples
Start the MCP server with debug-level logging for troubleshooting connection issues:
mcp FAQ
Which AI clients support MCP?
stacktape mcp add sets up Claude Code, Codex, Cursor, VS Code with GitHub Copilot, GitHub Copilot CLI, Windsurf and OpenCode. Any other client that can start a local stdio MCP server works too.
Do I need an API key to use the MCP server?
The stacktape mcp command itself does not require an API key, so docs search and project inspection work with no credentials. Operations that run CLI commands requiring account access — such as deploy, delete, diagnostics, and starting dev mode — need credentials configured with stacktape login.
Can the MCP server modify my infrastructure?
Yes. The stacktape_cli tool can run non-interactive CLI commands with action: "run", such as deploy, delete, rollback, secret set, and logs. Mutating commands require confirm: true before they run. Destructive commands also require direct user confirmation through MCP elicitation when the client supports it; otherwise they fail closed.
For deployment preparation, agents should use stacktape_cli with action: "plan" and command: "deploy" first. Planning is read-only and returns the recommended run arguments, matched package script, inferred config path, working directory, and confirmation requirement without starting a deployment.
Do I need to start stacktape mcp myself?
No. The MCP-compatible client spawns the server automatically over stdio when it starts, and the process exits when the client disconnects — you do not manage its lifecycle. Run stacktape mcp add once to add the server entry to your client config; you rarely run stacktape mcp by hand except with --debug to troubleshoot a connection.
Related commands
mcp add— Connects your coding agents to Stacktape.mcp remove— Removes that setup again.dev— Starts local development mode (can also be controlled through the MCPstacktape_devtool).login— Configures the API key required for infrastructure operations through MCP.