Sign inSign up

writenotenow/memory-journal-mcp

By writenotenow

โ€ขUpdated 4 months ago

MCP Server- AI Memory with Code Mode, GitHub Integration, Hush, Knowledge Graphs, Search, Audit Log.

Image
Machine learning & AI
Developer tools
Databases & storage
1

10K+

writenotenow/memory-journal-mcp repository overview

โ Memory Journal MCP Server

GitHub Docker Pulls License: MIT Status npm Security GitHub Stars TypeScript Coverage Tests E2E Tests CI

๐ŸŽฏ Persistent AI project memory. Bridge disconnected sessions and auto-resume context seamlessly.

GitHubโ  โ€ข Wikiโ  โ€ข Changelogโ  โ€ข Release Articleโ 

โ ๐Ÿง  Stop Experiencing AI Amnesia

When managing large projects with AI assistance, you face a critical challenge:

  • Thread Amnesia - Each new 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.

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-triage workflow 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)

FeatureDescription
Session IntelligenceAgents auto-query project history, create entries at checkpoints, and hand off context between sessions via /session-summary and team-session-summary
GitHub Integration18 tools for Issues, PRs, Actions, Kanban, Milestones (%), Copilot Reviews, and 14-day Insights
Dynamic Project RoutingSwitch contexts across multiple repositories using a single server instance via PROJECT_REGISTRY
Knowledge Graphs8 relationship types linking specs โ†’ implementations โ†’ tests โ†’ PRs with Mermaid visualization
Hybrid SearchReciprocal Rank Fusion combining FTS5, semantic vector similarity, heuristics, and date filters
Code ModeExecute multi-step operations in a secure sandbox โ€” up to 90% token savings via mj.* API
Adaptive Session Briefingmemory://briefing dynamically adapts to deliver real-time workspace context โ€” including live CI health, local Git status, dynamic path routing, and unreleased changes โ€” in ~350 optimized tokens
Reports & AnalyticsStandups, retrospectives, PR summaries, digests, period analyses, and milestone tracking
Hush Protocol (Flags)Replace Slack/Teams noise with structured, actionable, and searchable AI flags (blockers, reviews) that automatically surface in session briefings
Team Collaboration28 tools with full parity โ€” CRUD, vector search, relationship graphs, cross-project insights, matrix, author attribution, Hush Protocol flags (list, update, reopen, analytics)
Data InteroperabilityMarkdown roundtripping, unified IO namespace, and JSON exports with hard path traversal defenses
Backup & RestoreOne-command backup/restore with automated scheduling, retention policies, and safety-net auto-backups
Auto-PruningSmart garbage collection based on significance scores to soft-delete low-value entries and maintain vector relevance over long-running projects
Security & TransportOAuth 2.1 (RFC 9728/8414, JWT/JWKS, scopes), Streamable HTTP + SSE, rate limiting, CORS, SQL injection prevention, non-root Docker
Structured Error HandlingEvery tool returns {success, error, code, category, suggestion, recoverable} โ€” agents get classification, remediation hints, and recoverability signals
Agent CollaborationIDE agents and Copilot share context; review findings become searchable knowledge; agents suggest reusable rules and skills (setupโ )
Native Agent SkillsBundled foundational coding paradigms (autonomous-dev, python, docker, tailwind-css, golang, playwright-standard, etc.) establishing permanent AI behavior and architecture rules
GitHub CommanderSkills for issue triage, PR reviews, sprint milestones, and security/quality/performance audits with journal trails (docsโ )

Suggested Rule (Add to AGENTS.md, GEMINI.md, system prompts, etc.)

View Mandatory Session Start Routine

๐Ÿ›‘ MANDATORY SESSION START ROUTINE

Before addressing the user's first request in a session/thread, complete these steps:

  1. Read the briefing using the read_resource tool: memory://briefing/{repo_name}.

    • Infer repo_name from context of user's prompt. Use memory://briefing as fallback only if necessary.
  2. 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)

  3. Then address the user's request below the briefing.

  4. 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 `-codemode` to your filter: `--tool-filter starter,-codemode`

Control which tools are exposed via MEMORY_JOURNAL_MCP_TOOL_FILTER (or CLI: --tool-filter):

FilterToolsUse Case
full73All tools (default)
starter~11Core + search + codemode
essential~7Minimal footprint
readonly17Disable all mutations
-github52Exclude a group
-github,-analytics50Exclude multiple groups

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)
GroupToolsDescription
codemode1Code Mode (sandboxed code execution) ๐ŸŒŸ Recommended
core6Entry CRUD, tags, test
search4Text search, date range, semantic, vector stats
analytics2Statistics, cross-project insights
relationships2Link entries, visualize graphs
io3JSON/Markdown export and File-level Markdown Data Integration Interoperability (Import/Export)
admin5Update, delete, rebuild/add to vector index, merge tags
github18Issues, PRs, context, Kanban, Milestones, Insights, issue lifecycle, Copilot Reviews
backup4Backup, list, restore, cleanup
team28CRUD, search, stats, relationships, IO (Markdown import/export), backup, vector search, cross-project insights, matrix, Hush Protocol flags (requires TEAM_DB_PATH)

Complete tools reference โ†’โ 

โ ๐ŸŽฏ 19 Workflow Prompts

Standups, retrospectives, PR summaries, weekly digests, period analysis, milestone tracking, context bundles, session summaries, adversarial plan reviews, and flag triage dashboards. Complete prompts guide โ†’โ 

โ ๐Ÿ“ก 46 Resources (29 Static + 17 Template)

29 static resources (memory://briefing, memory://workflows, memory://rules, memory://health, memory://help, memory://flags, memory://flags/vocabulary, memory://flags/history, GitHub status/insights, team stats, and more) plus 17 template resources for dynamic briefings (memory://briefing/{repo}), project timelines, issue/PR entries, Kanban boards, milestone details, and per-group help. Resources documentation โ†’โ 

โ โšก 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 with multiple layers of security. All mj.* API calls execute against the journal within the sandbox, providing:

  • Static code validation โ€” blocked patterns include require(), process, eval(), and filesystem access
  • Rate limiting โ€” 60 executions per minute per client
  • Hard timeouts โ€” configurable execution limit (default 30s)
  • 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 readonly safely halts the sandbox to prevent execution, returning a structured error response to the agent instead of a raw MCP protocol exception.

โ ๐Ÿคซ 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://briefing payload 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-vocabulary configuration.
  • 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_review flags to understand how architectural blockers were conquered.
  • Full Lifecycle Management: List and filter flags by status, type, or assignee. Update metadata (escalate severity, reassign, add links). Reopen resolved flags. Track resolution velocity and team workload with built-in analytics.
  • Resolution History: Read memory://flags/history to see recently resolved flags with resolution times and details.

Complete Hush Protocol guide and Mermaid sequence diagrams โ†’โ 

โ ๐Ÿš€ Quick Start (2 Minutes)

Prerequisites: Docker installed and running ยท ~250MB disk space ยท Full Installation Guide โ†’โ 

โ 1. Pull the Image
docker pull writenotenow/memory-journal-mcp:latest
โ 2. Create Data Directory
mkdir data
โ 3. Add to MCP Config

Add this to your ~/.cursor/mcp.json, Claude Desktop config, or equivalent:

โ Basic Configuration
{
  "mcpServers": {
    "memory-journal-mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "./data:/app/data",
        "-e",
        "GITHUB_TOKEN",
        "-e",
        "PROJECT_REGISTRY={\"my-repo\":{\"path\":\"/app/repo\",\"project_number\":1}}",
        "-v",
        "/path/to/your/repo:/app/repo:ro",
        "writenotenow/memory-journal-mcp:latest"
      ],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here",
        "ALLOWED_IO_ROOTS": "/app/repo"
      }
    }
  }
}

Showcasing the full power of the server, including Multi-Project Routing, Team Collaboration, Copilot awareness, and Context Injections.

{
  "mcpServers": {
    "memory-journal-mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "./data:/app/data",
        "-e",
        "GITHUB_TOKEN",
        "-v",
        "/path/to/shared/team.db:/app/data/team.db:rw",
        "-v",
        "/path/to/your/projects:/app/projects:ro",
        "-v",
        "/path/to/rules.md:/app/rules.md:ro",
        "-v",
        "/path/to/skills:/app/skills:ro",
        "writenotenow/memory-journal-mcp:latest"
      ],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here",
        "TEAM_DB_PATH": "/app/data/team.db",
        "PROJECT_REGISTRY": "{\"my-repo\":{\"path\":\"/app/projects/repo1\",\"project_number\":1},\"other-repo\":{\"path\":\"/app/projects/repo2\",\"project_number\":5}}",
        "ALLOWED_IO_ROOTS": "/app/projects,/app/data,/app/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": "1",
        "BRIEFING_PR_COUNT": "1",
        "BRIEFING_PR_STATUS": "true",
        "BRIEFING_WORKFLOW_COUNT": "1",
        "BRIEFING_WORKFLOW_STATUS": "true",
        "BRIEFING_COPILOT_REVIEWS": "true",
        "RULES_FILE_PATH": "/app/rules.md",
        "SKILLS_DIR_PATH": "/app/skills",
        "MEMORY_JOURNAL_WORKFLOW_SUMMARY": "/deploy: prod deployment | /audit: security scan",
        "AUDIT_LOG_PATH": "/app/data/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, automatically providing ambient context like test health, workspace paths, unreleased changes, and git status. Control what your agent sees by tuning three dimensions via environment variables:

  • Depth โ€” INSTRUCTION_LEVEL: essential, standard (default), or full
  • Journal Content โ€” BRIEFING_ENTRY_COUNT, BRIEFING_SUMMARY_COUNT, BRIEFING_INCLUDE_TEAM
  • GitHub Enrichment โ€” BRIEFING_ISSUE_COUNT, BRIEFING_PR_COUNT, BRIEFING_PR_STATUS, BRIEFING_MILESTONE_COUNT, BRIEFING_WORKFLOW_COUNT, BRIEFING_WORKFLOW_STATUS, BRIEFING_COPILOT_REVIEWS

Set RULES_FILE_PATH and SKILLS_DIR_PATH to surface agent rules and skills as companion resources. In multi-repo setups, agents read memory://briefing/{repo} for repo-scoped context.

Full briefing customization guide with presets โ†’โ 

Variants (modify the config array above):

  • Minimal: Remove -e GITHUB_TOKEN, repo mount, and env block.
  • Team: Add -e "TEAM_DB_PATH=/app/data/team.db".
  • Code Mode: Add "--tool-filter", "codemode".
  • Briefing: Add -e "BRIEFING_ENTRY_COUNT=5".
โ 4. Restart & Journal!

Restart Cursor or your MCP client and start journaling!

โ 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.

For a complete list of all 30+ environment variables (including remote HTTP scheduling, payload truncations, context injection parameters, flag vocabulary, and audit logging), please refer to the Official Configuration Resourceโ  in our Wiki.

Multi-Project Workflows: For agents to seamlessly support multiple projects, provide PROJECT_REGISTRY.

โ Context Resolution & Project Routing

Context resolution order: Dynamic PROJECT_REGISTRY routing โ†’ explicit owner/repo โ†’ blocks with {requiresUserInput: true}. Kanban/issue project numbers resolve via passed argument โ†’ PROJECT_REGISTRY lookup โ†’ global DEFAULT_PROJECT_NUMBER.

Full routing & auto-detection docs โ†’โ 

โ ๐Ÿ”„ Session Management
  1. Session start โ†’ agent reads memory://briefing (or memory://briefing/{repo}) and shows project context
  2. Session summary โ†’ use /session-summary to capture progress and next-session context
  3. Next session's briefing includes the previous summary โ€” context flows seamlessly
โ HTTP/SSE Transport (Remote Access)

For remote access, web-based clients, or HTTP-compatible MCP hosts. The server supports both stateful (SSE) and stateless (serverless) modes.

docker run --rm -p 3000:3000 \
  -v ./data:/app/data \
  writenotenow/memory-journal-mcp:latest \
  --transport http --port 3000 --server-host 0.0.0.0
  • Features: OAuth 2.1, 7 Security Headers, Rate Limiting, CORS, and more.
  • Stateless Mode: Add --stateless to the command above.

See the full HTTP/SSE Transport & Endpoints documentation in the Wiki โ†’โ 

โ Automated Scheduling (HTTP Only)

Enable periodic maintenance jobs (--backup-interval, --vacuum-interval, --rebuild-index-interval, --digest-interval) for long-running HTTP containers. See the full scheduling documentation in the Wiki โ†’โ 

โ ๐Ÿ” OAuth 2.1 Authentication

For production deployments, enable full OAuth 2.1 support on the HTTP transport (opt-in via --oauth-enabled). Features include RFC 9728/8414 discovery, JWKS token validation, and granular scopes.

See the OAuth 2.1 Setup Guide in the Wiki โ†’โ 

โ ๐Ÿ”ง Configuration

All detailed setup and configuration guides are available in our Wiki.

Complete Configuration Documentation โ†’โ 

โ ๐Ÿ“„ License

MIT License - See LICENSEโ 

Migrating from v2.x? Your existing database is fully compatible.

Tag summary

Content type

Image

Digest

sha256:d42ae8132โ€ฆ

Size

254 MB

Last updated

4 months ago

docker pull writenotenow/memory-journal-mcp