> ## Documentation Index
> Fetch the complete documentation index at: https://help.scribe-mail.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scribe CLI: your signatures in the terminal and local agents

> Install the Scribe CLI, sign in once, and manage signatures from your terminal — or serve every Scribe tool to a local AI agent over MCP.

The Scribe CLI (`@scribemail/cli`) brings the full Scribe tool surface to your machine. It has two faces:

* **A local MCP server** — `scribe mcp` serves the exact same tools as the hosted MCP server to any agent that can launch a command (Claude Code, Claude Desktop, Cursor, and any stdio MCP client), running as you after a single browser sign-in.
* **A regular command line** — every tool is also a subcommand (`scribe signatures list`, `scribe campaigns schedule`), with JSON output built for scripts and shells.

Both are generated from the same code as the hosted server at `mcp.scribe-mail.com`, so the tools, names, and behavior never drift.

## Install and sign in

<Steps>
  <Step title="Install from npm">
    Requires Node.js 20 or newer.

    ```bash theme={null}
    npm install -g @scribemail/cli
    ```
  </Step>

  <Step title="Sign in with your browser">
    ```bash theme={null}
    scribe login
    ```

    Your browser opens and you sign in with your Scribe account — no API key to create or paste. Credentials are stored in `~/.config/scribe/credentials.json` with owner-only permissions and refresh automatically.
  </Step>

  <Step title="Check the session">
    ```bash theme={null}
    scribe whoami
    ```

    Shows the signed-in user, workspace, and token state.
  </Step>
</Steps>

<Note>
  The signed-in member must be a workspace **owner or admin**, and the workspace plan must include API access. One login is bound to one workspace — run `scribe login` again to switch.
</Note>

## Serve a local agent over MCP

```bash theme={null}
claude mcp add --scope user scribe -- scribe mcp
```

For clients configured with JSON (Claude Desktop, Cursor, and others):

```json theme={null}
{
  "mcpServers": {
    "scribe": {
      "command": "scribe",
      "args": ["mcp"]
    }
  }
}
```

Prefer the CLI over the hosted endpoint when your agent runs locally and you want tool calls to run as your already-signed-in terminal session, or when your client only speaks stdio. The hosted endpoint (see [Connect your assistant](/en/ai-agents/connect)) remains the right choice for chat assistants like Claude on the web and ChatGPT.

## Use it from the shell

Results are JSON on stdout; errors are readable text on stderr.

```bash theme={null}
scribe signatures list --limit 10
scribe signatures create --name "Sales" --draft-content @tree.json
scribe signatures publish --id 0c9f…
scribe teammates list --auto-paginate
scribe analytics views --start-date 2026-07-01 --end-date 2026-08-01 --group-by signature_template
scribe docs search "dns setup"
```

Useful conventions:

* `scribe tools` lists every MCP tool and its CLI command; `scribe call <tool_name> --json '{...}'` calls any tool by its exact MCP name.
* Complex fields like signature content trees accept inline JSON, `@file`, or `-` for stdin. `--json` can supply the whole arguments object, and explicit flags override it.
* Booleans are `--flag` / `--no-flag`; leaving both off omits the field, so partial updates never overwrite values by accident.
* Exit codes: `0` success, `1` API or tool error, `2` usage error, `3` not signed in.

## Commands by area

| Group                                                      | Commands                                                                                        |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `signatures`                                               | `list` `create` `update` `delete` `publish` `install` `preview` `html` `installations`          |
| `signatures variants`                                      | `list` `update` `publish` `delete`                                                              |
| `signatures recipients`                                    | `list` `add` `remove` `set-rules` `add-entities` `remove-entities`                              |
| `teammates`, `emails`, `smart-fields`, `folders`, `assets` | `list` `create` `update` `delete`                                                               |
| `campaigns`                                                | `list` `create` `update` `delete` `preview` `schedule` `pause` `resume`                         |
| `analytics`                                                | `views` `clicks` `events` `events-summary`                                                      |
| `visitors`                                                 | `list` `get` `breakdown`                                                                        |
| `integrations`                                             | `list` `entities`                                                                               |
| Top-level                                                  | `workspace` · `billing documents` · `content-schema` · `docs search` · `docs read` · `feedback` |
| Session                                                    | `login` · `logout` · `whoami` · `mcp` · `tools` · `call`                                        |

The per-tool behavior is identical to the MCP tools — see the [Tools reference](/en/ai-agents/tools).

## Working over SSH

Signing in needs a browser that can reach `127.0.0.1` on the machine running the CLI. On a remote machine, forward the callback port and print the URL instead of opening a browser:

```bash theme={null}
ssh -L 8976:127.0.0.1:8976 yourserver
scribe login --no-browser
```

Then open the printed URL in your local browser.

## Next steps

<CardGroup cols={2}>
  <Card title="Tools reference" icon="wrench" href="/en/ai-agents/tools">
    Every Scribe tool, grouped by area
  </Card>

  <Card title="Skills" icon="book" href="/en/ai-agents/skills">
    Give your assistant the full Scribe workflow
  </Card>

  <Card title="Troubleshooting" icon="bug" href="/en/ai-agents/troubleshooting">
    Fix connection and tool issues
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/introduction">
    The REST API behind the CLI and MCP server
  </Card>
</CardGroup>
