Sign in
Menu

Get started

Quickstart

Install the CLI, log in once, add the Cran MCP to your IDE - then 'use cran' anywhere. (Optionally route your app's live traffic through the proxy.)

Prerequisites

  • An approved Cran account (access is invite-only - sign in via the dashboard first).
  • Node.js 18 or later.
  • An IDE with MCP support (Cursor, Claude Code, Windsurf, or Codex).

1. Install the CLI

bash
npm i -g cran-cli

2. Log in once

Run a browser-based device authorization against your account:

bash
cran login

This is the only connection step. Your CLI session works across every repo on your account - there is no per-project link or per-repo token to manage.

3. Add the Cran MCP to your IDE

Register the MCP server for your editor so your IDE agent can drive Cran (scan, audit, propose). Restart the IDE afterward.

bash
cran mcp install cursor      # or: claude | windsurf | codex

That’s it - say “use cran”in any repo and the agent works against your account’s default project. Switch projects with the cran_use_project tool, create one with cran_ensure_project, and scan a repo with cran_scan_codebase + cran_submit_manifest.

4. Route your live traffic (optional)

Only needed if you also want your app’s live traffic to flow through the Cran proxy. From your project root, mint a connection key:

bash
cd your-project
cran link

cran link writes .cran/config.toml (project id, slug, API base - metadata, not secrets) and a connection key into .env. This is separate from the MCP login above and is not a prerequisite for scan or audit. Then point any OpenAI-compatible client at the Cran proxy using that key as the bearer. autoresolves to your project’s published architecture; you can also pass a workflow slug or a catalog id.

from openai import OpenAI

client = OpenAI(
    base_url="https://your-cran-host/api/v1",
    api_key="$CRAN_TOKEN",
)

resp = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Ping"}],
)
print(resp.choices[0].message.content)

Interactive setup

Prefer a guided flow? The wizard walks the same steps:

1

Install + log in once

One login in the browser — that's the whole setup. No token paste, no per-repo linking.

curl -fsSL https://trycran.in/install-cran.sh | bash
cran login

cran login stores your account session— that's all the MCP needs; it works in any repo on your default project (switch with cran_use_project). cran link is optional — run it only to also route your app's live traffic through Cran (writes a connection key to .env).

Install from source (if npm fails)
npm i -g cran-cli
# Or from a local clone:
# npm run install:cran
2

Add Cran to your IDE

After cran login, install MCP (no token in config). Restart the IDE.

cran mcp install cursor
3

Tell your coding agent

Just say "use cran" — the agent works on your default project (switch with cran_use_project). No linking needed; cran link is only for routing live traffic.

Build this and use cran — route the AI calls through Cran from the start.

Smoke-test: cran dev · Advanced: Connections (regenerate connection token)

Verify

  • In your IDE, say “use cran” - the agent should report the active project and account.
  • If you set up live-traffic routing: send a test completion through the proxy and check for a 200 with an x-cran-model header, and confirm the dashboard shows the product as connected after the first proxied request.

Next steps