# Move your AI coding setup to a new computer

Move Claude Code, Cursor and Codex to a new computer: where skills, agents and MCP servers live on the old one, and three ways to bring them along.

A new laptop has your code after one `git clone`, but not your AI setup. The skills, agents, instructions and MCP servers you collected in Claude Code, Cursor or Codex live in files outside your repositories, and a fresh install of the client starts empty. This page shows where those files are and three ways to bring them to the new machine, with what each one costs.

## What is on the old machine

- **Claude Code:** skills in `~/.claude/skills`, agents in `~/.claude/agents`, your own instructions in `~/.claude/CLAUDE.md`, and the MCP servers of your user in `~/.claude.json` under `mcpServers`.
- **Codex:** settings and MCP servers in `~/.codex/config.toml`, your own instructions in `~/.codex/AGENTS.md`.
- **Cursor:** the MCP servers of your user in `~/.cursor/mcp.json`.
- **In each project:** files such as `CLAUDE.md`, `AGENTS.md` and `.mcp.json` inside a repository travel with the repository and need nothing from this page.

## Way 1: copy the folders by hand

Copy the files above to the same places on the new machine, with a USB stick, `scp` or a cloud folder. It costs nothing and works at once. Two things to know: the MCP configuration files often hold tokens in plain text, so do not leave a copy lying around, and the copy is a snapshot. From the first change on, the two machines drift apart, and you repeat the work for every further machine.

## Way 2: a dotfiles repository

Put the folders into a private git repository and link them into place on every machine. Changes then travel with `git pull`, and you get a history. The cost: tokens must stay out of the repository, so the MCP configuration needs a second mechanism, every client keeps its own format, and a chat app such as ChatGPT or Claude on the web cannot read a repository at all.

## Way 3: keep the setup in OnlyMCP

OnlyMCP holds skills, agents, memory and MCP servers in your account and serves them to every client through one address. On the old machine, connect and upload what you have:

```bash
npx onlymcp login
npx onlymcp import --dry-run
npx onlymcp import
```

The dry run lists what would be uploaded and stops; the import never reads files such as `.env` and asks before anything is uploaded. Remote MCP servers are added once in the dashboard under Connections, where their credentials are stored encrypted, see [connectable MCP servers](https://only-mcp.com/docs/mcp-servers).

On the new machine, connect and register OnlyMCP in your clients:

```bash
npx onlymcp login
npx onlymcp install --client claude-code
npx onlymcp install --client codex
```

That is all: skills, agents, memory and the connected servers are there, and they are the same on a third machine or in a chat app. For Cursor and every other client, [supported clients](https://only-mcp.com/docs/clients) lists the command or configuration to paste. The free plan is enough to try this with a real setup.

## What stays on the machine

OnlyMCP does not move everything. Client settings such as themes, permissions and keybindings stay in the files of the client. An MCP server that only runs as a local program on your machine cannot be connected, so it is installed again on the new machine. And project files inside a repository keep travelling with git.

## Where to go next

- [Import and sync](https://only-mcp.com/docs/import-and-sync)
- [Supported clients](https://only-mcp.com/docs/clients)
- [Share MCP servers across AI clients](https://only-mcp.com/docs/share-mcp-servers)
- [Pricing](https://only-mcp.com/pricing)
