CLI Reference
init
Interactive setup wizard for IDE configuration
memctl init
Interactive wizard that configures MCP settings for your IDE.
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:
- API URL - defaults to
https://memctl.com/api/v1 - API token - from your dashboard
- Organization slug
- Project slug
- Token verification - tests the connection
- IDE selection - choose which IDEs to configure
- Config writing - creates MCP config files
- 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:
# After running memctl auth
npx memctl init --claude
npx memctl init --cursor
npx memctl init --codex
npx memctl init --allConfig 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 |
| Continue | .continue/config.yaml | YAML format, see Agent Setup |
| Zed | Zed settings UI | Uses context_servers key, see Agent Setup |
| JetBrains | Settings UI | AI Assistant plugin, see Agent Setup |
Use memctl generate --all to create instruction files for agents that read them. See Agent Instructions for the full list.