{"id":50434513,"url":"https://github.com/kyungw00k/mnemo","last_synced_at":"2026-05-31T16:04:10.446Z","repository":{"id":345061240,"uuid":"1183255984","full_name":"kyungw00k/mnemo","owner":"kyungw00k","description":"MCP memory server for AI assistants written in Go","archived":false,"fork":false,"pushed_at":"2026-03-17T12:58:31.000Z","size":616,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-18T03:28:12.904Z","etag":null,"topics":["ai","embedding","go","golang","llm","mcp","memory","model-context-protocol","pgvector","postgresql","semantic-search","sqlite","sqlite-vec","sse","vector-search"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyungw00k.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-16T12:32:38.000Z","updated_at":"2026-03-17T12:56:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kyungw00k/mnemo","commit_stats":null,"previous_names":["kyungw00k/mnemo"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kyungw00k/mnemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fmnemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fmnemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fmnemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fmnemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyungw00k","download_url":"https://codeload.github.com/kyungw00k/mnemo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fmnemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33737716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","embedding","go","golang","llm","mcp","memory","model-context-protocol","pgvector","postgresql","semantic-search","sqlite","sqlite-vec","sse","vector-search"],"created_at":"2026-05-31T16:04:08.482Z","updated_at":"2026-05-31T16:04:10.423Z","avatar_url":"https://github.com/kyungw00k.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"logo.svg\" alt=\"mnemo logo\" width=\"96\" height=\"96\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003emnemo\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/kyungw00k/mnemo/actions/workflows/ci.yml\"\u003e\n    \u003cimg src=\"https://github.com/kyungw00k/mnemo/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/kyungw00k/mnemo/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/kyungw00k/mnemo\" alt=\"Latest Release\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://go.dev/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/go-1.23+-00ADD8?logo=go\" alt=\"Go 1.23+\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/kyungw00k/mnemo\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nPersistent MCP memory server for Claude Code, opencode, and Codex CLI — single Go binary, vector search in SQLite and PostgreSQL.\n\n---\n\n## Quick Start\n\n```bash\n# Install\ngo install github.com/kyungw00k/mnemo/cmd/mnemo@latest\n```\n\nMemory is stored at `~/.mnemo/memory.db`.\n\nWhen mnemo starts as an MCP server, it **automatically detects** Claude Code, opencode, and Codex CLI and registers itself — no manual configuration needed.\n\n---\n\n## Setup\n\n### Claude Code\n\n**Auto-install** (recommended) — just add mnemo as an MCP server and hooks are installed automatically on first run:\n\n```json\n{\n  \"mcpServers\": {\n    \"mnemo\": {\n      \"command\": \"mnemo\",\n      \"env\": { \"TRANSPORT\": \"stdio\" }\n    }\n  }\n}\n```\n\n**Manual hook install**:\n\n```bash\nmnemo hook install          # installs hooks into ~/.claude/settings.json\nmnemo hook install --dry-run    # preview changes without writing\nmnemo hook install --uninstall  # remove hooks\n```\n\nHooks installed:\n\n| Event | Trigger | Action |\n|-------|---------|--------|\n| `SessionStart` | startup / resume / compact | Inject recent decisions and notes as context |\n| `PreCompact` | before context compaction | Save session snapshot to survive compaction |\n| `PostToolUse` | after Bash commands | Record build/test results as observations |\n| `Stop` | session end | Save session note and extract key facts |\n\n### opencode\n\nAdd mnemo as an MCP server in `~/.config/opencode/opencode.json`:\n\n```json\n{\n  \"mcp\": {\n    \"mnemo\": {\n      \"type\": \"local\",\n      \"command\": [\"mnemo\"],\n      \"enabled\": true\n    }\n  },\n  \"instructions\": [\"~/.config/opencode/mnemo.md\"]\n}\n```\n\nOr simply start mnemo as an MCP server — it auto-detects opencode and configures itself.\n\n### Codex CLI\n\nAdd mnemo as an MCP server in `~/.codex/config.toml`:\n\n```toml\n[mcp_servers.mnemo]\ncommand = \"mnemo\"\nargs = []\nenabled = true\n```\n\nOr simply start mnemo as an MCP server — it auto-detects Codex and configures itself (also injects memory instructions into `~/.codex/AGENTS.md`).\n\n### Dashboard\n\n```bash\nmnemo dashboard          # opens http://localhost:8765\nmnemo dashboard --port 9000\n```\n\n---\n\n## Installation\n\n**Pre-built binary** (recommended):\n\n```bash\ncurl -L https://github.com/kyungw00k/mnemo/releases/latest/download/mnemo_darwin_arm64.tar.gz | tar xz\nsudo mv mnemo /usr/local/bin/\n```\n\n**Go install**:\n\n```bash\ngo install github.com/kyungw00k/mnemo/cmd/mnemo@latest\n```\n\n**Docker**:\n\n```bash\ndocker run -d --name mnemo \\\n  -p 8765:8765 \\\n  -v ~/.mnemo:/root/.mnemo \\\n  -e TRANSPORT=sse \\\n  ghcr.io/kyungw00k/mnemo:latest\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eDocker with PostgreSQL + Embeddings\u003c/summary\u003e\n\n```bash\ndocker run -d --name mnemo \\\n  -p 8765:8765 \\\n  -e DB_URL=postgres://postgres:postgres@host.docker.internal:5432/mnemo \\\n  -e EMBEDDING_BASE_URL=http://host.docker.internal:11434/v1 \\\n  -e TRANSPORT=sse \\\n  ghcr.io/kyungw00k/mnemo:latest\n```\n\u003c/details\u003e\n\n**Build from source** (requires CGO):\n\n```bash\ngit clone https://github.com/kyungw00k/mnemo.git\ncd mnemo\nmake build\n```\n\n---\n\n## Configuration\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `DB_URL` | `sqlite://~/.mnemo/memory.db` | Database (SQLite or PostgreSQL) |\n| `TRANSPORT` | `both` | `stdio`, `sse`, or `both` |\n| `SSE_PORT` | `8765` | HTTP port for SSE server |\n| `EMBEDDING_BASE_URL` | `http://localhost:11434/v1` | OpenAI-compatible embeddings endpoint |\n| `EMBEDDING_API_KEY` | _(empty)_ | API key (empty for local Ollama/LM Studio) |\n| `EMBEDDING_MODEL` | `nomic-embed-text` | Embedding model name |\n| `EMBEDDING_DIMENSIONS` | `768` | Vector dimensions |\n| `AUTO_INSTALL_HOOKS` | `true` | Set to `false` to disable auto-configuration |\n\n\u003cdetails\u003e\n\u003csummary\u003eOptional: Advanced Configuration\u003c/summary\u003e\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `HOST_ID` | `\u003cos.Hostname()\u003e` | Memory isolation key (for Docker) |\n| `ENABLE_GIT_CONTEXT` | `true` | Auto-detect git remote for project tagging |\n| `ENABLE_AUTO_EXTRACT` | `false` | LLM-based fact extraction on session-end |\n| `MEMORY_TTL_DAYS` | `0` (off) | Auto-expire memories after N days |\n| `EXTRACT_LLM_BASE_URL` | _(same as EMBEDDING)_ | LLM endpoint for extraction |\n| `EXTRACT_LLM_MODEL` | `gpt-4.1-nano` | Model name for extraction |\n\n\u003c/details\u003e\n\n---\n\n## Dashboard\n\n```bash\nmnemo dashboard          # opens http://localhost:8765\nmnemo dashboard --port 9000\n```\n\n![mnemo dashboard](docs/screenshot.png)\n\n**Features**: Browse memories/notes, full-text search, markdown rendering, detail view modals, knowledge graph visualization.\n\n---\n\n## CLI Subcommands\n\n```bash\n# Hook management (Claude Code)\nmnemo hook install           # auto-configure ~/.claude/settings.json\nmnemo hook install --dry-run\nmnemo hook install --uninstall\n\n# Hooks (called automatically by Claude Code)\nmnemo hook session-start     # returns additionalContext with recent decisions + notes\nmnemo hook session-end       # saves session note; extracts facts if ENABLE_AUTO_EXTRACT=true\nmnemo hook observe           # records Bash tool results as observations\nmnemo hook pre-compact       # saves context snapshot before compaction\n\n# Interactive\nmnemo search \"authentication strategy\"\nmnemo search \"database\" --category decision --limit 5\nmnemo save decision auth_strategy \"JWT with refresh tokens\"\n\n# Dashboard\nmnemo dashboard\nmnemo dashboard --port 9000\n```\n\n---\n\n## Features\n\n- **Dual database**: SQLite (sqlite-vec) or PostgreSQL (pgvector) for vector search\n- **OpenAI-compatible embeddings**: Works with Ollama, LM Studio, OpenAI, or any `/v1/embeddings` endpoint\n- **Dual transport**: stdio (per-session) and SSE (persistent HTTP) — run both simultaneously\n- **Auto-configuration**: Detects Claude Code, opencode, and Codex CLI on first run and self-configures\n- **Hook automation**: Session-start context injection, pre-compact snapshots, session-end note saving, build observation\n- **Git context**: Auto-detects `git remote origin` for project tagging (on by default)\n- **Host isolation**: Memories scoped per machine via `HOST_ID`\n- **Single static binary**: No runtime dependencies (CGO at build time only)\n\n---\n\n## MCP Tools\n\n| Tool | Description |\n|------|-------------|\n| `memory_save` | Save key-value memory |\n| `memory_search` | Search by vector similarity or text |\n| `memory_list` | List memories by category |\n| `memory_delete` | Delete memory |\n| `note_save` | Save structured note with tags |\n| `note_search` | Search notes |\n| `note_list` | List notes by project |\n| `note_delete` | Delete note |\n| `db_query` | Read-only SELECT (max 100 rows) |\n| `db_execute` | Write statements (INSERT/UPDATE/DELETE only) |\n\n\u003cdetails\u003e\n\u003csummary\u003eOptional Tools (enable via env vars)\u003c/summary\u003e\n\n| Tool | Env Var |\n|------|---------|\n| `memory_extract` | `ENABLE_AUTO_EXTRACT=true` |\n| `memory_cleanup` | `MEMORY_TTL_DAYS\u003e0` |\n| `memory_export` | Always available |\n| `memory_import` | Always available |\n\n\u003c/details\u003e\n\n---\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyungw00k%2Fmnemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyungw00k%2Fmnemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyungw00k%2Fmnemo/lists"}