Skip to Content
DocsUser GuideInstalling & MCP Setup

Installing, Running & Connecting an Agent (MCP)

Strata is a Next.js app with a set of pure engines and a companion MCP server. This page covers how to run it and how to point an AI agent (Claude Desktop, Cursor, …) at the MCP server. Packaging Strata as a one-click desktop app is on the roadmap — the notes below describe how it runs today and where it’s headed.

Run the app

Prerequisites: Node 22+ and a clone of the repo.

npm install npm run dev # product at http://localhost:3000/ , docs at /docs

For a production build:

npm run build && npm run start

Diagrams are saved in your browser’s localStorage — no database or account required (see Saving & Loading). The local-only features — live cloud discovery, the Terraform companion, and the CLI — need the app to run on your own machine (they read the filesystem and, for plans, shell out to terraform/tofu).

Headless CLI

The same pure engines are available offline, no browser:

npm run strata -- cost ./terraform-state.json # total + per-category + FLOOR flag npm run strata -- render ./graph.json -o out.svg # lay out + write an SVG npm run strata -- connect ./infra # map a Terraform repo npm run strata -- plan ./infra --root prod # visualize a plan diff

See the Terraform Companion and Multi-Account Cost Model guides.

Connect an AI agent (MCP)

Strata ships an MCP server (stdio) that exposes the same engines the UI uses — list_services, validate_architecture, import_iac, merge_graphs, estimate_cost, review_account, export_iac, and more (see Live Discovery & MCP). Run it with:

npm run mcp # JSON-RPC 2.0 over stdio

Point your MCP client at that command. For Claude Desktop, add this to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{ "mcpServers": { "strata": { "command": "npm", "args": ["run", "mcp"], "cwd": "/absolute/path/to/strata" } } }

Cursor and other MCP clients take the same command / args / cwd. Restart the client and the Strata tools appear. The server is local-only and uses no cloud credentials; the import_iac path param + returned graphId handle let an agent work over a multi-MB terraform show -json estate without pasting it into the conversation.

Desktop app (Electron)

An additive Electron shell bundles the same Next.js app + a Node runtime so it can ship as an installable desktop app — without changing the web build/deploy at all. See electron/README.md for details.

npm run dev && npm run app:dev # dev: shell loads the running dev server npm run app:build # BUILD_TARGET=electron next build (standalone) npm run app:dist # + electron-builder → installers in ./release

It works because the local features need Node (child-process terraform, provider SDKs, the MCP stdio server); Electron carries one. The renderer (2D / 2D⚡ / 3D) is entirely client-side and runs unchanged.

One-click MCP setup. In the desktop app, Tools ▸ Connect to Claude Desktop… (or Cursor) merges the Strata MCP server into the client’s config for you — no hand-editing. In the packaged app it points the client at the app binary in MCP mode (Strata --mcp, a bundled stdio server); in dev it points at npm run mcp. It only adds/updates the strata entry, leaving your other MCP servers untouched.

Durable storage. The desktop app persists diagrams to a SQLite database (better-sqlite3) in the OS user-data dir instead of the browser’s localStorage, so they survive reinstalls, aren’t capped by browser quota, and scale to large libraries. An existing graphs.json from an earlier build is migrated in on first run. The renderer talks to it through the same synchronous whole-map bridge, so the web app is unchanged (still localStorage), and if the native module can’t load the app falls back to the JSON file automatically.

Auto-update. The packaged app checks GitHub Releases on launch and every six hours, and offers a “Check for Updates…” item under Tools; a ready update prompts you to restart and install. Disabled in dev builds.

Code signing + notarization. app:dist signs and notarizes when the signing credentials are present in the environment — never committed. See electron/README.md for the required env vars (CSC_LINK, APPLE_ID, APPLE_TEAM_ID, WIN_CSC_LINK, …), the GitHub release flow (GH_TOKEN), and the native-module rebuild notes. Run app:dist on each target OS.

Last updated on