memexdocs

Self-hosted memex

Connect assistants to self-hosted memex

Connect Claude Code, Codex, Cursor, Gemini CLI, Claude Desktop or an agent of your own to a memex on your computer.

Settings › Assistants gives each assistant’s steps with this server’s own address filled in. On a self-hosted memex, Connect an assistant opens the Other tab alone.

The address is http://localhost:8080/mcp, or the one you gave memex in APP_BASE_URL. See On your network.

Coding agents

For Claude Code, Codex, Cursor and Gemini CLI, Connect an assistant creates a token and gives the command or settings lines, pointing at this server’s address.

An assistant can also connect itself from a shell once your account exists. This prints a token once:

docker exec memex php bin/console app:create-token you@example.com "Claude Code"

With that token, Claude Code adds memex like this, and the others take the same address and token in the lines Settings › Assistants gives:

claude mcp add --transport http --scope user memex-local http://localhost:8080/mcp --header "Authorization: Bearer YOUR_TOKEN"

Claude Desktop

The same screen gives the lines for claude_desktop_config.json. Claude Desktop starts memex’s own command inside the container, so it works on the computer that runs memex, and nothing listens for it on the network. The container has to be named memex.

{
  "mcpServers": {
    "memex-local": {
      "command": "docker",
      "args": ["exec", "-i", "-e", "MEMEX_TOKEN=YOUR_TOKEN", "memex", "php", "bin/console", "app:mcp-stdio"]
    }
  }
}

Agents of your own

Hermes, OpenClaw and agents of your own add memex as an MCP server at the same address and send the token on every request as Authorization: Bearer <token>. See Connect an agent or a script.

ChatGPT, Claude’s connectors and Gemini Spark

ChatGPT, Claude’s connectors on the web, desktop and phone, and Gemini Spark call memex from their own servers over the internet, so they connect to memex.tools, memex’s hosted edition, which is free. A Markdown export from either imports into the other.

Next steps