Memory Journal MCP Server
π Full Documentation (Wiki) β’ Changelog β’ Security β’ Release Article
π― AI Context + Project Intelligence: Bridge disconnected AI sessions with persistent project memory and automatic session handoff β with full GitHub workflow integration.
π Quick Deploy:
- npm Package -
npm install -g memory-journal-mcp - Docker Hub - Alpine-based with full semantic search
π§ Stop Experiencing AI Amnesia
When managing large projects with AI assistance, you face a critical challenge:
- Thread Amnesia - Each new AI conversation starts from zero, unaware of previous work.
- Lost Context - Decisions, implementations, and learnings scattered across disconnected threads.
- Repeated Work - AI suggests solutions you've already tried or abandoned.
- Context Overload - Manually copying project history into every new conversation.
Memory Journal solves this by acting as your project's long-term memory, bridging the gap between fragmented AI sessions.
Experience true context-aware development:
- "Why did we choose SQLite over Postgres for this service last month?" (Semantic search)
- "Run the
/issue-triageworkflow on the top priority ticket in the Kanban board." (GitHub operations) - "Who has been touching the auth module recently, and what's our team collaboration density?" (Team analytics)
- "I'm stuck on this database error. Raise a 'blocker' flag for @sarah so her agent sees it next session." (Hush Protocol)
- "Close issue #42 and log an entry explaining our architectural fix for the parsing bug." (Context lifecycles)
- "Draw a visual graph showing how my last 10 architectural decisions relate to each other." (Knowledge graph)
See complete examples & prompts β
π― What Sets Us Apart
73 MCP Tools Β· 19 Workflow Prompts Β· 46 Resources Β· 10 Tool Groups Β· Code Mode Β· GitHub Commander (Issue Triage, PR Review, Milestone Sprints, Security/Quality/Perf Audits) Β· GitHub Integration (Issues, PRs, Actions, Kanban, Milestones, Insights) Β· Team Collaboration (Shared DB, Vector Search, Cross-Project Insights, Hush Protocol Flags)
flowchart TB
subgraph Session["π€ AI Session Start"]
Briefing["π Read Briefing<br/>(memory://briefing)"]
end
subgraph Core["π Journal Operations"]
Create["Create Entry"]
Retrieve["Retrieve & Search"]
Link["Link Entries"]
end
subgraph Search["π Hybrid Search"]
FTS["Keyword (FTS5)"]
Semantic["Semantic (Vector)"]
DateRange["Date Range"]
RRF["Reciprocal Rank Fusion"]
end
subgraph GitHub["π GitHub Integration"]
Issues["Issues & Milestones"]
PRs["Pull Requests"]
Actions["GitHub Actions"]
Kanban["Kanban Boards"]
Insights["Repository Insights"]
end
subgraph Outputs["π Outputs"]
Reports["Standups & Retrospectives"]
Graphs["Knowledge Graphs"]
Timeline["Project Timelines"]
end
Session --> Core
Core --> Search
Core <--> GitHub
Search --> Outputs
GitHub --> Outputs
Suggested Rule (Add to AGENTS.md, GEMINI.md, system prompts, etc.)
π MANDATORY SESSION START ROUTINE
Before addressing the user's first request in a session/thread, complete these steps:
-
Read the briefing using the
read_resourcetool:memory://briefing/{repo_name}.- Infer
repo_namefrom context of user's prompt. Usememory://briefingas fallback only if necessary.
- Infer
-
Your first response MUST begin with the entire briefing content. Use this format:
π Briefing loaded β
{repo_name}{paste ENTIRE briefing here} (It isn't always easy for users to access in IDEs)
-
Then address the user's request below the briefing.
-
Do NOT autonomously resume work on issues mentioned in the briefing.
Tool Filtering
[!IMPORTANT] All shortcuts and tool groups include Code Mode (
mj_execute_code) by default for token-efficient operations. To exclude it, add-codemodeto your filter:--tool-filter starter,-codemode
Control which tools are exposed via MEMORY_JOURNAL_MCP_TOOL_FILTER (or CLI: --tool-filter):
Filter Syntax: shortcut or group or tool_name (whitelist mode) Β· -group (disable group) Β· -tool (disable tool) Β· +tool (re-enable after group disable)
Custom Selection: List individual tool names to create your own whitelist: --tool-filter "create_entry,search_entries,semantic_search"
Groups: core, search, analytics, relationships, io, admin, github, backup, team, codemode
Complete tool filtering guide β
π Core Capabilities
π οΈ 73 MCP Tools (10 Groups)
π― 19 Workflow Prompts
find-related- Discover connected entries via semantic similarityprepare-standup- Daily standup summariesprepare-retro- Sprint retrospectivesweekly-digest- Day-by-day weekly summariesanalyze-period- Deep period analysis with insightsgoal-tracker- Milestone and achievement trackingget-context-bundle- Project context with Git/GitHub/Kanbanget-recent-entries- Formatted recent entriesproject-status-summary- GitHub Project status reportspr-summary- Pull request journal activity summarycode-review-prep- Comprehensive PR review preparationpr-retrospective- Completed PR analysis with learningsactions-failure-digest- CI/CD failure analysisproject-milestone-tracker- Milestone progress trackingconfirm-briefing- Acknowledge session context to usersession-summary- Create a session summary entry with accomplishments, pending items, and next-session contextteam-session-summary- Create a retrospective team session summary entry securely isolated to the team databaseadversarial-plan-review- Multi-pass adversarial plan review with structured dimensions, scoring rubric, and prior plan contextflag-dashboard- Triage active flags with priority assessment and resolution guidance
π‘ 46 Resources (29 Static + 17 Template)
29 Static Resources (appear in resource lists):
memory://briefing- Session initialization: compact context for AI agents (~350 tokens) β includes server version, surface area (tools/resources/prompts), test health, unreleased changes, analytics,localTime, and optionalactiveFlagsmemory://instructions- Behavioral guidance: complete server instructions for AI agentsmemory://recent- 10 most recent entriesmemory://significant- Significant milestones and breakthroughsmemory://graph/recent- Live Mermaid diagram of recent relationshipsmemory://health- Server health & diagnosticsmemory://graph/actions- CI/CD narrative graphmemory://actions/recent- Recent workflow runsmemory://tags- All tags with usage countsmemory://statistics- Journal statisticsmemory://rules- User rules file content for agent awarenessmemory://workflows- Available agent workflows summarymemory://skills- Agent skills index (names, paths, excerpts)memory://github/status- GitHub repository status overviewmemory://github/insights- Repository stars, forks, and 14-day traffic summarymemory://github/milestones- Open milestones with completion percentagesmemory://team/recent- Recent team entries with author attributionmemory://team/statistics- Team entry counts, types, and author breakdownmemory://help- Tool group index with descriptions and tool countsmemory://metrics/summary- Aggregate tool call metrics since server start (calls, errors, token estimates, duration) β HIGH prioritymemory://metrics/tokens- Per-tool token usage breakdown sorted by output token cost β MEDIUM prioritymemory://metrics/system- Process-level metrics: memory (MB), uptime (s), Node.js version, platform β MEDIUM prioritymemory://metrics/users- Per-user call counts (populated when OAuth user identifiers are present) β LOW prioritymemory://audit- Last 50 write/admin tool call entries from the JSONL operational telemetry log (requiresAUDIT_LOG_PATH)memory://flags- Active (unresolved) team flags dashboard (requiresTEAM_DB_PATH)memory://flags/vocabulary- Configured flag vocabulary termsmemory://flags/history- Recently resolved flags with resolution details and avg time-to-resolution (last 7 days)
17 Template Resources (9 base templates + 8 dynamic {repo} variants):
memory://projects/{number}/timeline- Project activity timelinememory://issues/{issue_number}/entries- Entries linked to issuememory://prs/{pr_number}/entries- Entries linked to PRmemory://prs/{pr_number}/timeline- Combined PR + journal timelinememory://kanban/{project_number}- GitHub Project Kanban boardmemory://kanban/{project_number}/diagram- Kanban Mermaid visualizationmemory://milestones/{number}- Milestone detail with completion progressmemory://help/{group}- Per-group tool reference with parameters and annotationsmemory://briefing/{repo}- Context targeted to a specific repository
Note: The memory://github/status, memory://github/insights, memory://github/milestones, and memory://milestones/{number} resources also accept an optional /{repo} path suffix for cross-repo targeting.
β‘ Code Mode: Maximum Efficiency (90% Token Savings)
Code Mode (mj_execute_code) is a revolutionary approach that dramatically reduces token usage by up to 90% and is included by default in all presets. Instead of spending thousands of tokens on sequential tool calls, AI agents use a single sandboxed execution to reason faster.
Code executes in a worker_threads sandbox designed as a secure multi-tenant process isolation environment. All mj.* API calls execute against the journal within the sandbox, providing:
- V8 code generation restrictions β
eval()andFunction()construction from strings disabled at the V8 engine level viacodeGeneration: { strings: false, wasm: false } - Frozen prototypes β all built-in prototypes (Object, Function, Array, Error, etc.) frozen inside the vm context to prevent dynamic constructor chain escapes
- Static code validation β 18 regex rules blocking
require(),process,eval(),Reflect.*,Symbol.*,new Proxy(), and filesystem/network access - Proxy constructor nullified β
Proxy: undefinedin the sandbox prevents meta-object protocol abuse - RPC allowlist β host-side validation prevents workers from invoking unauthorized API methods
- Rate limiting β 60 executions per minute per client
- Hard timeouts β configurable execution limit (default 30s)
- Egress boundary enforcement β result serialization capped to prevent OOM via oversized payloads
- Full API access β all 10 tool groups are available via
mj.*(e.g.,mj.core.createEntry(),mj.search.searchEntries(),mj.github.getGithubIssues(),mj.team.passTeamFlag()) - Strict Readonly Contract β Calling any mutation method under
--tool-filter readonlysafely halts the sandbox to prevent execution, returning a structured{ success: false, error: "..." }response to the agent instead of a raw MCP protocol exception.
β‘ Code Mode Only (Maximum Token Savings)
Run with only Code Mode enabled β a single tool that provides access to all 69 tools' worth of capability through the mj.* API:
{
"mcpServers": {
"memory-journal-mcp": {
"command": "memory-journal-mcp",
"args": ["--tool-filter", "codemode"]
}
}
}
This exposes just mj_execute_code. The agent writes JavaScript against the typed mj.* SDK β composing operations across all 10 tool groups and returning exactly the data it needs β in one execution. This mirrors the Code Mode pattern pioneered by Cloudflare for their entire API: fixed token cost regardless of how many capabilities exist.
Disabling Code Mode
If you prefer individual tool calls, exclude codemode:
{
"args": ["--tool-filter", "starter,-codemode"]
}
π€« Hush Protocol: Asynchronous Team Collaboration
The Hush Protocol reimagines team collaboration for AI-augmented workflows by replacing noisy Slack/Teams messages with structured, machine-actionable flags.
When you encounter a blocker, need a review, or want to broadcast a milestone, your AI agent can raise a flag in the shared Team Database:
- Actionable Visibility: Active flags automatically surface at the very top of the
memory://briefingpayload for all team members. When another developer's agent starts a session, it immediately sees your blockers and can help resolve them autonomously. - Structured Types: Raise specific flag types (
blocker,needs_review,help_requested,fyi). You can customize your team's vocabulary via the--flag-vocabularyconfiguration. - Searchable History: Unlike chat messages that disappear into the void, Hush flags are permanent, query-able AI journal entries. Your agents can search past
needs_reviewflags to understand how architectural blockers were conquered. - Integrated Standup & Retro Signals: Active flags automatically appear as contextual signals in the
prepare-standupandprepare-retroprompts, so your daily standups and sprint retrospectives always surface outstanding blockers. - Full Lifecycle Management: List and filter flags by status, type, or assignee via
team_list_flags. Update metadata (escalate severity, reassign, add links) or reopen resolved flags viateam_update_flag. Track resolution velocity, per-user workload, and trends withteam_get_flag_analytics.
Dashboard & Operations: Read memory://flags for an active dashboard, memory://flags/history for recently resolved flags, use the /flag-dashboard prompt for guided triage with severity grouping and staleness detection, and use mj.team.passTeamFlag() / mj.team.resolveTeamFlag() / mj.team.teamListFlags() / mj.team.teamUpdateFlag() / mj.team.teamGetFlagAnalytics() to manage flags programmatically in Code Mode.
Complete Hush Protocol guide and Mermaid sequence diagrams β
π Quick Start
Option 1: npm (Recommended)
npm install -g memory-journal-mcp
Option 2: From Source
git clone https://github.com/neverinfamous/memory-journal-mcp.git
cd memory-journal-mcp
npm install
npm run build
Add to MCP Config
Add this to your ~/.cursor/mcp.json, Claude Desktop config, or equivalent:
Basic Configuration
{
"mcpServers": {
"memory-journal-mcp": {
"command": "memory-journal-mcp",
"env": {
"GITHUB_TOKEN": "ghp_your_token_here",
"PROJECT_REGISTRY": "{\"my-repo\":{\"path\":\"/path/to/your/git/repo\",\"project_number\":1}}",
"ALLOWED_IO_ROOTS": "/path/to/your/git/repo"
}
}
}
}
Advanced Configuration (Recommended)
Showcasing the full power of the server, including Multi-Project Routing, Team Collaboration, Copilot awareness, and Context Injections.
{
"mcpServers": {
"memory-journal-mcp": {
"command": "memory-journal-mcp",
"env": {
"DB_PATH": "/path/to/your/memory_journal.db",
"TEAM_DB_PATH": "/path/to/shared/team.db",
"GITHUB_TOKEN": "ghp_your_token_here",
"PROJECT_REGISTRY": "{\"my-repo\":{\"path\":\"/path/to/repo\",\"project_number\":1},\"other-repo\":{\"path\":\"/path/to/other\",\"project_number\":5}}",
"ALLOWED_IO_ROOTS": "/path/to/repo,/path/to/other,/path/to/your/skills",
"AUTO_REBUILD_INDEX": "true",
"MEMORY_JOURNAL_MCP_TOOL_FILTER": "codemode",
"CODEMODE_INTERNAL_FULL_ACCESS": "true",
"BRIEFING_ENTRY_COUNT": "3",
"BRIEFING_SUMMARY_COUNT": "1",
"BRIEFING_INCLUDE_TEAM": "true",
"BRIEFING_ISSUE_COUNT": "3",
"BRIEFING_PR_COUNT": "3",
"BRIEFING_PR_STATUS": "true",
"BRIEFING_WORKFLOW_COUNT": "3",
"BRIEFING_WORKFLOW_STATUS": "true",
"BRIEFING_COPILOT_REVIEWS": "true",
"RULES_FILE_PATH": "/path/to/your/RULES.md",
"SKILLS_DIR_PATH": "/path/to/your/skills",
"MEMORY_JOURNAL_WORKFLOW_SUMMARY": "/deploy: prod deployment | /audit: security scan",
"AUDIT_LOG_PATH": "/path/to/your/mcp-audit.jsonl",
"TEAM_AUTHOR": "your_username"
}
}
}
}
π‘ Tip: Optimize your context window! Journal entries (
BRIEFING_ENTRY_COUNT) capture frequent, granular actions (e.g. bug fixes, implementation steps). Session summaries (BRIEFING_SUMMARY_COUNT) surface high-level retrospectives meant to pass strategic context continuously across distinct AI sessions. Use both appropriately to keep the agent briefing highly focused!
π Customizing the Session Briefing
The memory://briefing resource is dynamically assembled at each session start to provide rich, token-efficient ambient context. By default, it automatically surfaces:
- System State: Server version, capability statuses, resource/tool counts, test health, and
memory://metrics/summarybreadcrumbs. - Repository Context: Git working tree status, unreleased changes, exact code-map paths, and prioritized gatekeeper CI workflows.
- Ambient Context: Active workspace paths, local time, analytics, and active Hush Protocol flags.
You control exactly what additional content your agent sees across three dimensions:
Context Injections: Set RULES_FILE_PATH and SKILLS_DIR_PATH to surface user rules and agent skills as companion resources (memory://rules, memory://skills) alongside the briefing.
Repo Targeting: In multi-repo setups, agents read memory://briefing/{repo} to get a briefing scoped to a specific repository registered in PROJECT_REGISTRY.
Minimal (fast sessions) β Reduce briefing to bare essentials for quick interactions:
"BRIEFING_ENTRY_COUNT": "1",
"BRIEFING_SUMMARY_COUNT": "0",
"INSTRUCTION_LEVEL": "essential"
Full Context (onboarding agents) β Maximize context for agents unfamiliar with the project:
"BRIEFING_ENTRY_COUNT": "5",
"BRIEFING_SUMMARY_COUNT": "3",
"BRIEFING_INCLUDE_TEAM": "true",
"BRIEFING_ISSUE_COUNT": "5",
"BRIEFING_PR_COUNT": "3",
"BRIEFING_PR_STATUS": "true",
"BRIEFING_COPILOT_REVIEWS": "true",
"INSTRUCTION_LEVEL": "full"
DevOps-Heavy β Emphasize CI/CD and GitHub state for infrastructure workflows:
"BRIEFING_WORKFLOW_COUNT": "5",
"BRIEFING_WORKFLOW_STATUS": "true",
"BRIEFING_ISSUE_COUNT": "3",
"BRIEFING_PR_COUNT": "3",
"BRIEFING_PR_STATUS": "true",
"BRIEFING_COPILOT_REVIEWS": "true"
Full briefing customization guide β
Variants (modify the config above):
Restart your MCP client and start journaling!
Option 3: HTTP/SSE Transport (Remote Access)
π Security Posture: Stdio vs HTTP
- Stdio (Default): Runs implicitly within the secure boundaries of your local IDE or command-line environment. No explicit authentication is required because the execution context is already trusted.
- HTTP/SSE: Exposes the server over a network socket. By default, HTTP binds ONLY to
localhostand blocks wildcard CORS to prevent unauthorized access and CSRF attacks. Public network binding (--server-host 0.0.0.0) requires explicit authentication (--auth-tokenor--oauth-enabled). The server will throw a fatal error if you attempt to expose it publicly without securing it.
For remote access or web-based clients, run the server in HTTP mode:
memory-journal-mcp --transport http --port 3000
To bind to all interfaces (required for containers) and enable the automated proactive analytics scheduler (e.g. daily digest), you MUST provide an authentication token:
export MCP_AUTH_TOKEN="your_secure_random_token"
memory-journal-mcp --transport http --port 3000 --server-host 0.0.0.0 --digest-interval 1440
Endpoints:
Session Management: The server uses stateful sessions by default. Include the mcp-session-id header (returned from initialization) in subsequent requests.
- OAuth 2.1 β RFC 9728/8414, JWT/JWKS, granular scopes (opt-in via
--oauth-enabled) - 7 Security Headers β CSP, HSTS (opt-in), X-Frame-Options, and more
- Rate Limiting β 100 req/min per IP Β· CORS β configurable multi-origin (exact-match) Β· 1MB body limit
- Server Timeouts β Request (120s), keep-alive (65s), headers (66s) Β· 404 handler Β· Cross-protocol guard
- Build Provenance Β· SBOM Β· Supply Chain Attestations Β· Non-root execution
Example with curl:
Initialize session (returns mcp-session-id header):
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
List tools (with session):
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "mcp-session-id: YOUR_SESSION_ID" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
Stateless Mode (Serverless)
For serverless deployments (Lambda, Workers, Vercel), use stateless mode:
memory-journal-mcp --transport http --port 3000 --stateless
Automated Scheduling (HTTP Only)
When running in HTTP/SSE mode, enable periodic maintenance jobs with CLI flags. These jobs run in-process on setInterval β no external cron needed.
Note: These flags are ignored for stdio transport because stdio sessions are short-lived (tied to your IDE session). For stdio, use OS-level scheduling (Task Scheduler, cron) or run the backup/cleanup tools manually.
memory-journal-mcp --transport http --port 3000 \
--backup-interval 60 --keep-backups 10 \
--vacuum-interval 1440 \
--rebuild-index-interval 720
Each job is error-isolated β a failure in one job won't affect the others. Scheduler status (last run, result, next run) is visible via memory://health.
GitHub Integration Configuration
The GitHub tools (get_github_issues, get_github_prs, etc.) auto-detect the repository from your git context when PROJECT_REGISTRY is configured or the MCP server is run inside a git repository.
Multi-Project Workflows: For agents to seamlessly support multiple projects, provide PROJECT_REGISTRY.
Dynamic Context Resolution & Auto-Detection
When executing GitHub tools (issues, PRs, context, etc.), the server resolves repository context in this order:
- Dynamic Project Routing: If the agent passes a
repostring that matches a key in yourPROJECT_REGISTRY, the server dynamically mounts the physical directory mapped to that project. It executes git commands locally and automatically infers theowner. - Explicit Override: If the agent provides both
ownerandrepoexplicitly, those values override auto-detection for API calls. - Missing Context: Without
PROJECT_REGISTRYor explicit parameters, the server blocks execution and returns{requiresUserInput: true}to prompt the agent.
Automatic Project Routing (Kanban / Issues)
When opening an issue or viewing/moving a Kanban card, the server needs a GitHub Project number. It determines this via:
- Exploring the raw
project_numberargument passed by the agent. - Checking if the
repostring precisely matches an entry in yourPROJECT_REGISTRY, seamlessly mapping it to its pre-configuredproject_number. - Falling back to the globally defined
DEFAULT_PROJECT_NUMBERif set.
π OAuth 2.1 Authentication
For production deployments, enable OAuth 2.1 authentication on the HTTP transport:
Supported Scopes:
Quick Start:
memory-journal-mcp --transport http --port 3000 \
--oauth-enabled \
--oauth-issuer https://auth.example.com/realms/mcp \
--oauth-audience memory-journal-mcp \
--oauth-jwks-uri https://auth.example.com/realms/mcp/protocol/openid-connect/certs
Or via environment variables:
export OAUTH_ENABLED=true
export OAUTH_ISSUER=https://auth.example.com/realms/mcp
export OAUTH_AUDIENCE=memory-journal-mcp
export OAUTH_CLOCK_TOLERANCE=5
memory-journal-mcp --transport http --port 3000
Note: OAuth is opt-in. When not enabled, the server falls back to simple token authentication via
MCP_AUTH_TOKENenvironment variable, or runs without authentication.
π Session Management
- Session start β agent reads
memory://briefing(ormemory://briefing/{repo}) and shows project context - Session summary β use
/session-summaryto capture progress and next-session context - Next session's briefing includes the previous summary β context flows seamlessly
π§ Configuration
GitHub Integration (Optional)
export GITHUB_TOKEN="your_token" # For Projects/Issues/PRs
Scopes: repo, project, read:org (org-level project discovery only)
GitHub Management Capabilities
Memory Journal provides a hybrid approach to GitHub management:
MCP Server Tools (Read + Kanban + Milestones + Issue Lifecycle):
get_github_issues/get_github_issue- Query issuesget_github_prs/get_github_pr- Query pull requestsget_github_context- Full repository contextget_kanban_board/add_kanban_item/move_kanban_item/delete_kanban_item- Kanban managementget_github_milestones/get_github_milestone- Milestone tracking with completion %create_github_milestone/update_github_milestone/delete_github_milestone- Milestone CRUDget_repo_insights- Repository traffic & analytics (stars, clones, views, referrers, popular paths)create_github_issue_with_entry/close_github_issue_with_entry- Issue lifecycle with journal linking
Why this design? The MCP server focuses on value-added features that integrate journal entries with GitHub (Kanban views, Milestones, timeline resources, context linking). Standard GitHub mutations (create/close issues, merge PRs, manage releases) are handled directly by agents via
ghCLI.
Complete GitHub integration guide β
GitHub Commander Workflows
The server natively bundles the github-commander agent skill (accessible via memory://skills/github-commander). This extends your AI assistant with 9 autonomous DevOps workflows for repository stewardship: Issue Triage, Milestone Sprints, PR Reviews, Copilot Audits, Security Audits, Code Quality Audits, Performance Audits, Roadmap Kickoffs, and Dependency Updates. Configure validation layers using the PROJECT_* environment overrides to enforce CI-matching execution locally during agent tasks!
ποΈ Architecture
Data Flow
flowchart TB
AI["π€ AI Agent<br/>(Cursor, Windsurf, Claude)"]
subgraph MCP["Memory Journal MCP Server"]
Tools["π οΈ 73 Tools"]
Resources["π‘ 46 Resources"]
Prompts["π¬ 19 Prompts"]
end
subgraph Storage["Persistence Layer"]
SQLite[("πΎ SQLite<br/>Entries, Tags, Relationships")]
Vector[("π Vector Index<br/>Semantic Embeddings")]
Backups["π¦ Backups"]
end
subgraph External["External Integrations"]
GitHub["π GitHub API<br/>Issues, PRs, Actions"]
Kanban["π Projects v2<br/>Kanban Boards"]
end
AI <-->|"MCP Protocol"| MCP
Tools --> Storage
Tools --> External
Resources --> Storage
Resources --> External
Stack
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Server Layer (TypeScript) β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββ β
β β Tools (73) β β Resources (47) β β Prompts (19)β β
β β with Annotationsβ β with Annotationsβ β β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Native SQLite Engine β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββ β
β β better-sqlite3 β β sqlite-vec β β transformersβ β
β β (High-Perf I/O) β β (Vector Index) β β (Embeddings)β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β SQLite Database with Hybrid Search β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β entries + tags + relationships + embeddings + backups ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π§ Technical Highlights
Performance & Portability
- TypeScript + Native SQLite - High-performance
better-sqlite3with synchronous I/O - sqlite-vec - Vector similarity search via SQLite extension
- @huggingface/transformers - Local ML embedding models in JavaScript
- Background Warmup - Model weights (~23MB) are loaded into memory asynchronously on server startup to avoid first-request latency. If the server is invoked before warmup completes, the first semantic search or vector insertion will incur a network-bound cold start (~1.5s - 3s) while the weights are cached locally.
Performance Benchmarks
Memory Journal is designed for extremely low overhead during AI task execution. We include a vitest bench suite to maintain these baseline guarantees:
- Database Reads: Operations execute in fractions of a millisecond.
calculateImportanceis ~13-14x faster than retrieving 50 recent entries. - Vector Search Engine: Both search (~140-220 ops/sec) and indexing (~1600-1900+ ops/sec) are high-throughput via
sqlite-vecwith SQL-native KNN queries. - Core MCP Routines:
getToolsuses cached O(1) dispatch (~4800-7000x faster thanget_recent_entries).create_entryandsearch_entriesexecute through the full MCP layer with sub-millisecond overhead.
To run the benchmarking suite locally:
npm run bench
Testing
Extensively tested across two frameworks:
npm test # Unit + integration tests
npm run test:e2e # End-to-end HTTP/SSE transport tests
Security
- Deterministic error handling - Every tool returns structured
{success, error, code, category, suggestion, recoverable}responses with actionable context β no raw exceptions, no silent failures, no misleading messages - Local-first - All data stored locally, no external API calls (except optional GitHub)
- Input validation - Zod schemas, content size limits, SQL injection prevention
- Path traversal protection - Backup filenames validated
- MCP 2025-03-26 annotations - Behavioral hints (
readOnlyHint,destructiveHint, etc.) - HTTP transport hardening - 7 security headers, configurable multi-origin CORS, 1MB body limit, built-in rate limiting (100 req/min), server timeouts, HSTS (opt-in), 30-min session timeout, 404 handler, cross-protocol guard
- Token scrubbing - GitHub tokens and credentials automatically redacted from error logs
Data & Privacy
- Single SQLite file - You own your data
- Portable - Move your
.dbfile anywhere - Soft delete - Entries can be recovered
- Auto-backup on restore - Never lose data accidentally
π Documentation & Resources
- GitHub Wiki - Complete documentation
- Copilot Setup Guide - Cross-agent memory bridge between IDE agents and GitHub Copilot
- Deployment Guide - CI/CD pipeline, environments, and version bump checklist
- Docker Hub - Container images
- npm Package - Node.js distribution
- Issues - Bug reports & feature requests
π License
MIT License - See LICENSE file for details.
π€ Contributing
Built by developers, for developers. PRs welcome! See CONTRIBUTING.md for guidelines.