Search documentation

Search documentation

CLI & commands

Every command to install, authenticate, and run the Stratta MCP server.

The @stratta/mcp package is both the MCP server and a small CLI for setup. You rarely run it directly. Your Claude client launches it. These commands cover install and authentication.

Add to Claude Code#

claude mcp add stratta -- npx -y @stratta/mcp

Adds the server with no key up front; you're prompted on first use. To scope the key explicitly:

claude mcp add stratta --scope user --env STRATTA_API_KEY=sk_strt_xxx -- npx -y @stratta/mcp

Use --scope user, never a project-scoped config, so your key isn't committed to a repository.

Log in (save your key)#

npx -y @stratta/mcp login

Prompts you to paste your API key (input hidden), validates it against the backend, and saves it to ~/.stratta/config.json (owner-only, mode 0600). Run it again anytime to replace the key.

Add to Claude Desktop#

After login, add the server to claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "stratta": {
      "command": "npx",
      "args": ["-y", "@stratta/mcp"]
    }
  }
}

See Install in Claude Desktop for the full walkthrough, including keeping the key in the config via an env block.

Global install (optional)#

npm install -g @stratta/mcp

Then reference the binary directly instead of npx:

{
  "mcpServers": {
    "stratta": {
      "command": "stratta-mcp"
    }
  }
}

Run the server directly#

For local testing only. Your Claude client normally does this:

npx -y @stratta/mcp

It connects over stdio and logs to stderr (stdout is reserved for the MCP protocol). Inspect it with the official MCP inspector:

npx @modelcontextprotocol/inspector npx -y @stratta/mcp

Command summary#

CommandPurpose
claude mcp add stratta -- npx -y @stratta/mcpAdd to Claude Code (key on first use).
npx -y @stratta/mcp loginSave your API key to ~/.stratta/config.json.
npm install -g @stratta/mcpInstall the stratta-mcp binary globally.
npx -y @stratta/mcpRun the server over stdio (testing).