> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neus.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup

> OAuth, access keys, and per-editor config after neus setup.

Connect your editors to NEUS so they can load your account, reuse saved results, and use Vault secrets.

Hosted endpoint: **`https://mcp.neus.network/mcp`**

## Quick start

Run [Install NEUS](../install) first (`neus setup` · `neus check`). Return here for access keys, disconnect, migrate, and per-editor config paths.

`neus setup` detects your editors, configures hosted MCP, and signs you in. By default it uses browser OAuth for Cursor, VS Code, and Claude Code. If you set `NEUS_ACCESS_KEY` first, the CLI uses that key instead. Pass `--access-key <npk_...>` to override, and `--json` for scripted installs.

## Daily commands

| Step                             | Command                                    |
| -------------------------------- | ------------------------------------------ |
| Connect this machine             | `neus setup`                               |
| Connect an agent to this project | `neus mount <agentId> --apply cursor`      |
| Health check                     | `neus doctor --live` (alias: `neus check`) |
| Read trust receipts              | MCP tool `neus_proofs_get`                 |

## Access keys

OAuth is the default for IDE setup. Your MCP host discovers the NEUS OAuth metadata on first use and refreshes your session silently for up to 30 days.

Use a **profile access key** from [Access Keys](https://neus.network/profile?tab=account) only when browser OAuth is not available — servers, CI, and automation. Access keys are durable: once written to the MCP config, they do not expire.

```bash theme={"dark"}
export NEUS_ACCESS_KEY=npk_...
neus setup
```

When `NEUS_ACCESS_KEY` is set, `neus setup` writes a durable `Bearer npk_…` credential instead of starting OAuth. Run `neus setup` again after rotating the key. Treat access keys like passwords.

## Disconnect

```bash theme={"dark"}
neus disconnect --access-key <token>
```

## Migrate your workspace

**Two paths — do not mix them up:**

| Goal                                        | Command                               | Output                                          |
| ------------------------------------------- | ------------------------------------- | ----------------------------------------------- |
| **Connect a trusted agent to this project** | `neus mount <agentId> --apply cursor` | `.neus/mount.json` + host rules (live receipts) |
| **Snapshot legacy IDE config**              | `neus import` / `neus export`         | `.neus/imported/*.json` (local scan, no proofs) |

### Connect a trusted agent

```bash theme={"dark"}
neus setup
neus mount <agentId> --apply cursor
neus doctor --live
```

See [Connect agent context](../agents/runtime-mount).

### Legacy IDE import (migration only)

Import existing IDE configuration into a portable NEUS manifest, then export it for another workspace.

```bash theme={"dark"}
neus import --dry-run
neus import --from auto
neus export --to manifest
```

`--from auto` detects **Claude Code**, **Cursor**, and **Claude Desktop** workspaces.

Named sources:

```bash theme={"dark"}
neus import --from cursor
neus import --from claude-code
neus import --from claude-desktop
```

## Client setup

Per-editor install paths (Cursor, VS Code, Claude Code, and more): **[Install NEUS](../install)**.

`neus setup` connects **Cursor**, **Codex**, **VS Code**, and **Claude Code** in one command. Other MCP hosts (including Cline) use the same hosted URL — see [IDE plugin](./ide-plugin).

**Cursor:** install the **neus-trust** plugin **or** run `neus setup --client cursor` — not both. The plugin already provides the `neus` MCP server; adding a second entry in `~/.cursor/mcp.json` creates a duplicate. `neus setup` soft-skips Cursor when the plugin is detected (pass `--client cursor` to override). Public tools = **13** (correct).

| Host            | User scope                                                                                                                                  | Project scope        |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| **Cursor**      | `~/.cursor/mcp.json`                                                                                                                        | `./.cursor/mcp.json` |
| **Codex**       | `~/.codex/config.toml` through `codex mcp add`                                                                                              | User-scoped          |
| **VS Code**     | macOS: `~/Library/Application Support/Code/User/mcp.json` · Linux: `~/.config/Code/User/mcp.json` · Windows: `%APPDATA%\Code\User\mcp.json` | `./.vscode/mcp.json` |
| **Claude Code** | `claude mcp add` → `~/.claude.json`                                                                                                         | `./.mcp.json`        |

Limit to one client:

```bash theme={"dark"}
neus setup --client cursor
neus setup --client codex
neus setup --client vscode
neus setup --client claude
```
