---
title: init
description: Interactive setup wizard for IDE configuration
---

# memctl init

Interactive wizard that configures MCP settings for your IDE.

```bash
npx memctl init [options]
```

## Options

| Flag         | Description                                                        |
| ------------ | ------------------------------------------------------------------ |
| `--claude`   | Write Claude Code config only (`.mcp.json`)                        |
| `--cursor`   | Write Cursor config only (`.cursor/mcp.json`)                      |
| `--windsurf` | Write Windsurf config only (`~/.codeium/windsurf/mcp_config.json`) |
| `--vscode`   | Write VS Code config only (`.vscode/mcp.json`)                     |
| `--codex`    | Write Codex config only (`.codex/config.toml`)                     |
| `--roo`      | Write Roo Code config only (`.roo/mcp.json`)                       |
| `--amazonq`  | Write Amazon Q config only (`.amazonq/mcp.json`)                   |
| `--all`      | Write configs for all supported agents                             |

## Interactive mode

Without flags, the wizard walks through:

1. **API URL** - defaults to `https://memctl.com/api/v1`
2. **API token** - from your dashboard
3. **Organization slug**
4. **Project slug**
5. **Token verification** - tests the connection
6. **IDE selection** - choose which IDEs to configure
7. **Config writing** - creates MCP config files
8. **Save to config** - optionally saves to `~/.memctl/config.json`

## Targeted mode

With a flag, skips the interactive prompts and writes only the specified IDE config using credentials from environment variables or `~/.memctl/config.json`:

```bash
# After running memctl auth
npx memctl init --claude
npx memctl init --cursor
npx memctl init --codex
npx memctl init --all
```

## Config files written

| Agent       | File                                  | Format               |
| ----------- | ------------------------------------- | -------------------- |
| Claude Code | `.mcp.json`                           | `mcpServers` object  |
| Cursor      | `.cursor/mcp.json`                    | `mcpServers` object  |
| Windsurf    | `~/.codeium/windsurf/mcp_config.json` | `mcpServers` object  |
| VS Code     | `.vscode/mcp.json`                    | `servers` object     |
| Codex       | `.codex/config.toml`                  | TOML `mcp_servers`   |
| Roo Code    | `.roo/mcp.json`                       | `mcpServers` object  |
| Amazon Q    | `.amazonq/mcp.json`                   | `mcpServers` object  |

The wizard also offers to write `AGENTS.md` with memctl usage instructions. Agents like Codex, Claude Code, and Gemini read this file for persistent tool usage guidance.

**Not automated by init** (configure manually via their UIs):

| Agent      | Config location            | Notes                                    |
| ---------- | -------------------------- | ---------------------------------------- |
| Cline      | Extension UI / cline_mcp_settings.json | OS-dependent path, see [Agent Setup](/docs/agents#cline) |
| Continue   | `.continue/config.yaml`    | YAML format, see [Agent Setup](/docs/agents#continue) |
| Zed        | Zed settings UI            | Uses `context_servers` key, see [Agent Setup](/docs/agents#zed) |
| JetBrains  | Settings UI                | AI Assistant plugin, see [Agent Setup](/docs/agents#jetbrains) |

Use `memctl generate --all` to create instruction files for agents that read them. See [Agent Instructions](/docs/agent-instructions) for the full list.
