ai-notes-sync
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.
ai-notes-sync
One Git-backed home for everything your AI assistants write down, and a record of which app, model and setting made each change.
Claude Code, Codex, Antigravity and other assistants each keep useful notes (memories, plans, session summaries, project instructions) in their own hidden folders. None of them can see the others' notes, and none records who changed what.
ai-notes-sync works with Basic Memory, a local, open-source Markdown knowledge base with an MCP server, and adds four things:
Collect: copies each AI app's own notes into your vault, sorted into readable folders, and keeps the copies up to date.
Attribute: a small MCP relay sits between each app and Basic Memory and records which app changed which note, plus the model and settings.
Version: commits every change to Git, one commit per app and model setup, so
git logand GitHub show who changed what. Every AI edit is also logged to a JSONL file for later evaluation.Guard: when every AI reads the same notes, one poisoned note can steer all of them. Suspicious AI edits and imports are held back in a quarantine no AI can read, until you decide.
Everything runs on your machine. The only network traffic is git push to a remote you choose (or none).
What a commit looks like
Author: Claude Code (claude-opus-5-5, effort high) <claude-code@ai-notes.local>
Claude Code (claude-opus-5-5, effort high): changed 1 note(s)
- notes/projects/site/Deploy checklist.md
AI-App: Claude Code
AI-Model: claude-opus-5-5
AI-Reasoning-Effort: high
AI-Evidence: verified
AI-App-Version: 2.1.317
AI-Session: a064c882-…AI-Evidence says how much to trust the model details:
Evidence | Meaning | Apps |
| Read from the app's own log of that exact tool call | Claude Code, Codex |
| What the AI said about itself in the tool call's | any app |
| The AI didn't say; the app is still recorded | any app |
MCP tells a server which app is connected, but not which model, so the relay can always name the app. The model comes from the app's log or from the AI itself.
Related MCP server: memwiki
Prompt-injection guard
Shared notes are a shared attack surface: an agent reads a web page, saves a summary with an embedded instruction, and every other assistant that searches the notes later reads it. In one reported case (basic-memory#1156) an AI replaced a memory file with injected-looking text.
Layers, from the outside in:
Layer | What it does |
Rule |
|
Scan | Each sync checks the new text of AI edits and imports for instruction overrides, role markup ( |
Quarantine | A high-severity finding moves the note to |
Large deletions | An AI edit that keeps less than 40% of a note is held back the same way. |
Protected files | AIs can't change or delete |
Read-only apps | Apps listed in |
Undo |
|
Your own edits are scanned and warned about, never moved. Review what was held back:
ai-notes-sync review # what, when, which app/model, why
ai-notes-sync review --approve notes/x.md # put it back; approved content isn't flagged again
ai-notes-sync review --discard notes/x.md
ai-notes-sync scan # check the whole vault, changes nothingThis raises the bar; it doesn't make injection impossible. Pattern lists miss new phrasings, and an agent with shell access (Claude Code, Codex) can write files directly, around the relay. Those writes are still versioned, attributed to you, scanned and warned about, and can be undone with Git.
Vault layout
~/basic-memory/
notes/ notes the AIs and you write, by topic
imported/ copies, refreshed automatically; don't edit
claude-code/<project>/ Claude Code memory per project
codex/{memory,sessions/<month>,skills,notes}/
antigravity/<month>/<date title>/ one folder per conversation
instructions/<project>/ CLAUDE.md, AGENTS.md, GEMINI.md
.ai-notes/edits.jsonl one line per AI edit: time, app, model, effort, evidence, files
.ai-notes/guard.jsonl what the guard quarantined, restored or warned about
.quarantine/ notes held back for review; invisible to the AIsAntigravity's scratch files and saved web pages (.system_generated/) are skipped: they're noise and can contain tokens.
Install
Requires Python 3.9+, Git and uv. Tested on macOS; the core works on Linux.
uv tool install basic-memory --prerelease=allow
uv tool install git+https://github.com/mariomarcolongo/ai-notes-syncMake the vault a Git repository (optionally with a private remote):
basic-memory project list # creates ~/basic-memory on first run
git -C ~/basic-memory init -b main
gh repo create ai-notes --private --source ~/basic-memory --remote origin # optionalConnect your AI apps to the relay. Each command shows what it would change and changes nothing until you add --apply. Every file is backed up first.
ai-notes-sync apps # preview
ai-notes-sync apps --apply # Claude Desktop, Claude Code, Codex, Cursor, VS Code, Antigravity…
ai-notes-sync rules --apply # tell the AIs to search first, file notes properly and report their model
ai-notes-sync schedule --every 2Restart the apps. Copy docs/filing-guide.md to ~/basic-memory/notes/Filing guide.md (or write your own) so the AIs know where to put notes.
Commands
Command | What it does |
| import, commit per author, pull, push (what the timer runs) |
| just one of the steps |
| the MCP relay an app runs instead of Basic Memory |
| connect apps to the relay |
| add the shared-notes rule to global AI instructions |
| timer (launchd on macOS, a cron line elsewhere) |
| edits per app, model, reasoning effort and evidence |
| notes held back by the guard |
| check notes for injection patterns without changing anything |
| revert one app's (or model's) commits |
| settings in use |
Settings
Optional, in ~/.config/ai-notes-sync/config.json:
{
"vault": "~/basic-memory",
"project_roots": ["~/Code", "~/Projects"],
"sources": {"claude_code": true, "codex": true, "antigravity": true, "instructions": true},
"git_push": true,
"guard": true,
"protected": ["notes/Filing guide.md", "README.md"],
"read_only_apps": ["antigravity"],
"shrink_ratio": 0.4,
"notify": true
}project_roots are the folders searched (one level deep) for CLAUDE.md, AGENTS.md and GEMINI.md.
Limits
Model details depend on the app. Only Claude Code and Codex keep logs that can be checked. Elsewhere it's the AI's word.
Edits made without the relay (by hand, in Obsidian, or by an app not connected) are committed under your Git name.
Apps that keep notes only in the cloud (ChatGPT, the Gemini app, Claude Desktop chats) can't be collected, and can only use local MCP servers if the app supports them.
The guard is a filter, not a proof. See Prompt-injection guard.
Copies are one-way. Editing a file in
imported/doesn't change the original, and the next change to the original overwrites it.Sensitive content. Notes can contain personal data. Use a private remote, or none.
Related projects
Basic Memory: the knowledge base this builds on. Its maintainers plan native revision history (see their issue #1156); if it lands with authorship, part of this tool becomes unnecessary.
GitMemo: captures AI conversations, clipboard and notes into a Git repo. Broader capture; no per-edit model attribution.
License
Apache-2.0. Created by Mario Marcolongo; if you redistribute it, keep the NOTICE file. To cite it, use CITATION.cff (GitHub's "Cite this repository").
This server cannot be deployed
Maintenance
Related MCP Connectors
Notes and memory assistant: one Markdown vault that Claude, ChatGPT and any MCP client can share.
One memory, every AI. A shared, user-owned markdown memory your AI clients read and write over MCP.
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that gives AI agents bounded, auditable access to propose changes to an Obsidian vault stored in GitHub, with per-agent expiring tokens, read/write/deny path policies, mutability rules, frontmatter checks, and human-reviewed proposal branches.590 npm2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables multiple AI coding agents to share one Obsidian-compatible Markdown knowledge vault over MCP, letting them retrieve context, search, read, write, merge, lint, and verify linked pages with drift and secret detection. Supports git-based sync, local credential storage, and human editing in Obsidian or VS Code.1MIT
- AlicenseNot gradedqualityBmaintenanceServes a git-backed folder of Markdown notes over MCP so AI agents can search, read, write, move and delete them, with every write recorded as a git commit attributed to the calling client. Supports full-text section search with snippets, wikilinks and typed relations, LFS-backed searchable attachments, optimistic concurrency for multiple agents, and per-client token or OAuth 2.1 access.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables people and AI assistants to share one persistent Markdown-in-Git memory, so any MCP client can load current context, save sessions and decisions, search notes, and work from a team's real knowledge across machines.5 npmAGPL 3.0