---
title: "Import from another tool"
description: "Bring your Claude Code, Codex, OpenCode, or Cursor history, skills, and MCP servers into Hoplite."
canonical_url: "https://hoplite.sh/docs/import"
markdown_url: "https://hoplite.sh/docs/import.md"
---

# Import from another tool
URL: /docs/import
LLM index: /llms.txt
Description: Bring your Claude Code, Codex, OpenCode, or Cursor history, skills, and MCP servers into Hoplite.
Related: /docs/cli, /docs/cli/handoff, /docs/agent/mcp

# Import from another tool

If you've been working locally with **Claude Code**, **Codex**, **OpenCode**, or **Cursor**, the Hoplite CLI imports your session history, your personal skills, and (optionally, with your explicit confirmation) your MCP server credentials. One command covers all of it: `hoplite onboard`.

To hand over the session you're actively working in — not just history — see [Handoff](/docs/cli/handoff) instead.

## Install the CLI and run onboard

Install the CLI and run `onboard`:

```bash title="terminal"
npm i -g @usehoplite/cli
hoplite onboard
```

`onboard` scans your machine for local session history from the supported tools, shows what it found, and imports it — so your past context comes with you. You can run it right after you sign up or any time later; `hoplite update` imports sessions added since. For Homebrew, supported platforms, and the full command reference, see [CLI](/docs/cli).

For Cursor, onboarding also discovers personal skills from `~/.cursor/skills`, local user rules from `~/.cursor/rules`, and MCP servers from `~/.cursor/mcp.json` and known project workspaces. Account-level Cursor user rules are not part of profile exports; copy them to a local text file and pass `hoplite onboard --cursor-user-rules-file PATH` to include them. Cursor OAuth servers need reconnection in Hoplite, and unresolved environment variables or `envFile` configurations cannot be imported as working servers. Committed `.cursor/rules/*.mdc`, `.cursorrules`, and `.cursor/skills` stay with the repository instead of becoming personal instructions.

Project-scoped MCP servers and setup settings are attached to a project only when the source directory’s current Git remote verifies its repository; stale worktree paths or conversation history alone cannot establish the binding. Unverified configuration remains unbound.

Onboarding and history updates preserve the detected preview port without copying local setup, preview, or archive commands into saved project overrides. Existing project overrides stay unchanged. Committed repository runtime configuration still applies inside cloud workspaces; configure overrides separately under **Settings → Project → Environment**.

## Import personal global skills

Skills you installed locally with `npx skills add ... --global` can join your personal Hoplite library. The initial `hoplite onboard` run presents them as a default-selected step before the final confirmation, or you can import selectively later:

```bash title="terminal"
hoplite skills import-global --name <skill-name>
```

Use `--all --yes` for an explicit bulk import, or `--replace` to overwrite a same-named personal skill. Every import reads only the root `SKILL.md` instructions.

Personal skills apply to runs you initiate, not unattended automations. When a personal skill and a repository skill share a name, the repository skill wins.

## Import MCP servers and their credentials

Importing your MCP servers copies **server addresses only** — auth headers and OAuth tokens stay on your machine, and those servers arrive disabled and marked **needs credentials**.

If you'd rather have agents use those servers straight away, `hoplite onboard` offers a separate step — **"Import auth state into Hoplite?"** — listing each server whose API key or OAuth tokens it found locally. Nothing there is selected by default, and nothing is uploaded until you confirm the import.

Selected credentials are encrypted with AWS KMS before storage, never returned by the API, and decrypted only when a run connects. Note that an imported token grants Hoplite's agents the same access it granted your local tools. See [MCP servers](/docs/agent/mcp) for the full encryption model.

<Callout type="info" title="Codex OAuth">
Codex stores its per-server OAuth tokens in a way that would raise a macOS permission prompt to read, so the CLI does not read them. Codex API-key headers are offered as usual; for Codex OAuth servers, add credentials in **Settings → Project → MCP** instead.
</Callout>

## Undo an import

Changed your mind? One command reverses it:

```bash title="terminal"
hoplite undo
```

This removes what your most recent import into the current workspace added. Hoplite keeps track of which import that was, so `undo` works the same whether you signed in with `onboard`, stored a key with `auth login`, or pass one with `--api-key` or `HOPLITE_API_KEY`, and it works from any machine. Only the most recent import can be undone; running `undo` again after that does nothing.

Moving from Conductor? Follow the [Conductor migration guide](/conductor).

## Next steps

- [Handoff](/docs/cli/handoff) — continue a live local session as a cloud thread
- [CLI](/docs/cli) — every command, install option, and flag
- [Repository setup](/docs/agent-ready) — configure cloud setup and preview commands
