# token
URL: https://openship.io/docs/cli/reference/token

Commands, arguments, and options for openship token.

See the [workflow guide](/docs/cli/access) for examples. Global flags such as `--json` go before the command; see [global options](/docs/cli/reference#global-options).

## openship token [#openship-token]

Manage personal access tokens

```text
openship token [options] [command]
```

| Subcommand                                                                   | Purpose                                                     |
| ---------------------------------------------------------------------------- | ----------------------------------------------------------- |
| [`list`](/docs/cli/reference/token#openship-token-list)                      | List your personal access tokens                            |
| [`create [options] <name>`](/docs/cli/reference/token#openship-token-create) | Mint a new personal access token (the secret is shown once) |
| [`revoke <id>`](/docs/cli/reference/token#openship-token-revoke)             | Revoke one of your tokens                                   |
| [`mcp`](/docs/cli/reference/token#openship-token-mcp)                        | Inspect and revoke MCP clients authorized by your account   |

## openship token create [#openship-token-create]

Mint a new personal access token (the secret is shown once)

```text
openship token create [options] <name>
```

| Argument | Meaning                   |
| -------- | ------------------------- |
| `name`   | Human-readable token name |

| Option                    | Meaning                                                                                                                                               |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--read-only`             | Reject mutation methods (POST/PUT/PATCH/DELETE) (default: false)                                                                                      |
| `--expires <days>`        | Expire after N days (1–365); omit for non-expiring                                                                                                    |
| `--grant <type:id:perms>` | Scope the token to a resource (repeatable), e.g. project:abc123:read,write or project:abc123:domains:read,domains:write,domains:delete (default: \[]) |
| `--full-access`           | Mint an UNSCOPED token with your own full access (required when no --grant is given) (default: false)                                                 |

## openship token list [#openship-token-list]

List your personal access tokens

```text
openship token list [options]
```

## openship token mcp [#openship-token-mcp]

Inspect and revoke MCP clients authorized by your account

```text
openship token mcp [options] [command]
```

| Subcommand                                                                             | Purpose                                                              |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`list`](/docs/cli/reference/token#openship-token-mcp-list)                            | List authorized MCP clients and their resource scopes                |
| [`get <id>`](/docs/cli/reference/token#openship-token-mcp-get)                         | Inspect this client's permissions                                    |
| [`authorize [options] [file]`](/docs/cli/reference/token#openship-token-mcp-authorize) | Authorize an MCP client with explicit resource grants or full access |
| [`disconnect [options] <id>`](/docs/cli/reference/token#openship-token-mcp-disconnect) | Revoke an MCP client's authorization                                 |

## openship token mcp authorize [#openship-token-mcp-authorize]

Authorize an MCP client with explicit resource grants or full access

```text
openship token mcp authorize [options] [file]
```

| Argument | Meaning                         |
| -------- | ------------------------------- |
| `file`   | JSON input file, or - for stdin |

| Option      | Meaning                                                 |
| ----------- | ------------------------------------------------------- |
| `--schema`  | Print the accepted JSON schema without making a request |
| `-y, --yes` | Confirm this operation                                  |

## openship token mcp disconnect [#openship-token-mcp-disconnect]

Revoke an MCP client's authorization

```text
openship token mcp disconnect [options] <id>
```

| Argument | Meaning       |
| -------- | ------------- |
| `id`     | MCP client ID |

| Option      | Meaning            |
| ----------- | ------------------ |
| `-y, --yes` | Confirm revocation |

## openship token mcp get [#openship-token-mcp-get]

Inspect this client's permissions

```text
openship token mcp get [options] <id>
```

| Argument | Meaning       |
| -------- | ------------- |
| `id`     | MCP client ID |

## openship token mcp list [#openship-token-mcp-list]

List authorized MCP clients and their resource scopes

```text
openship token mcp list [options]
```

## openship token revoke [#openship-token-revoke]

Revoke one of your tokens

```text
openship token revoke [options] <id>
```

| Argument | Meaning  |
| -------- | -------- |
| `id`     | Token ID |
