#me mcp

MCP server for AI tool integration.

The me mcp command runs Memory Engine as a Model Context Protocol server over stdio, allowing AI coding agents to store and retrieve memories.

#Commands

  • me mcp -- run the MCP server

#me mcp

Run the MCP server over stdio.

me mcp [options]
Option Description
--api-key <key> Agent API key. If omitted, the server uses your stored me login session.
--space <slug> Space to operate in (the X-Me-Space).

Resolution order:

  • Auth token: --api-key > ME_API_KEY > stored session token.
  • Space: --space > ME_SPACE > stored active space.
  • Server URL: --server (global option) > ME_SERVER > https://api.memory.build.

A logged-in developer needs no key or space — the active session and active space are used automatically. For an unattended/headless agent, pass --api-key and --space (or set ME_API_KEY / ME_SPACE).

Agent-by-config: unless --api-key/ME_API_KEY is already an agent key, me mcp resolves an agent from the project's .me/config.yaml agent, else your global config's agent, and sends every request as that agent (X-Me-As-Agent). With no agent configured anywhere, me mcp refuses to start. If the configured name is stale, ambiguous, or not admitted to the space, the server starts and the first tool call returns the authorization error so the agent can see and act on it. See the linked section for the .user opt-out.

This command is typically not run directly -- it is invoked by AI tools based on their MCP configuration.


#Installation

MCP registration lives under agent-specific commands:

Tool Command
OpenCode me opencode install
Codex CLI me codex install
Gemini CLI me gemini install
Claude Code me claude plugin hooks

Claude Code uses the Memory Engine plugin instead of MCP registration through the me CLI:

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 the options (all optional): leave api_key, server, and space blank to fall back to your me login session, server, and active space; set content_mode to control how much of each message is captured. The plugin has no tree setting — where captured sessions are stored is controlled by your project's .me/config.yaml tree (or the private ~/projects default). See me claude for the full plugin reference.