diff --git a/README.md b/README.md index 0048dbd..ca40e65 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,14 @@ me memory create "Auth uses bcrypt with cost 12" --tree design.auth # Search by meaning + keywords me memory search "how does authentication work" -# Connect to your AI tools (Claude Code, Gemini, Codex, OpenCode) -me mcp install +# Connect to your AI tools +me opencode install +me codex install +me gemini install + +# Claude Code uses the Memory Engine plugin +claude plugin marketplace add timescale/memory-engine +claude plugin install memory-engine@memory-engine ``` ## How it works diff --git a/docs/agents.txt b/docs/agents.txt index e937dc5..ca3aecb 100644 --- a/docs/agents.txt +++ b/docs/agents.txt @@ -10,8 +10,12 @@ docs: https://docs.memory.build # MCP server mcp: - install: me mcp install - description: Memory engine ships as an MCP server. Install it and your AI tools get memory without any integration work. + install: + opencode: me opencode install + codex_cli: me codex install + gemini_cli: me gemini install + claude_code: claude plugin marketplace add timescale/memory-engine && claude plugin install memory-engine@memory-engine + description: Memory engine ships as an MCP server. OpenCode, Codex CLI, and Gemini CLI use agent-specific install commands. Claude Code uses the Memory Engine plugin. compatible_clients: - Claude Code - Codex CLI diff --git a/docs/cli/me-claude.md b/docs/cli/me-claude.md index 2859d83..b7c8da3 100644 --- a/docs/cli/me-claude.md +++ b/docs/cli/me-claude.md @@ -24,7 +24,7 @@ me claude hook --event This command is not run directly -- the Claude Code plugin calls it. The plugin is installed via Claude Code's native flow: ```bash -claude plugin marketplace add +claude plugin marketplace add timescale/memory-engine claude plugin install memory-engine@memory-engine [--scope user|project|local] # then, in a Claude Code session: /plugin # select memory-engine, Configure, fill api_key/server/tree_prefix diff --git a/docs/cli/me-codex.md b/docs/cli/me-codex.md index aa68377..febc4b1 100644 --- a/docs/cli/me-codex.md +++ b/docs/cli/me-codex.md @@ -24,7 +24,7 @@ me codex install [options] If no `--api-key` or `--server` is provided, values are resolved from `~/.config/me/credentials.yaml` (set by `me login` and `me engine use`). -This is equivalent to `me mcp install codex` -- see [me mcp](me-mcp.md) for the multi-tool installer. +For manual MCP client configuration, see [MCP Integration](../mcp-integration.md). --- diff --git a/docs/cli/me-gemini.md b/docs/cli/me-gemini.md index e47f0fc..a3faf6e 100644 --- a/docs/cli/me-gemini.md +++ b/docs/cli/me-gemini.md @@ -23,4 +23,4 @@ me gemini install [options] If no `--api-key` or `--server` is provided, values are resolved from `~/.config/me/credentials.yaml` (set by `me login` and `me engine use`). -This is equivalent to `me mcp install gemini` -- see [me mcp](me-mcp.md) for the multi-tool installer. +For manual MCP client configuration, see [MCP Integration](../mcp-integration.md). diff --git a/docs/cli/me-mcp.md b/docs/cli/me-mcp.md index 3a9bbeb..2b84416 100644 --- a/docs/cli/me-mcp.md +++ b/docs/cli/me-mcp.md @@ -7,7 +7,6 @@ The `me mcp` command runs Memory Engine as a [Model Context Protocol](https://mo ## Commands - [me mcp](#me-mcp-1) -- run the MCP server -- [me mcp install](#me-mcp-install) -- register with AI tools --- @@ -25,44 +24,26 @@ me mcp [options] The server URL is resolved from `--server` (global option) > `ME_SERVER` env > `https://api.memory.build`. -This command is typically not run directly -- it is invoked by AI tools (Claude Code, Gemini CLI, etc.) based on the MCP configuration created by `me mcp install`. +This command is typically not run directly -- it is invoked by AI tools based on their MCP configuration. --- -## me mcp install +## Installation -Register `me` as an MCP server with AI tools. +MCP registration lives under agent-specific commands: -``` -me mcp install [tools...] [options] -``` - -| Argument | Required | Description | -|----------|----------|-------------| -| `tools...` | no | Tool names to install (default: all detected). | - -| Option | Description | -|--------|-------------| -| `--api-key ` | API key to embed in the MCP config. | -| `--server ` | Server URL to embed in the MCP config. | +| Tool | Command | +|------|---------| +| OpenCode | [`me opencode install`](me-opencode.md#me-opencode-install) | +| Codex CLI | [`me codex install`](me-codex.md#me-codex-install) | +| Gemini CLI | [`me gemini install`](me-gemini.md#me-gemini-install) | +| Claude Code | [`me claude`](me-claude.md) plugin hooks | -Detects installed AI tools on your PATH and registers `me` as an MCP server with each one. Supported tools: +Claude Code uses the Memory Engine plugin instead of MCP registration through the `me` CLI: -| Tool | Binary | Method | -|------|--------|--------| -| Claude Code | `claude` | `claude mcp add` | -| Gemini CLI | `gemini` | `gemini mcp add` | -| Codex CLI | `codex` | `codex mcp add` | -| OpenCode | `opencode` | Edits `~/.config/opencode/opencode.json` | - -If no `--api-key` or `--server` is provided, values are resolved from `~/.config/me/credentials.yaml` (set by `me login` and `me engine use`). - -### Example - -```bash -# Install for all detected tools using stored credentials -me mcp install - -# Install for Claude Code only with explicit credentials -me mcp install claude --api-key me.xxx --server https://api.memory.build ``` +claude plugin marketplace add timescale/memory-engine +claude plugin install memory-engine@memory-engine [--scope user|project|local] +``` + +Then start Claude Code, run `/plugin`, select `memory-engine`, and configure `api_key`, `server`, and `tree_prefix`. diff --git a/docs/cli/me-opencode.md b/docs/cli/me-opencode.md index 82b2bb0..12919e3 100644 --- a/docs/cli/me-opencode.md +++ b/docs/cli/me-opencode.md @@ -24,7 +24,7 @@ me opencode install [options] If no `--api-key` or `--server` is provided, values are resolved from `~/.config/me/credentials.yaml` (set by `me login` and `me engine use`). -This is equivalent to `me mcp install opencode` -- see [me mcp](me-mcp.md) for the multi-tool installer. +For manual MCP client configuration, see [MCP Integration](../mcp-integration.md). --- diff --git a/docs/getting-started.md b/docs/getting-started.md index b760311..8c6c722 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -64,13 +64,24 @@ Starts a local web UI on `http://127.0.0.1:3000` (or the next free port) with a ## Connect to AI tools -Register Memory Engine as an MCP server with your AI coding tools: +Register Memory Engine with your AI coding tools: ```bash -me mcp install +me opencode install +me codex install +me gemini install ``` -This auto-detects Claude Code, Gemini CLI, Codex CLI, and OpenCode on your PATH and registers `me` with each one. After installation, your AI agent has access to 10 memory tools -- create, search, get, update, delete, and more. +For Claude Code, install the Memory Engine plugin instead: + +```bash +claude plugin marketplace add timescale/memory-engine +claude plugin install memory-engine@memory-engine +``` + +Then start Claude Code, run `/plugin`, select `memory-engine`, and configure `api_key`, `server`, and `tree_prefix`. + +After installation, your AI agent has access to memory tools -- create, search, get, update, delete, and more. See [MCP Integration](mcp-integration.md) for details. diff --git a/docs/mcp-integration.md b/docs/mcp-integration.md index ddf32a5..bd37416 100644 --- a/docs/mcp-integration.md +++ b/docs/mcp-integration.md @@ -24,46 +24,61 @@ You need an API key. Run `me whoami` to see your active engine, or create an API The server defaults to `https://api.memory.build`. Pass `--server ` only if you're running a self-hosted engine. -### Automatic +### Agent-specific installers ```bash -me mcp install +me opencode install +me codex install +me gemini install ``` -This detects AI tools on your PATH and registers Memory Engine with each one. It reads your API key and server URL from the credentials file and bakes them into each tool's MCP configuration, so the `me mcp` process can authenticate without the credentials file. +These commands register Memory Engine with the named tool. They read your API key and server URL from the credentials file and bake them into the tool's MCP configuration, so the `me mcp` process can authenticate without the credentials file. -See [`me mcp install`](cli/me-mcp.md) for the full command reference. +See the agent-specific command references for details: [`me opencode install`](cli/me-opencode.md#me-opencode-install), [`me codex install`](cli/me-codex.md#me-codex-install), and [`me gemini install`](cli/me-gemini.md#me-gemini-install). -| Tool | Detection | -|------|-----------| -| Claude Code | `claude` binary | -| Gemini CLI | `gemini` binary | -| Codex CLI | `codex` binary | -| OpenCode | `opencode` binary | +| Tool | Install command | +|------|-----------------| +| OpenCode | `me opencode install` | +| Codex CLI | `me codex install` | +| Gemini CLI | `me gemini install` | +| Claude Code | Claude Code plugin, described below | ### Claude Code ```bash -claude mcp add --scope user me -- me mcp --api-key --server +claude plugin marketplace add timescale/memory-engine +claude plugin install memory-engine@memory-engine [--scope user|project|local] ``` -This registers `me` as a user-scoped MCP server. Claude Code will start the `me mcp` process automatically in every conversation. +Claude Code uses the Memory Engine plugin. After installing it, start a Claude Code session, run `/plugin`, select `memory-engine`, and configure `api_key`, `server`, and `tree_prefix`. The plugin provides the MCP server and captures Claude Code session events as memories. ### Gemini CLI +```bash +me gemini install +``` + +To configure manually: + ```bash gemini mcp add --scope user me me mcp --api-key --server ``` ### Codex CLI +```bash +me codex install +``` + +To configure manually: + ```bash codex mcp add me -- me mcp --api-key --server ``` ### OpenCode -`me mcp install` edits `~/.config/opencode/opencode.json` directly, adding an entry under `mcp.me`. To configure manually, add this to that file: +`me opencode install` edits `~/.config/opencode/opencode.json` directly, adding an entry under `mcp.me`. To configure manually, add this to that file: ```json { @@ -193,7 +208,7 @@ me_memory_search({tree: "design.*"}) 1. Verify the `me` binary is on your PATH: `which me` 2. Test the server directly: `echo '{}' | me mcp --api-key --server ` -3. Re-install: `me mcp install` +3. Re-install with the agent-specific command, for example `me opencode install`, `me codex install`, or `me gemini install`. For Claude Code, open `/plugin` and reconfigure `memory-engine`. ### Agent can't find memories diff --git a/packages/cli/commands/claude.ts b/packages/cli/commands/claude.ts index d45ba9b..4772879 100644 --- a/packages/cli/commands/claude.ts +++ b/packages/cli/commands/claude.ts @@ -4,7 +4,7 @@ * Just one subcommand: `me claude hook --event `. The plugin itself * is installed via Claude Code's native flow: * - * claude plugin marketplace add # register marketplace + * claude plugin marketplace add timescale/memory-engine * claude plugin install memory-engine@memory-engine [--scope user|project|local] * # then, in a Claude Code session: * /plugin # select memory-engine, Configure, fill api_key/server/tree_prefix diff --git a/packages/cli/commands/mcp.ts b/packages/cli/commands/mcp.ts index 00540bf..df76f50 100644 --- a/packages/cli/commands/mcp.ts +++ b/packages/cli/commands/mcp.ts @@ -4,8 +4,9 @@ * Does NOT use the credentials file. API key must be provided * via --api-key or ME_API_KEY env var. * - * MCP registration with individual AI tools has moved to per-agent commands: - * me claude install, me opencode install, me gemini install, me codex install + * MCP registration with individual AI tools lives in per-agent commands: + * me opencode install, me gemini install, me codex install + * Claude Code uses the Memory Engine plugin instead of a CLI installer. */ import { Command } from "commander"; import { runMcpServer } from "../mcp/server.ts";