> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memloom.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup

> Connect any MCP client to your memloom store

memloom ships an MCP server over stdio: the `@memloom/mcp` package. It routes through the
`memloom serve` daemon (auto-starting it if needed) rather than opening the store itself, so
MCP clients, the CLI, and the viewer all share one store with no lock conflicts. You can run
several MCP clients at once against the same daemon, and a memory saved from one is
instantly recallable from the others.

Every client boils down to the same command:

```bash theme={null}
npx -y @memloom/mcp
```

No separate install is needed: `npx` fetches the package on first launch. If you prefer a
global install, `npm install -g @memloom/mcp` puts the `memloom-mcp` command on your PATH,
and you can use that as the command with no args.

## Client instructions

<CardGroup cols={3}>
  <Card title="Claude Code" href="/mcp/clients/claude-code" />

  <Card title="Claude Desktop" href="/mcp/clients/claude-desktop" />

  <Card title="Cursor" href="/mcp/clients/cursor" />

  <Card title="VS Code" href="/mcp/clients/vs-code" />

  <Card title="Windsurf" href="/mcp/clients/windsurf" />

  <Card title="Cline" href="/mcp/clients/cline" />

  <Card title="Zed" href="/mcp/clients/zed" />

  <Card title="Codex" href="/mcp/clients/codex" />

  <Card title="opencode" href="/mcp/clients/opencode" />
</CardGroup>

Any other MCP client works too: point it at `npx -y @memloom/mcp` as a stdio server.

## Where the API key goes

Put `OPENROUTER_API_KEY` in `~/.memloom/config.env`, not in the MCP client config. The
daemon owns all provider calls; the MCP server never talks to OpenRouter itself. An `env`
block in the client config only matters when the MCP process is the one that auto-starts
the daemon, because real environment variables win over the config file. Keeping the key in
`config.env` gives every surface the same behavior.

After changing the config, restart the daemon (`memloom stop`, then any command).

## Verify it works

Ask your client to save and recall something:

> Save a memory: the staging database runs on Postgres.
> What do you know about the staging database?

You should see `save_memory` and `recall_memory` tool calls, and the memory appears in the
viewer (`memloom ui`) alongside everything saved from the CLI. The full tool list is on
[Tools](/mcp/tools).
