# Quickstart (/quickstart)

Install Marfa on your Mac or Linux computer, save and find your first file, and connect an agent to it.



Marfa is **one place for everything you keep,** your files first, which runs on your own computer and which every app and agent you approve can reach.

* **You'll build** a Marfa instance on your computer, with you as its owner.
* **You need** a Mac with Apple silicon or a Linux computer, a terminal, and Claude Code or Codex for the agent steps.
* **You'll have** a first file saved in Marfa, and an agent that finds it and saves more.

### Install Marfa [#install-marfa]

One script installs the CLI, `marfa`, and the server, `marfa-server`, into `~/.local/bin`:

```bash
curl -fsSL https://raw.githubusercontent.com/withmarfa/marfa/main/scripts/install.sh | sh
```

Output:

```text
Installed marfa 0.0.81 and marfa-server 0.0.81 to /Users/sam/.local/bin.
```

If the script says that folder **is not on your `PATH`**, add the `export PATH=` line it prints to your shell's startup file, then open a new terminal.

### Start the server [#start-the-server]

Start a server that only this computer reaches, with no Docker or database to set up:

```bash
marfa server install --access local
```

Output:

```text
Marfa 0.0.81 is running.
  Address   http://localhost:8600
Open this link to choose the owner's username and password. It works once, for five minutes; run this command again for a new one.
  http://localhost:8600/setup#handoff=6f1c…
```

### Create your account [#create-your-account]

Open the link under **Open this link to choose the owner's username and password**. On **Create your account**, enter a username and your password twice, with your name if you like, and select **Create Account**.

You're now the owner, and **nobody else can claim the instance.**

### Sign in from the CLI [#sign-in-from-the-cli]

```bash
marfa login --url http://localhost:8600
```

Your browser opens **Check the code**. If the code matches the one in the terminal, select **It Matches**, then **Allow** on the approval page. The CLI keeps its sign-in in your keychain.

### Save your first file [#save-your-first-file]

Save any file you have, such as a PDF in your Downloads folder:

```bash
marfa items add ~/Downloads/receipt.pdf
```

Output:

```text
added /Users/sam/Downloads/receipt.pdf as 01a1f46e-833a-77af-b9f7-9ccbf59e3dee (sha256:7937…)
```

Then search for a word from its name:

```bash
marfa search receipt
```

Output:

```text
score    id                                    type       when                      title
  1.000  01a1f46e-833a-77af-b9f7-9ccbf59e3dee  core.file  2026-11-19T15:30:45.689Z  receipt.pdf
```

The file is now an **item**, titled with its file name. [How Marfa works](/how-marfa-works) explains items.

### Connect your agent [#connect-your-agent]

Add your instance's MCP server to your agent, then sign in to it:

**Claude Code**

```bash
claude mcp add --transport http --scope user marfa http://localhost:8600/mcp
```

Start Claude Code, type `/mcp`, choose **marfa** and sign in.

**Codex**

```bash
codex mcp add marfa --url http://localhost:8600/mcp
codex mcp login marfa
```

Your browser opens your instance's approval page. Select **Allow**, or **Choose…** first to pick what the agent may reach.

### Ask your agent [#ask-your-agent]

In a new session, ask in your own words, naming the file you saved and another file on your computer:

```text
Find my receipt in Marfa. Then save ~/Pictures/beach.png to Marfa, tagged holiday.
```

The agent finds your receipt. To save a file from your computer it runs `marfa items add`, so allow that command when it asks. `marfa search beach` finds the new file too: the CLI and the agent work from the same items.

Before you rely on Marfa, keep its secrets and its data safe:

- [Back up your data](/run/back-up-and-restore): Copy `marfa.env` somewhere safe, and give the server a place to keep backups.

- [Sync a folder](/use/sync-a-folder): Keep a directory of your files in step with Marfa.

- [Use it from Claude or ChatGPT](/connect-your-agent): Reach your instance from a chat on any device.

- [Run it on Railway](/run/run-on-a-server#on-railway): Deploy and claim an instance there instead of on this computer.
