Curated local Markdown memory for Codex, Claude Code, and Claude Desktop Cowork.
Agent Markdown Link connects AI agents to explicitly chosen, Obsidian-compatible Markdown notes. It loads curated startup context, offers bounded lexical search when more recall is needed, and stores accepted durable captures as new immutable memory records. It never edits canonical summaries.
Obsidian is optional. It is a convenient editor and review surface, but Agent Markdown Link works while Obsidian is closed or not installed.
Node.js 22 or newer is required.
# Codex
codex plugin marketplace add SSanderV/agent-markdown-link
codex plugin add agent-markdown-link@agent-markdown-link
# Claude Code or Claude Desktop
claude plugin marketplace add SSanderV/agent-markdown-link
claude plugin install agent-markdown-link@agent-markdown-link
Codex users must review and trust both the SessionStart and PreToolUse
hooks. The trusted PreToolUse hook authorizes memory tools only for the
active mapped workspace. Review any Claude hook prompt as well, then start a
new session after installation.
Ask your agent:
Initialize Agent Markdown Link for this workspace.
The bundled skill locates the guided init wizard. You choose the vault, workspace mapping, context files, search roots, an existing automatic-memory folder (or legacy review Inbox), and whether that project should be available to unmapped Cowork sessions. New setups default to automatic memory. The wizard validates the configuration, writes only the local config file, and refuses to overwrite an existing one.
From a source checkout, run the wizard directly:
# macOS/Linux
./node_modules/.bin/agent-markdown init
# Windows PowerShell
.\node_modules\.bin\agent-markdown.cmd init
See Installation for configuration locations, manual setup, upgrades, rollback, and uninstall instructions.
- A project mapping selects ordered context files and optional search roots inside one local Markdown vault.
- Both plugins bundle the same shared host-aware MCP runtime for context,
search, and capture. Codex receives curated context at session start, and
its trusted
PreToolUsehook authorizes each MCP call for the active workspace. Claude's startup reminder loads context through MCP. - Agents search configured roots plus the shared automatic-memory folder when startup context is insufficient.
- In the default memory mode, accepted captures become new immutable Markdown records and are searchable immediately. Legacy Inbox review remains opt-in.
Codex selects the MCP project from the trusted workspace supplied to its
PreToolUse hook and requires an exact mapping. The hook adds a private,
one-time authorization that is bound to one tool call and expires after 10
minutes. Codex ignores defaultProjectId. Claude selects from
CLAUDE_PROJECT_DIR when present, otherwise the process working directory.
Exact mappings win, and only Claude may use an explicitly configured default
project when no exact mapping exists. Ambiguous mappings reject for both
hosts.
Claude Desktop uses the bundled local MCP server, allowing Cowork to reach the same host configuration and vault as Claude Code. Cowork sessions without the Desktop local bridge cannot access the local vault.
In Codex, startup context and search are MCP read actions. capture is an MCP
write action and should prompt by default. The authorization hook does not
approve capture. Codex applies the user-managed MCP approval policy after the
hook rewrites the tool input. Configure that policy in your trusted Codex
configuration as described in Installation, then approve
each intended capture.
- No automatic network, Git, Obsidian, sync, delete, or promotion activity.
- No direct edits to canonical summaries; memory writes create new records and never overwrite notes.
- Search, context, and candidate inputs and outputs are bounded.
- Workspace mappings authorize local access. Codex requires an exact mapping and a valid one-time hook authorization. If the Codex authorization hook is untrusted or disabled, MCP calls fail closed. Unmapped Claude sessions also fail closed unless the operator explicitly selects a Claude-only default project inside the same trust boundary. The shared automatic-memory folder is searchable only after that host-specific project selection succeeds.
- Errors are sanitized and do not block the host session.
Vault files and configuration remain local plaintext. Protect the device, vault, backups, and any sync provider. Agent hosts may retain or transmit tool calls under their own policies; see Security and Privacy for the precise boundary.
| Command | Purpose |
|---|---|
init |
Interactively create a validated, no-overwrite configuration. |
context |
Read configured context files in order. |
search |
Search configured Markdown roots and the shared memory folder using one bounded JSON request on standard input. |
capture |
Store one durable memory record (or a legacy review candidate) from a bounded JSON request on standard input. |
Use --config <absolute-path> before a command to select a non-default configuration. See the synthetic example configuration for the JSON shape.
Licensed under Apache-2.0. This independent project is not affiliated with Obsidian, OpenAI, or Anthropic.