{"id":"ddbb3b7b-7eba-4911-b831-cc2732a32799","slug":"codrihub-memora","kind":"mcp","name":"memora","summary":"Second brain for your AI: a self-hosted memory vault your AI agents read and write over MCP. Install with npm, Docker or one command.","owner":"Codrihub","repoUrl":"https://github.com/Codrihub/memora","license":"AGPL-3.0","licenseTier":"strong-copyleft","trust":"community","stars":7,"match":null,"fewStars":false,"format":"mcp","createdAt":"2026-10-18T03:34:32.000Z","addedAt":"2026-10-21T05:19:58.672Z","logoUrl":"https://avatars.githubusercontent.com/u/344181678?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["memory-knowledge","cloud-infra","developer-tools"],"tags":["ai-agents","knowledge-management","markdown","obsidian-alternative","rust","second-brain","self-hosted","agent-memory"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-25T21:44:08.700Z","sample":false,"url":"https://conduits.dev/tools/codrihub-memora","language":"TypeScript","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<p align=\"center\">\n  <img src=\"docs/assets/memora-logo.png\" alt=\"Memora\" width=\"96\" height=\"96\">\n</p>\n\n<h1 align=\"center\">Memora</h1>\n\n<p align=\"center\"><b>Second brain for your AI.</b><br>Long-term memory for AI agents, on your own server.</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/Codrihub/memora/releases/latest\"><img src=\"https://img.shields.io/github/v/release/Codrihub/memora?sort=semver\" alt=\"Latest release\"></a>\n  <a href=\"https://www.npmjs.com/package/@codrihub/memora\"><img src=\"https://img.shields.io/npm/v/@codrihub/memora?logo=npm&label=npm\" alt=\"npm: @codrihub/memora\"></a>\n  <a href=\"https://github.com/Codrihub/memora/actions/workflows/ci.yml\"><img src=\"https://github.com/Codrihub/memora/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"></a>\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/github/license/Codrihub/memora\" alt=\"License: AGPL-3.0\"></a>\n  <a href=\"https://github.com/Codrihub/memora/pkgs/container/memora\"><img src=\"https://img.shields.io/badge/ghcr.io-codrihub%2Fmemora-blue?logo=docker\" alt=\"Docker image\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://memora.codrihub.tech\">Website</a> ·\n  <a href=\"https://memora.codrihub.tech/docs\">Documentation</a> ·\n  <a href=\"#quick-start\">Quick start</a> ·\n  <a href=\"https://www.npmjs.com/package/@codrihub/memora\">npm</a> ·\n  <a href=\"https://github.com/Codrihub/memora/releases\">Releases</a>\n</p>\n\n<p align=\"center\"><code>npm install -g @codrihub/memora</code></p>\n\nMemora is a self-hosted memory vault for AI agents. Notes are plain markdown\nfiles in a git-backed folder. Agents read and write them over the Model Context\nProtocol (MCP); you browse, edit and govern them in a web UI. One Rust binary\nserves the HTTP API, the MCP endpoint, the web UI and realtime updates on a\nsingle port, with all server state in one embedded SQLite database.\n\n## Screenshots\n\n![Overview](docs/screenshots/overview.jpg)\n\n| | |\n|---|---|\n| ![Brain](docs/screenshots/brain.jpg) **Brain**: every folder is a region, every note a node | ![Node card](docs/screenshots/brain-node.jpg) **Node card**: links, backlinks and a preview |\n| ![Graph](docs/screenshots/graph.jpg) **Graph**: force, radial or cluster layouts | ![Canvas](docs/screenshots/canvas.jpg) **Canvas**: one frame per folder |\n| ![Reader](docs/screenshots/reader.jpg) **Reader** with contents and reading settings | ![Activity](docs/screenshots/activity.jpg) **Activity**: every agent call, live |\n| ![Agents](docs/screenshots/agents.jpg) **Agents & API keys**: one key per agent, scoped | |\n\nScreenshots use a demo vault.\n\n## Features\n\n- **Markdown you own.** Every note is a `.md` file with optional frontmatter and\n  `[[wikilinks]]`. Edit it with any tool; nothing is locked in a database.\n- **Git history.** Changes are committed, so any revision can be listed, diffed\n  and restored (`get_history`, `diff`, `restore_memory`).\n- **MCP for agents.** 75 tools for notes, folders, search, tags, graph traversal,\n  history, locks, activity, pins and import/export, plus admin tools, over the\n  streamable HTTP transport.\n- **API keys or OAuth.** Give each agent its own key, or let MCP clients such as\n  Claude or ChatGPT connect with OAuth after you approve them in the browser.\n- **Per-agent control.** Scopes (`mcp`, `read`, `write`, `admin`), per-key tool\n  lists, server-wide tool switches, and privacy rules that hide notes or\n  folders from chosen agents.\n- **Web UI.** Brain and graph views, a canvas, the vault editor, tags, live\n  agent activity, keys, tools, access rules and settings. Installable as a PWA.\n- **Safe first run.** An unclaimed instance cannot be taken over by whoever\n  finds the port: the operator console opens a short setup window and you\n  finish in the browser.\n- **One port, one process.** HTTP API, MCP, UI and WebSocket share port 8400.\n  The database has no network port.\n\n## Quick start\n\nThree steps, about two minutes.\n\n**1. Install** (pick one, in this order of ease)\n\n```bash\n# npm (Linux x86_64 / arm64, Windows x64; Node.js 22 or newer): install, then keep it running\nnpm install -g @codrihub/memora && memora\n\n# Docker (any OS with Docker)\ndocker run -d --name memora --restart unless-stopped -p 8400:8400 \\\n  -v memora-data:/data -v memora-state:/state ghcr.io/codrihub/memora:latest\n\n# Native installer (Linux server with systemd, x86_64 or aarch64)\ncurl -fsSL https://raw.githubusercontent.com/Codrihub/memora/main/scripts/install.sh | sudo sh\n```\n\nOn Windows, install Node.js 22 or newer and use npm (see [npm](#npm-linux-x86_64--arm64-windows-x64)).\n\n**2. Get a one-time setup code**\n\n```bash\nmemora-cli setup --minutes 15                         # npm, in a second terminal\ndocker exec -it memora memora-cli setup --minutes 15  # Docker\nsudo memora-cli setup --minutes 15                    # native\n```\n\n**3. Open the link it prints** (`http://<your-server>:8400/login`), enter the code\nand create your account. Memora then asks which folder to use as the vault and\nshows how to connect your first agent.\n\nThat is all. The sections below cover every other option.\n\n### npm (Linux x86_64 / arm64, Windows x64)\n\n```bash\nnpm install -g @codrihub/memora\nmkdir -p ~/memora && cd ~/memora\nMEMORA_VAULT=./vault MEMORA_STATE=./state memora\n# in a second terminal, same folder:\nMEMORA_STATE=./state memora-cli setup --minutes 15\n```\n\nOn Windows (PowerShell):\n\n```powershell\nnpm install -g @codrihub/memora\nmkdir ~\\memora; cd ~\\memora\n$env:MEMORA_VAULT = '.\\vault'; $env:MEMORA_STATE = '.\\state'; memora\n# in a second terminal, same folder:\n$env:MEMORA_STATE = '.\\state'; memora-cli setup --minutes 15\n```\n\nThe package carries the prebuilt release binaries and the web UI (no install\nscript, nothing downloaded at install time) and needs Node.js 22 or newer. It is\nhandy for trying Memora or running it under your own user; for a server, the\nnative installer adds the systemd service. On macOS use Docker or build from\nsource. Update with `npm install -g @codrihub/memora@latest`.\n\n### Docker (any OS)\n\nOne container, notes and state in named volumes (no clone, no folder\npermissions):\n\n```bash\ndocker run -d --name memora --restart unless-stopped -p 8400:8400 \\\n  -v memora-data:/data -v memora-state:/state ghcr.io/codrihub/memora:latest\ndocker exec -it memora memora-cli setup --minutes 15\n```\n\nWith Docker Compose from the repository instead:\n\n```bash\ngit clone https://github.com/Codrihub/memora.git && cd memora\ncp .env.example .env                     # optional, every value has a default\nmkdir -p data state && sudo chown -R 1000:1000 data state\ndocker compose up -d\ndocker compose exec -it gateway memora-cli setup --minutes 15\n```\n\nThe image is `ghcr.io/codrihub/memora` (linux/amd64 and linux/arm64). See\n[docker/README.md](docker/README.md) for volumes, upgrades and local builds.\n\n### Native installer (Linux x86_64 / aarch64 with systemd)\n\nOne command:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Codrihub/memora/main/scripts/install.sh | sudo sh\n```\n\nOr download it and read it first:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Codrihub/memora/main/scripts/install.sh -o install.sh\nless install.sh                          # read it first\nsudo sh install.sh                       # add --behind-proxy for a local reverse proxy\nsudo memora-cli                          # then type /web\n```\n\nThe installer downloads the release for your CPU, verifies it against the\nrelease `SHA256SUMS`, creates a `memora` system user, and installs a hardened\n`memora.service` unit. Data lives in `/var/lib/memora`. Run\n`sh install.sh --help` for every option, and see\n[docs/INSTALL.md](docs/INSTALL.md) for details.\n\n### From source\n\n```bash\ngit clone https://github.com/Codrihub/memora.git && cd memora\ncargo build --release\nMEMORA_VAULT=./data MEMORA_STATE=./state ./target/release/memora\n# in a second terminal:\n./target/release/memora-cli              # then type /web\n```\n\nThe server binds to `127.0.0.1:8400` by default. To install your build as a\nservice: `sudo ./scripts/install.sh --from-source`. The web UI is built from\n`web/` (see [CONTRIBUTING.md](CONTRIBUTING.md)).\n\n### First run\n\n1. Run `memora-cli setup` (or type `/web` in the `memora-cli` console). It\n   prints a one-time setup code and the link to open.\n2. Open `http://<host>:8400/login`, enter the code and create the owner account.\n3. Choose the vault folder (`/var/lib/memora/vault` natively, `/data` in Docker).\n4. Add an agent: Agents, then New agent. Pick the app and paste the config it\n   shows. One agent per app or device.\n\nIf a setup code expires unused, nothing breaks: run `memora-cli setup` again\nfor a new code.\n\n## Configuration\n\nSettings come from the environment (systemd unit, `.env` for Docker) and can be\noverridden in the state database with `memora-cli` -> `/config`; a stored value\nwins until you clear it. The most common ones:\n\n| Name | Default | Meaning |\n|---|---|---|\n| `MEMORA_PORT` | `8400` | HTTP port for API, MCP, UI and WebSocket |\n| `MEMORA_BIND` | `127.0.0.1` | Bind address (`0.0.0.0` in the container) |\n| `MEMORA_STATE` | `state` | Directory holding `memora.db` |\n| `MEMORA_VAULT` | empty | Suggested vault folder; the vault is confirmed in the browser |\n| `MEMORA_BASE_URL` | empty | Public URL behind a reverse proxy |\n| `MEMORA_DOMAIN` | empty (any) | Allowed hostnames; other hosts get 404 |\n| `MEMORA_TRUSTED_PROXIES` | empty | Remote proxies whose forwarding headers are trusted |\n| `MEMORA_ADMIN_PASSWORD[_FILE]`, `MEMORA_API_KEY[_FILE]` | unset | Provision an owner or an agent key at startup; only hashes are stored |\n| `RUST_LOG` | `info` | Log filter |\n\nThe full list, precedence rules and the Docker Compose variables are in\n[docs/CONFIGURATION.md](docs/CONFIGURATION.md). For TLS, reverse proxies and\nhardening, see [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md).\n\n## Connecting agents over MCP\n\nThe MCP endpoint is `/mcp` on the same port. Authenticate with an API key in\n`Authorization: Bearer <key>` (or `X-API-Key`), or let the client use OAuth.\n\nClaude Code:\n\n```bash\nclaude mcp add --transport http memora https://memory.example.com/mcp \\\n  --header \"Authorization: Bearer memora_live_REPLACE_WITH_YOUR_KEY\"\n```\n\nClients with an `mcpServers` JSON config:\n\n```json\n{\n  \"mcpServers\": {\n    \"memora\": {\n      \"type\": \"http\",\n      \"url\": \"http://localhost:8400/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer memora_live_REPLACE_WITH_YOUR_KEY\"\n      }\n    }\n  }\n}\n```\n\nClients that support MCP authorization can connect with only the URL; you\napprove them in the browser and they appear as keys you can restrict or revoke.\nThe discovery card is at `/.well-known/mcp.json` and a readable tool catalog at\n`/tools`. [docs/MCP.md](docs/MCP.md) covers OAuth, other clients, every tool and\nthe error codes; [docs/API.md](docs/API.md) lists the HTTP API.\n\n## Operating\n\n```bash\nsudo systemctl status memora             # native service\nsudo journalctl -u memora -f             # logs\nsudo memora-cli                          # console: /status, /keys, /tools, /config, /backup ...\nsudo memora-cli db backup                # consistent copy of memora.db, safe while running\nsudo /usr/local/share/memora/install.sh --upgrade\ndocker compose pull && docker compose up -d   # Docker upgrade\n```\n\nBack up the vault folder and `memora.db` (with `memora-cli db backup`, never a\nplain `cp` of the live file). See [docs/INSTALL.md](docs/INSTALL.md#backups).\n\n### Start, stop and restart\n\n```bash\nmemora-cli start          # or /start in the console\nmemora-cli stop           # or /shutdown\nmemora-cli restart        # or /restart\nmemora-cli uninstall      # or /uninstall\n```\n\nThey work out how this install runs: a systemd service is driven with\n`systemctl`, an npm or source install runs in the background (pid and\nlog in the state folder), and inside Docker the console prints the host\ncommands (`docker start / stop / restart memora`). Uninstall asks, with a\nchecklist, whether to also delete your settings and your vault; both are kept\nunless you tick them. Details: [docs/INSTALL.md](docs/INSTALL.md#uninstall-with-memora-cli).\n\n### Update, uninstall, troubleshooting\n\n`memora-cli update` prints the right steps for your install (npm:\n`npm install -g @codrihub/memora@latest`, then `memora-cli restart`). Check\nyour version with `memora --version`. Per install method, and for older\nversions without `memora-cli uninstall` (before 1.3.2), see\n[Update](docs/INSTALL.md#update),\n[Uninstall by hand](docs/INSTALL.md#uninstall-by-hand-versions-before-132) and\n[Troubleshooting](docs/INSTALL.md#troubleshooting).\n\nThe owner can also **shut the server down from the browser**: Settings, Server,\nShut down. Every browser and agent is disconnected until it is started again on\nthe server. When a supervisor restarts it on its own (systemd `Restart=always`,\nDocker `--restart unless-stopped`), the confirmation says so and shows the stop\ncommand to use instead.\n\n## Security notes\n\n- The owner password is hashed with argon2id. API keys (`memora_live_...`) and\n  session ids are stored only as SHA-256 hashes; a key is shown once.\n- Session cookies are `HttpOnly` and `SameSite=Lax`, cookie writes are checked\n  against the request origin, and pages use a nonce-based Content-Security-Policy.\n- Login and setup are rate limited with per-IP cooldowns; many failures from\n  many IPs only slow sign-ins down and never lock the owner out.\n- Forwarding headers are trusted only from loopback and `MEMORA_TRUSTED_PROXIES`.\n- Access rules can allow or block by IP, range, CIDR and domain; loopback always\n  stays allowed so you cannot lock yourself out.\n- Terminate TLS at a reverse proxy before exposing Memora to the internet.\n\nReport vulnerabilities privately as described in [SECURITY.md](SECURITY.md).\n\n## Documentation\n\n| Document | Contents |\n|---|---|\n| [docs/INSTALL.md](docs/INSTALL.md) | Native installer, Docker, npm, updates, uninstall, troubleshooting, reverse proxy, backups |\n| [docs/CONFIGURATION.md](docs/CONFIGURATION.md) | Every setting and where it lives |\n| [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) | Production deployment and hardening |\n| [docs/MCP.md](docs/MCP.md) | Connecting agents, OAuth, tool reference |\n| [docs/API.md](docs/API.md) | HTTP API |\n| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Crates, request flow, vault files |\n| [docs/DATABASE.md](docs/DATABASE.md) | State database schema |\n\n## Project layout\n\n```\ncrates/core      vault: markdown, wikilinks, search, graph, git history\ncrates/state     SQLite state database (memora.db)\ncrates/gateway   password and key hashing, access checks, environment provisioning\ncrates/mcp       MCP server: tool catalog, permissions, privacy\ncrates/http      axum server: middleware, API, OAuth, UI assets (binary: memora)\ncrates/cli       operator console (binary: memora-cli)\nweb/             web UI (TypeScript), built into crates/http/assets\ndocker/          container entrypoint and release Dockerfile\ndocs/            user and operator documentation\nscripts/         installer and maintenance scripts\n```\n\n## Versioning\n\nMemora follows [Semantic Versioning](https://semver.org/). Each release is a\n`vX.Y.Z` tag with a [GitHub Release](https://github.com/Codrihub/memora/releases)\n(static Linux binaries for x86_64 and aarch64 plus `SHA256SUMS`), npm\npackages for Linux and Windows, and a\nmulti-arch image `ghcr.io/codrihub/memora:X.Y.Z`. Changes are listed in\n[CHANGELOG.md](CHANGELOG.md).\n\n## Contributing\n\nContributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the\n[Code of Conduct](CODE_OF_CONDUCT.md) before opening a pull request.\n\n## License\n\nMemora is free software under the [GNU Affero General Public License v3.0 or\nlater](LICENSE). You may use, modify and share it, including commercially. If\nyou distribute a modified version, or run one as a service for others, you must\npublish its source under the same license and keep the attribution in\n[NOTICE](NOTICE): \"Based on Memora by Codrihub Tech\". The name and logo are\ncovered by [TRADEMARK.md](TRADEMARK.md).\n\nVersions 1.3.8 and earlier were released under the MIT License.\n"}