# Basic Memory MCP server

> Lets an AI client read, write, and search a local-first knowledge graph stored as Markdown files.

- Repository: https://github.com/basicmachines-co/basic-memory
- Page: https://hostedmcp.org/servers/basicmachines-co/basic-memory
- Transport: stdio
- Stars: 4569
- License: AGPL-3.0
- Latest version: 1.0.0

## Install

### Claude Code

```sh
claude mcp add basic-memory -- uvx basic-memory
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "basic-memory": {
      "command": "uvx",
      "args": [
        "basic-memory"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "basic-memory": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "basic-memory"
      ]
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "basic-memory": {
      "command": "uvx",
      "args": [
        "basic-memory"
      ]
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.basic-memory]
command = "uvx"
args = ["basic-memory"]
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "basic-memory": {
      "command": "uvx",
      "args": [
        "basic-memory"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `BASIC_MEMORY_LOG_LEVEL` | no | no |  |
| `BASIC_MEMORY_NO_PROMOS` | no | no |  |
| `BASIC_MEMORY_RERANKER_ENABLED` | no | no |  |
| `BASIC_MEMORY_RERANKER_MODEL` | no | no |  |
| `BASIC_MEMORY_RERANKER_PROVIDER` | no | no |  |
| `COHERE_API_KEY` | no | no |  |

## FAQ

### How does Basic Memory store my data?

Your knowledge is stored as plain text Markdown files on your disk, ensuring you own your data forever.

### Can I use Basic Memory without an internet connection?

Yes, the local installation is air-gapped friendly and keeps all data on your own disk.

### Does it support semantic search?

Yes, it provides semantic search by meaning with optional cross-encoder reranking for high-quality results.

### Is there a way to sync my notes across devices?

Yes, the Cloud version provides built-in cross-device sync, while local users can use tools like Git or Syncthing.
