# pm7-mobbin

Command-line client for the official Mobbin MCP server, for humans and AI agents.

Version 0.1.0. Talks to Mobbin.

## Commands

### help

```
pm7-mobbin help
```

Show a short usage overview.

Runs offline.

### version

```
pm7-mobbin version
```

Print the version.

Runs offline.

### docs

```
pm7-mobbin docs [--json]
```

Print the full command reference, or the machine-readable manifest with --json.

Runs offline.

Emit the manifest that tools.pm7.dev renders.

```bash
pm7-mobbin docs --json
```

### status

```
pm7-mobbin status
```

Show login state and configuration without touching the network.

Runs offline.

Check whether a login exists before doing work.

```bash
pm7-mobbin status --json
```

### login

```
pm7-mobbin login [--manual]
```

Authorize this machine against Mobbin.

Reaches the network.

Paste the redirect URL back instead of using a callback listener.

```bash
pm7-mobbin login --manual
```

### logout

```
pm7-mobbin logout
```

Remove the stored credentials.

Runs offline.

### tools

```
pm7-mobbin tools
```

List the tools Mobbin currently offers. Nothing is hardcoded; the server is asked.

Reaches the network.

Discover the available tool names and their input schemas.

```bash
pm7-mobbin tools --json
```

### call

```
pm7-mobbin call <tool-name> --args '<json>'
```

Invoke any Mobbin tool by name. The generic escape hatch.

Reaches the network.

Call a tool reported by the tools command.

```bash
pm7-mobbin call <tool-name> --args '{"query":"onboarding"}' --json
```

## Options

| Flag | Meaning | Applies to |
| --- | --- | --- |
| `--json` | Emit machine-readable JSON on stdout. | all commands |
| `--verbose` | Print progress to stderr. | all commands |
| `-h, --help` | Show the usage overview. | all commands |
| `-V, --version` | Print the version. | all commands |
| `--args '<json>'` | Tool input as a JSON object. | call |
| `--manual` | Skip the loopback listener and paste the redirect URL instead. | login |

## Output

- stdout: Carries only the requested result, never progress or diagnostics.
- stderr: Carries progress, warnings, hints and errors.
- --json: With --json stdout is exactly one JSON document; on failure stdout stays empty and the error document goes to stderr.

## Exit codes

| Code | Name | Meaning |
| --- | --- | --- |
| 0 | `success` | The command completed. |
| 1 | `general` | Unclassified internal error. |
| 2 | `usage` | Bad command, unknown option, or invalid --args JSON. |
| 3 | `auth_required` | Not logged in, or Mobbin rejected the credentials. |
| 4 | `network` | The Mobbin MCP server could not be reached. |
| 5 | `tool_error` | Mobbin accepted the call but the tool reported an error. |
| 6 | `storage` | The credential store could not be read, written or decrypted. |

## Environment

| Variable | Purpose | Default |
| --- | --- | --- |
| `PM7_MOBBIN_SERVER_URL` | MCP endpoint to talk to. | `https://api.mobbin.com/mcp` |
| `PM7_MOBBIN_CREDENTIALS` | Path to the encrypted credential file. | none |
| `PM7_MOBBIN_CALLBACK_PORT` | Loopback port used during login. | `7749` |
