pathmark
Pathmark provides a local-first, shared memory layer for AI agents (Codex, Claude Code, Gemini CLI, Cursor, etc.) to store, retrieve, and manage context persistently across sessions — no account, API key, or cloud backend required.
Core memory operations:
remember— store durable text-based memory items with optional tags and source labelscreate_conclusion— save higher-signal decisions or preferences treated with more weight than raw memoriessearch_memory— find memories by query, tags, or kind (memory vs. conclusion)recall_memory— retrieve detailed context with metadataget_context— fetch compact, relevant context for a specific tasklist_conclusions— browse all saved durable conclusionsask_memory/chat— retrieve relevant context for a question and optionally synthesize an answer via a local CLI, Codex, or OpenAI-compatible API (chatexplicitly returns which memories were used)
Memory management:
delete_memory— soft-delete a record by IDupdate_memory— correct records with version historysupersede_memory— replace outdated records with linked current onespurge_memory— permanently remove recordscompact_memory— deduplicate and clean up the storedoctor_memory— report store healthbackup_memory— create point-in-time backupsexport_memory— export scoped, optionally encrypted bundles
Configuration & integration:
get_config— view store location and enabled featuresActs as a shared memory bus across multiple AI tools, supporting auto-capture, proactive recall injection, and import of legacy JSONL memory stores
Allows the server to use Ollama (or any OpenAI-compatible local gateway) as a synthesis provider for ask_memory, via the openai-compatible mode.
Allows the server to use OpenAI-compatible chat completion APIs for memory synthesis via the ask_memory tool, using the PATHMARK_OPENAI_BASE_URL and API key.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pathmarkremember that I prefer using TypeScript for new projects"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Pathmark
Stop re-explaining your repo each time you switch agents.
Pathmark gives Codex, Claude Code, opencode, Gemini CLI, Cursor, and any MCP-capable harness one local memory layer. Save decisions, project rules, preferences, and conclusions once. Use them from the next agent without pasting a recap.
Your context stays on disk at ~/.pathmark/memory/memory.jsonl. You do not need an account, hosted database, API key, or vendor backend to start.
OpenAI Build Week 2026
Pathmark is a Developer Tools submission for OpenAI Build Week 2026. The project existed before the challenge, so the submission is deliberately scoped to the meaningful extension built after the submission period opened on July 13, 2026.
During the eligible period, Codex with GPT-5.6 helped audit and extend Pathmark from a working local memory layer into safer long-running developer infrastructure:
fixed a reproduced multi-process SQLite index race;
added revision history, superseding, expiration, retention, diagnostics, backup, compaction, and preview-first hard purge;
added namespace-scoped reads and writes plus default secret redaction;
added scoped import/export, optional AES-256-GCM portable exports, local hybrid reranking, and portable harness ingestion;
hardened CI and npm delivery with required CodeQL and dependency review, immutable Action pins, protected tags, OpenSSF analysis, and SLSA provenance.
The primary Codex session for this work is 019f5fc3-d7e6-7b41-8a30-d161c90b98fb. The qualifying release range is v0.1.6 through v0.1.7; the pre-challenge baseline is commit 4c0e87dfdbd2ba4c643abd8b887cc228bdb08b73.
See the Build Week implementation record for the before/after boundary, commit evidence, Codex collaboration details, and a fast judge test.
Related MCP server: auxly-memory-cli
Why Pathmark
You do not work in one tool. You ask Codex to patch, Claude Code to review, opencode to clean up, and Gemini CLI to challenge the plan. Each tool starts cold unless you carry the context across.
Pathmark gives those tools one place to read and write memory:
One local JSONL store across harnesses.
Standard MCP tools:
remember,search_memory,recall_memory,session_trace,get_context, andask_memory.Client-side synthesis by default, so your coding agent reads the context and answers.
Optional Codex CLI, local command, and OpenAI-compatible synthesis modes.
Plain files you can inspect, back up, delete, or migrate.
Pathmark stays provider-neutral. Codex gets one optional synthesis preset. The core server works with any MCP client that can use local tools.
Pathmark requires Node.js 22.5 or newer.
Cross-Harness Memory
You switch tools during a coding session:
Codex fixes the failing test.
Claude Code reviews the patch.
opencode cleans the diff.
Gemini CLI challenges the approach.
Pathmark keeps the notes in one store.
Point each harness at the same store:
Codex \
Claude Code \
opencode > Pathmark MCP > ~/.pathmark/memory/memory.jsonl
Gemini CLI /
Cursor /Install Pathmark in each harness and point them at the same PATHMARK_STORE_DIR. One tool saves context with remember or create_conclusion; the next tool recovers it with recall_memory, search_memory, get_context, or ask_memory.
Pathmark sits below the agents as a memory bus for your coding workflow.
Tools
Pathmark exposes these MCP tools:
Tool | Purpose |
| Save a raw memory item. |
| Save a higher-signal durable conclusion or preference. |
| Search memories and conclusions. |
| Transparent recall: returns context plus the exact memory IDs, timestamps, sources, matches, tags, and previews used. Accepts optional |
| Return a bounded chronological audit trail for one session: prompts, exact injected memory IDs, redacted tool inputs/results, and answers. |
| Return compact context for a task or question. |
| List saved conclusions. |
| Soft-delete a memory or conclusion by id. |
| Correct a record while preserving prior versions. |
| Replace an outdated record with a linked current record. |
| Preview or apply permanent deletion by id, namespace, tags, source, or date. |
| Report duplicates, deleted/expired records, conclusions, and index health. |
| Preview or apply deduplication, retention, and physical cleanup with an automatic backup. |
| Create a point-in-time canonical JSONL backup. |
| Export a scoped mergeable JSONL bundle, optionally encrypted. |
| Return relevant context, or synthesize with |
| Chat-compatible alias for |
| Show local store configuration. |
Quick Start
npm install -g pathmarkThen add the MCP server to your client.
Prefer npm for normal installs. To test the current GitHub main branch directly:
npm install -g --install-links=true github:hacksurvivor/pathmarkGenerate a setup snippet for your harness:
pathmark setup list
pathmark setup claude-code
pathmark setup opencode --json
pathmark setup gemini-cli
pathmark setup kimiSee docs/compatibility.md for Codex, Claude Code, opencode, Gemini CLI, OpenClaw, Hermes Agent, Grok CLI, Kimi, GLM, and generic MCP setups.
Codex
codex mcp add pathmark -- pathmarkCodex users can also enable auto-capture:
pathmark codex install --replace-legacy-hooksWhen you want the visible "what memory did you use?" entry in Codex, Claude Code, Cursor, opencode, Gemini CLI, Grok-compatible MCP hosts, or any other MCP harness, call the recall_memory tool before answering. Codex auto-capture also recalls relevant memory automatically at session start and before non-trivial prompts, but recall_memory is the portable visible trace across harnesses.
Claude Code
claude mcp add pathmark -- pathmarkopencode / Gemini CLI
Use the generated snippets:
pathmark setup opencode
pathmark setup gemini-cliClaude Desktop
Add this to your Claude Desktop MCP config:
{
"mcpServers": {
"pathmark": {
"command": "pathmark",
"env": {
"PATHMARK_STORE_DIR": "~/.pathmark/memory"
}
}
}
}Cursor
Add the same command to Cursor's MCP server settings:
{
"mcpServers": {
"pathmark": {
"command": "pathmark"
}
}
}Local Development
npm install
npm test
npm run coverageRun directly:
PATHMARK_STORE_DIR=.pathmark npm run devImport Legacy Memory
Pathmark can import a compatible local JSONL memory store without deleting or moving the source files.
npm run import:legacy -- --source-dir ~/old-codex-memoryDefaults:
Legacy source: ~/.pathmark/legacy/codex
Pathmark target: ~/.pathmark/memory/memory.jsonlThe importer creates a memory.jsonl.backup-* file before writing, uses deterministic ids so reruns skip duplicates, and redacts obvious KEY=..., TOKEN=..., PASSWORD=..., and Bearer ... values.
It uses the same store lock as live MCP and Codex writers, so an import cannot overwrite records captured concurrently.
Use a dry run first when migrating another machine:
npm run import:legacy -- --source-dir ~/old-codex-memory --dry-runCodex Auto-Capture
Install Pathmark as the Codex memory adapter:
pathmark codex install --replace-legacy-hooksThis registers the Pathmark MCP server, enables Codex hooks, and removes old compatible hook commands from Codex. It does not delete or move memory files.
The Codex adapter is proactive by default:
user prompts, final assistant answers, and tool activity are captured locally; intermediate Codex commentary is excluded;
tool activity records include bounded redacted input previews and hashes, status, exit code, duration, and changed files when the hook provides them;
tool-output hashes are captured for correlation, while output text remains private by default and requires
PATHMARK_CODEX_CAPTURE_TOOL_OUTPUTS=on;activity records expire after 30 days and are physically capped at 5,000 records by default;
session start/resume injects relevant workspace memory;
each non-trivial user prompt searches the local store and injects matching memory as Codex
additionalContext;when matching memory is found, Codex receives an instruction to call
recall_memorywith the exact pre-capture result IDs and workspace tag, so the UI cannot mistake the newly saved prompt for previously used memory;prompt context applies relevance and near-duplicate filtering before injection, and automatic visible recall omits the redundant full
recordscopy;legacy transport envelopes and assistant progress updates are excluded from session-start and proactive relevance results, while remaining available to explicit raw search;
no matching memory means no extra context is injected.
Set PATHMARK_CODEX_PROACTIVE_RECALL=off if you want Codex hooks to capture memory but stop prompt-time recall.
Set PATHMARK_CODEX_VISIBLE_RECALL=off if you want prompt-time recall without the visible recall_memory tool-call request.
recall_memory is a point-in-time record of memory used before an answer. It intentionally does not include commands that run later. Use session_trace with the exact session ID to inspect the chronological prompt → injected memories → tools/results → final-answer trail. When explicitly enabled, output previews are capped at 2,000 characters and redacted before storage; hashes preserve correlation without storing output text by default. Upgrading an existing cursor migrates to final-answer-only parsing without duplicating previously captured user or final-answer turns. When the original transcript is available, exact legacy phase: "commentary" records are soft-deleted by timestamp and text during that migration.
Use --replace-legacy-hooks when you want Pathmark hooks to take over from earlier compatible hook commands. Without it, Pathmark installs alongside existing hook commands.
Check the adapter status:
pathmark codex statusThe status output is JSON and includes Pathmark hook state, MCP registration state, legacy hook presence, the active store paths, and the current record count.
Remove Pathmark hooks and MCP registration without deleting memory:
pathmark codex uninstallConfiguration
Variable | Default | Description |
|
| Directory for |
|
| Default search limit. |
|
| Automatically inject relevant Pathmark context before non-trivial Codex prompts. Use |
|
| Ask Codex to call |
|
| Store bounded redacted tool-output previews. Output hashes, status, duration, and exit codes remain available when this is off. |
|
|
|
| unset | Command provider: receives a synthesized prompt on stdin and writes an answer on stdout. |
|
| Codex provider command. |
| unset | Optional Codex model override. |
|
| OpenAI-compatible API base URL. |
| unset | OpenAI-compatible API key. |
| unset | Model id for OpenAI-compatible synthesis. |
|
| Synthesis command timeout. |
| unset | Default namespace applied consistently to MCP reads and writes. |
|
| Redact common secret-shaped values on |
|
| Retention policy used by compaction; |
|
| Automatic lifetime for recall/tool activity records; |
|
| Physical cap for activity records; oldest activity is removed automatically. |
| unset | Optional local hybrid reranker. Receives query/candidates as JSON on stdin and returns ranked memory ids. |
|
| Maximum candidates sent to the optional reranker. |
|
| Timeout for the optional reranker. |
| unset | Passphrase for AES-256-GCM portable exports/imports. Never returned by |
|
| Cross-process wait limit for index initialization or rebuild. |
Synthesis Modes
Pathmark separates memory from reasoning.
client
Default. The MCP server returns relevant memory context, and your MCP client model synthesizes the answer. This works across Codex, Claude Desktop, Cursor, and any other MCP client without giving Pathmark a model credential.
PATHMARK_SYNTHESIS_PROVIDER=client pathmarkcommand
Use any local subscription or model CLI that accepts a prompt on stdin and writes an answer to stdout:
PATHMARK_SYNTHESIS_PROVIDER=command \
PATHMARK_CHAT_COMMAND="your-ai-cli --model your-model" \
pathmarkThis is the general path for users with another paid subscription CLI or a local model runner.
codex
Use the proven Codex CLI bridge. It runs a controlled, non-interactive codex exec turn with hooks and memories disabled to avoid recursion:
PATHMARK_SYNTHESIS_PROVIDER=codex \
PATHMARK_CODEX_MODEL=gpt-5.5 \
pathmarkThis is useful for Codex users who have persisted ChatGPT/Codex CLI auth locally but do not want to add an OpenAI API key. Pathmark sends the synthesis prompt through stdin, runs Codex in an empty temporary workspace, ignores project rules, and exposes only a minimal environment. Memory records are treated as untrusted data rather than executable instructions.
openai-compatible
Use any provider that exposes /chat/completions, including many Kimi, GLM/Z.ai, OpenRouter, LiteLLM, Ollama-compatible gateways, and self-hosted routers:
PATHMARK_SYNTHESIS_PROVIDER=openai-compatible \
PATHMARK_OPENAI_BASE_URL=https://api.provider.example/v1 \
PATHMARK_OPENAI_API_KEY=... \
PATHMARK_OPENAI_MODEL=... \
pathmarkThis mode only affects ask_memory. Regular MCP tools still store and retrieve local memory without a model provider.
Setup CLI
pathmark setup <client> prints copy-paste setup for common harnesses. Add --json when you want structured output for scripts.
Supported targets:
codex
claude-code
claude-desktop
cursor
opencode
gemini-cli
generic
openai-compatible
commandAliases include claude, gemini, kimi, glm, and z-ai.
Gemini CLI setup includes portable SessionStart, BeforeAgent, AfterTool, and AfterAgent hooks for automatic scoped recall and capture. Other harnesses can feed exported transcripts through the generic ingestion surface:
pathmark ingest --client=claude-code --namespace=my-project < transcript.json
pathmark ingest --client=opencode --namespace=my-project < transcript.jsonStore maintenance and portable sync
Maintenance commands preview destructive changes unless --apply is present:
pathmark doctor
pathmark compact
pathmark compact --apply --retention-days=90
pathmark purge --namespace=old-client
pathmark purge --namespace=old-client --applyApplied compaction and purge create a backup before replacing the canonical file. Soft deletion remains available through delete_memory; hard purge physically removes selected records from JSONL and rebuilds the derived index.
Use scoped exports and merge imports as the transport-neutral sync layer:
pathmark export --namespace=my-project --output=project.jsonl
pathmark import project.jsonl --namespace=my-projectFor an encrypted portable bundle, configure the passphrase outside the command line:
PATHMARK_EXPORT_KEY='use-a-secret-manager' pathmark export --encrypted --output=project.pathmark
PATHMARK_EXPORT_KEY='use-a-secret-manager' pathmark import project.pathmarkPathmark does not silently upload these files. Move them through a trusted filesystem, backup tool, or sync provider of your choice.
Optional hybrid retrieval
Default retrieval stays local SQLite FTS. To enable semantic or embedding-backed reranking without forcing a model dependency, set PATHMARK_RERANK_COMMAND to a trusted local command. It receives one JSON object on stdin containing query and candidates, and must return a JSON array of ranked record ids (or { "ids": [...] }). If it fails or times out, Pathmark falls back to lexical results.
Data Format
Pathmark stores newline-delimited JSON at:
~/.pathmark/memory/memory.jsonlmemory.jsonl remains the canonical source of truth. Pathmark also maintains a derived, disposable search index at memory.index.v4.sqlite. Index filenames are schema-versioned so old and new MCP processes can coexist during a rolling restart. The index is rebuilt automatically when the JSONL file changes outside Pathmark, and inactive index versions can be deleted safely after their processes stop.
Each record is inspectable:
{
"id": "uuid",
"kind": "memory",
"text": "The user prefers local-first tools.",
"tags": ["preference"],
"source": "mcp",
"createdAt": "2026-06-29T00:00:00.000Z",
"updatedAt": "2026-06-29T00:00:00.000Z"
}Deletes are soft deletes by default: the record gets a deletedAt timestamp. Use preview-first purge_memory or pathmark purge --apply for physical erasure. Updates preserve up to 50 prior versions, superseded records link to their replacement, and expired records are excluded from recall.
Malformed JSONL lines are skipped rather than crashing every tool. pathmark codex status reports their count as invalidRecordCount so the source file can be repaired deliberately.
Roadmap
Provider presets for common local AI CLIs where stable commands exist.
Encrypted store option.
Hosted sync as an opt-in layer, not a requirement.
Native auto-capture packages for additional harness plugin systems beyond Codex and Gemini CLI.
Example recipes for Codex, Claude Desktop, Cursor, ChatGPT, and local LLM tools.
Positioning
Pathmark gives your agents a shared working memory that stays on your machine.
Switch agents. Keep the context.
Bring your own subscription. Keep your memory local.
Author and citation
Pathmark is created and maintained by Sergey Moloman, an independent B2B AI integration contractor and founder of RFLX AI.
Machine-readable authorship and citation metadata are available in CITATION.cff and codemeta.json.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceA shared, local-first memory layer for AI CLIs, providing persistent, layered memory across Claude Code, Gemini CLI, and other MCP-aware clients.Last updated1MIT
- Alicense-qualityBmaintenanceLocal-first, file-based memory layer for AI agents — one shared Markdown vault across Claude, Codex, Gemini, Cursor and any MCP client. Provides read/write memory tools with an audit trail, per-agent trust levels, and Git sync; no cloud and no lock-in.Last updated2MIT
- Flicense-qualityAmaintenanceLocal-first cross-agent memory for AI coding agents. Persistent, shared memory over MCP — what you tell one agent can be recalled by another — with all data stored in a single local SQLite file, no cloud and no API keys.Last updated
- Alicense-qualityAmaintenancePersistent, local memory for AI coding agents that learns how you work, not just what you said. Supports Claude Code, Codex CLI, Cursor, and any MCP client.Last updated62MIT
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hacksurvivor/pathmark'
If you have feedback or need assistance with the MCP directory API, please join our Discord server