Skip to content

OpenClaw

Add Alexein to OpenClaw with one command and sign in, so your agents search your memory and save what they learn.

Your OpenClaw agents search your Alexein memory before they answer, and save what you tell them.

1. Add Alexein

Run this command:

Terminal
npx @alexein/cli connect --only openclaw

It adds the alexein server to OpenClaw's settings, asks before it changes anything, and offers the sign-in after it. To add it yourself instead, see the entry below.

Sign in, while OpenClaw's Gateway runs. In a terminal, run:

Terminal
openclaw mcp login alexein

Follow the address it prints: Alexein's sign-in opens in your browser. In the Control UI, you can also open Settings › MCP and select Sign in on alexein.

Sign in, keep Read and save so your agents can save, and select Allow. There is no key to copy.

By hand, add the alexein entry to OpenClaw's settings, under mcp.servers, and sign in as above:

~/.openclaw/openclaw.json
{
  mcp: {
    servers: {
      alexein: {
        url: "https://api.alexein.ai/v1/mcp",
        transport: "streamable-http",
        auth: "oauth",
      },
    },
  },
}

OpenClaw gives its agents the start of the instructions Alexein sends (it keeps the first 2,000 characters), so they know to search first. To disconnect, run openclaw mcp unset alexein, or select Disconnect on it in My memory › AI assistants.

Or with a key

Where nobody is there to sign in, use a personal key instead.

  1. Open My memory › Personal keys and select Create key. Label it OpenClaw, choose Read and write so your agents can save, and copy the key. It is shown once.
  2. Set the key in the environment OpenClaw starts from:
Terminal
export ALEXEIN_API_KEY="ax_..."
  1. Add the alexein entry with the key's headers, in place of auth:
~/.openclaw/openclaw.json
{
  mcp: {
    servers: {
      alexein: {
        url: "https://api.alexein.ai/v1/mcp",
        transport: "streamable-http",
        headers: {
          Authorization: "Bearer ${ALEXEIN_API_KEY}",
          "X-Alexein-User": "me",
        },
      },
    },
  },
}

OpenClaw fills in ${ALEXEIN_API_KEY} from the environment (environment variables), so the key is not written into the file. X-Alexein-User: me names your own memory.

2. Check it works

Run openclaw mcp doctor alexein --probe. It shows that alexein answers, with its tools.

Ask an agent: "What do you remember about me?" It calls memory_search.

Tell it something new about you. Then open My memory: it is there within a few minutes.

Troubleshooting

  • authentication refused (401). Run openclaw mcp login alexein again, while the Gateway runs. With a key: check ALEXEIN_API_KEY is set where OpenClaw starts, with the key copied whole.
  • The tools do not reach an agent that is running. A Gateway or agent running elsewhere needs its own reload: run openclaw mcp reload there, or restart it.
  • memory_add is missing. You chose Read only when you signed in, or the key is Read. Sign in again with Read and save, or create a Read and write key.

More in Troubleshooting.