---
title: MCP server
description: Install shebang-mcp, what login/status/logout do, and where to find every tool.
---

# MCP server

shebang ships one MCP server and CLI, `shebang-mcp`, covering all five
services — pages, files, short links, databases, and key/project
management — through a single set of tools and one `shb_…` key.

## Install

`shebang-mcp` is on npm:
[npmjs.com/package/shebang-mcp](https://www.npmjs.com/package/shebang-mcp).

```
npx -y shebang-mcp
```

**Claude Code:**

```
claude mcp add shebang -- npx -y shebang-mcp
npx -y shebang-mcp login
```

**Any other stdio-based MCP harness**, add this server entry:

```json
{
  "mcpServers": {
    "shebang": {
      "command": "npx",
      "args": ["-y", "shebang-mcp"]
    }
  }
}
```

then run `login` once from a terminal on the same machine. See
[install the MCP server](/getting-started/install-the-mcp) for the full
walkthrough, including how to skip the login step with a saved key, and
how to install from source instead.

## login / status / logout

- **`login`** — starts an RFC 8628 device-authorization flow: prints a
  user code and a verification URL, tries to open a browser to it, and
  polls in the background until a human approves it there. On success it
  writes the issued key to `~/.config/shebang/credentials.json` (mode
  `0600`) and prints the key's prefix and tier. See
  [device login](/getting-started/device-flow-login) for exactly what
  happens on the wire.
- **`status`** — prints the current key's prefix and base URL, then
  probes the platform: a valid master key gets its tier, the account's
  total key count, and (best-effort) its own home project slug; an
  app-scoped key gets told it can't list account keys; an invalid or
  revoked key gets told to log in again, and the command exits non-zero.
- **`logout`** — deletes the local credentials file only. This does not
  revoke the key on the server — a key can't revoke itself while it's the
  one authenticating the call, so revoke it from a different key (the
  `key_revoke` tool) or from the dashboard's account page instead.

`login` resolves the base URL from `--base-url`, then `SHEBANG_BASE_URL`,
then falls back to `https://dash.shebang.pro`. `status` resolves it from
`SHEBANG_BASE_URL`, then the `base_url` saved in the credentials file by
a previous `login`, then that same default.

## Env vars

| Variable | Purpose |
| --- | --- |
| `SHEBANG_API_KEY` | The key to authenticate with. Takes priority over the saved credentials file. `SHERPAGE_API_KEY` is accepted as a legacy alias for the same value. |
| `SHEBANG_BASE_URL` | Platform base URL; defaults to `https://dash.shebang.pro`. |

## Next

- [Tools reference](/mcp/tools-reference) — every tool, grouped by
  service, with its real arguments.
- [Hosted MCP](/mcp/hosted-mcp) — call shebang over HTTPS instead of
  running the server locally.
- [Troubleshooting](/mcp/troubleshooting) — the errors you'll actually
  hit, and what they mean.
