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

# Claude Desktop setup

> Add persistent memory to Claude Desktop using kontxt and MCP.

This guide connects kontxt to Claude Desktop so your conversations build on each other across sessions.

## Before you start

Complete the [quickstart](/introduction/quickstart) first. `npx -y @4stax/kontxt init` creates your vault and can write Claude Desktop's MCP config automatically.

## Find your config file

Claude Desktop stores its MCP configuration at:

<Tabs>
  <Tab title="macOS">
    ```
    ~/Library/Application Support/Claude/claude_desktop_config.json
    ```
  </Tab>

  <Tab title="Windows">
    ```
    %APPDATA%\Claude\claude_desktop_config.json
    ```
  </Tab>
</Tabs>

If the file doesn't exist, create it.

## Add kontxt

```json theme={null}
{
  "mcpServers": {
    "kontxt": {
      "command": "npx",
      "args": ["-y", "@4stax/kontxt", "serve"]
    }
  }
}
```

<Warning>
  Claude Desktop reads this file at startup. Fully quit and reopen Claude Desktop after changes.
</Warning>

## Restart Claude Desktop

Fully quit and reopen Claude Desktop. MCP servers are initialized on startup. A reload is not enough.

## Verify it's working

In a new Claude conversation, ask:

> "What do you know about me from my memory vault?"

If kontxt is connected, Claude will either surface stored memories or tell you the vault is empty. Either response confirms the connection is working.

## Store your first memory

Ask Claude to store something:

> "Remember that I'm building a personal data OS called 4StaX and I prefer TypeScript."

Claude will call `store_memory` via kontxt. In your next session it will already know this.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Claude says it doesn't have memory tools">
    The MCP server didn't connect. Check that your JSON is valid and that you fully quit and reopened Claude Desktop.
  </Accordion>

  <Accordion title="Claude starts but kontxt never returns context">
    First confirm your vault has at least one memory:

    ```bash theme={null}
    npx -y @4stax/kontxt list
    ```

    If the vault is empty, store a memory and try again:

    ```bash theme={null}
    npx -y @4stax/kontxt add "I prefer TypeScript over JavaScript" -t preference
    ```

    Then restart Claude Desktop and ask a question that should match that preference.
  </Accordion>

  <Accordion title="Path errors on startup">
    Try running `npx -y @4stax/kontxt serve` in a terminal. If it errors, fix that first. Claude Desktop will surface the same underlying issue.
  </Accordion>

  <Accordion title="Vault not found error">
    Re-run `npx -y @4stax/kontxt init` to create the vault at `~/.kontxt/vault.db` before starting the MCP server.
  </Accordion>
</AccordionGroup>
