Shiori
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Shiori (栞)
Shared memory and Markdown notes for all your AI agents.
Shiori (栞, bookmark / trail marker) is a self-hosted remote MCP server that lets Muse, Grok, Claude, ChatGPT, and your local coding agents share the same context. Start a conversation in one agent and pick it up in another without repeating yourself.
How it works
Shiori runs as a single lightweight Node 24 + SQLite + Git container with two complementary layers:
Episodic Memory Tree: An append-only timeline of 1-line facts, preferences, and decisions, organized into a binary tree of summaries. When any agent starts a session (
memory_wake), it gets recent memories verbatim and older memories exponentially compressed inside a fixed token budget, and can drill down (memory_zoom) or search (memory_recall) anytime.Long-form Notes: Editable Markdown documents backed by a real Git repository (every edit is a commit, nothing is ever lost) with hybrid search combining SQLite FTS5 keywords and API embeddings (OpenAI, Gemini, or keyword-only).
Zero-trust OAuth 2.1: Every client authenticates via OAuth 2.1 + GitHub sign-in restricted to your numeric
OWNER_GITHUB_ID, with a consent screen, PKCE S256, redirect allowlist, and per-client grant revocation.
See ARCHITECTURE.md for the OAuth 2.1 and hybrid search flow diagrams.
Related MCP server: MemoryGate
Quick start (Coolify / Docker)
Create a GitHub OAuth App (Settings → Developer settings → OAuth Apps):
Homepage URL:
https://shiori.yourdomain.comAuthorization callback URL:
https://shiori.yourdomain.com/callback
Deploy in Coolify (or any Docker host):
Point a new resource at
8bury/shioriusing theDockerfile.Mount a persistent volume at
/data(stores/data/notes,/data/shiori.db, and/data/memory.log).Set your domain (
https://shiori.yourdomain.com). Coolify/Traefik handles HTTPS and checks/health.
Configure environment variables (see .env.example):
PUBLIC_URL,GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET,OWNER_GITHUB_IDADMIN_SECRET(random hex string for/admin/*)EMBEDDING_PROVIDER(openai,gemini, ornone) andEMBEDDING_API_KEYALLOWED_REDIRECT_PREFIXES(comma-separated callback prefixes for extra clients like Muse or Grok; Claude, ChatGPT, and localhost are allowed by default)
Full setup, importing existing notes, and operations: docs/setup.md.
Local development
npm ci
cp .env.example .env
npm run devRun checks:
npm run lint
npm run typecheck
npm run build
npm testConnecting your agents
Claude Code:
claude mcp add -s user --transport http shiori https://shiori.yourdomain.com/mcpMuse, Grok, Claude (web/desktop/mobile), ChatGPT: add a custom remote MCP connector pointing to
https://shiori.yourdomain.com/mcp.If a new client gets a
403during sign-in, check the container logs for{"auth":"redirect refused","redirectUri":"..."}and add its callback prefix toALLOWED_REDIRECT_PREFIXES.
Agent instructions: Shiori sends usage instructions automatically via MCP server
instructions. For best results, also paste MEMORY_PROMPT.md into yourAGENTS.md/CLAUDE.mdor custom instructions in Muse and Grok.
Web viewer
Open https://shiori.yourdomain.com/ui and sign in with GitHub (same OAuth App, same OWNER_GITHUB_ID check) to browse your memory timeline, notes, and summaries, and search across both. The viewer is read-only; sessions last 7 days.
MCP Tools
Episodic Memory Tree
Tool | Description |
| Read the logarithmic timeline (recent verbatim, older summarized) at session start |
| Record a 1-line memory (<= 280 bytes); tree compaction runs automatically in the background when a summary LLM is configured |
| Open a |
| (Fallback only, registered when |
Unified Search
Tool | Description |
| Search both episodic memories (FTS5 + substring fallback; opt-in safe regex) and long-form notes (hybrid FTS5 + vector search) in separate sections, or filter with |
Long-form Notes
Tool | Description |
| List Markdown note paths (optional prefix filter) |
| Read a note and its version hash |
| Create or overwrite a note (with optimistic version check) |
| Replace an exact passage in a note |
| Delete a note (recoverable in Git history) |
| Move or rename a note in one commit |
Admin endpoints
Protected by Authorization: Bearer <ADMIN_SECRET>:
GET /admin/grants: list active OAuth client grantsDELETE /admin/grants/<id>: revoke one client grantPOST /admin/reconcile: reconcile the search index with Git (?mode=rebuildfor a full rebuild)POST /admin/memory/forget: drop a bad#lo-hisummary (and ancestors) so it rebuilds from the raw log ({"range":"0-1"})GET /admin/status: inspect embedding & memory-summary health, rate-limit counters, pending compactions, and open alertsPOST /admin/alerts/resolve: clear open alerts (optional?id=<n>or?source=embedding|memory-summary|dlq|reconcile)
Credits & License
Originally forked from YudiG12/second-brain-mcp (MIT) and re-architected for self-hosted Node 24 + SQLite + Docker.
Episodic memory tree inspired by VictorTaelin/OptMem.
Licensed under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory and vector search for AI agents. Hosted, OAuth-protected via Google sign-in.
Secure durable memory and bounded context for AI agents, with hosted OAuth and local Lite support.
One memory for you and your AI agents, shared by ChatGPT, Claude, Gemini, Grok, Codex and Cursor.
Team memory for AI agents: shared notes, reviewed proposals, knowledge gaps. Hosted in Germany.
Related MCP Servers
- AlicenseAqualityBmaintenanceGit-native long-term memory for AI agents: your markdown files are the source of truth, the search index is a disposable projection rebuilt from git, and every memory the agent writes is a reviewable git commit. Served over one OAuth-secured MCP endpoint with hybrid lexical+semantic recall and a gated, git-first commit_note write tool.79AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceProvides durable memory for AI agents with structured storage, semantic search, OAuth authentication, and lifecycle controls.10Apache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides AI coding agents with a persistent memory layer to save, recall, update, and track memories across sessions and repositories using hybrid semantic search.5MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to capture, classify, synthesize, and retrieve persistent knowledge through MCP and REST APIs, so multiple agents can share memory and improve across sessions. It provides full-text, semantic, and hybrid search with token-optimized context retrieval from sources like Obsidian, code, transcripts, and terminal sessions.10 npmMIT