agent-context
Click on "Deploy 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., "@agent-context record a note about the build gotcha we just hit"
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.
agent-context-mcp
Persistent, harness-agnostic project memory for AI coding agents.
A stateless MCP server that gives any agent — Claude Code, Codex, Kilo Code, OpenCode, Cursor — structured read/write access to a per-project ai_context/ folder of plain markdown. Decisions, plans, constraints and notes live in the repo, sync via git, and stay readable by agents that do not have the server installed.
The agent decides when and what to record. The server decides format and location. That opinionation is the point: give an agent free-form writes and the folder degrades into sludge.
What it is not
No code retrieval, no semantic search, no embeddings, no database, no daemon state. Pure file I/O. It composes with a code-search tool rather than competing with one.
Related MCP server: Jarvis Markdown MCP
Install
Needs Node ≥ 18. Nothing to install globally — every harness below runs it through npx.
npx agent-context-mcp initinit creates the ai_context/ skeleton, stubs project.md and constraints.md, appends the activation snippet to AGENTS.md, and prints the registration block for your harness. It never overwrites an existing file.
Register with your harness
Claude Code, from the project root:
claude mcp add agent-context -- npx -y agent-context-mcp .Or commit a .mcp.json so the whole team gets it:
{
"mcpServers": {
"agent-context": {
"command": "npx",
"args": ["-y", "agent-context-mcp", "."]
}
}
}Codex, in ~/.codex/config.toml:
[mcp_servers.agent-context]
command = "npx"
args = ["-y", "agent-context-mcp", "."]Kilo Code, OpenCode, Cursor, Windsurf and other MCP clients take the same mcpServers JSON block in their own settings file.
The trailing . makes the server treat the harness's working directory as the project root. Pass an absolute path instead if your harness starts elsewhere. Transport is stdio only.
AGENTS.md snippet
init appends this; add it by hand if you would rather not run init. It is what actually makes agents use the tools:
## Persistent project context
This project uses the agent-context MCP server. At session start, call
`get_context` (no arguments) to orient yourself. When you make or the user
confirms a significant architectural/technical decision, call
`record_decision`. Persist gotchas and conventions with `record_note`.
Human-curated ground truth lives in ai_context/project.md and
ai_context/constraints.md — read them, never contradict them.The folder
<project-root>/
AGENTS.md entry point — yours, never written except by `init`
ai_context/
INDEX.md auto-maintained table of contents (server-owned)
project.md what this project is (yours; server reads, never writes)
constraints.md hard rules and good practices (yours; read-only to the server)
memory.md notes, written via record_note
decisions/
0001-use-postgres.md ADRs, written via record_decision
plans/
auth-refactor.md mutable plans, written via update_planai_context/is created lazily on the first write, or up front byinit.INDEX.mdis regenerated after every write and re-scanned from disk each time. Never hand-edit it.Decisions are append-only. Superseding one means recording a new one that references it; the only edit ever made to an existing ADR is a
- Superseded-by: NNNNmetadata line.Plans are mutable —
update_planoverwrites.project.mdandconstraints.mdare human ground truth. The server reads them and never writes them.
Tools
Tool | Input | What it does |
|
| Reads the index (default), |
|
| Writes |
|
| Appends a dated bullet to |
|
| Creates or fully overwrites |
| — | Lists every file under |
Length caps are deliberate anti-sludge discipline, not storage limits: title 80 chars, ADR sections 1200 each, notes 500, plans 8000. Exceeding one returns a message stating the actual length and the limit so the agent can summarize and retry.
There is no search_context. Grep over a small markdown folder is enough, and agents already have it.
Safety
Every path is resolved through a single guard; nothing outside
ai_context/is ever read or written, and traversal in a slug or topic is rejected rather than quietly sanitized into something else.Writes go to a temp file and are renamed into place, so a crash cannot leave a half-written file.
No state between calls, no caches. Edits from a human, a
git pullor another agent are picked up on the next call.
Development
npm install
npm test # unit + stdio integration tests
npm run typecheck # sources and tests
npm run buildLicense
MIT
Available Tools
5 toolsget_contextGet project contextARead-only
Read the project's persistent AI context: index, project description, constraints, decisions, plans, memory. Call with no arguments at session start to orient yourself.
Inputs: topic.
list_contextList context filesARead-only
List all files in the project's ai_context folder with sizes and dates.
Inputs: no named parameters. Returns: files
record_decisionRecord a decisionA
Record an architectural or otherwise important project decision as a permanent ADR. Call this whenever you make or the user confirms a significant technical choice.
Inputs: title (required), context (required), decision (required), consequences (required), +1 more. Returns: id, path
record_noteRecord a noteA
Persist a short project note: a gotcha, convention, learning, or todo that future sessions should know.
Inputs: content (required), category (required). Returns: path, category, duplicate
update_planCreate or overwrite a planADestructiveIdempotent
Create or fully overwrite a named project plan. Plans are mutable working documents, unlike decisions.
Inputs: name (required), content (required). Returns: path, slug, created
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct action: reading full context, listing files, recording a note, recording a decision, and updating a plan. The only potential overlap is between get_context and list_context, but their descriptions clearly differentiate content retrieval from file listing.
All tool names follow a consistent verb_noun pattern (get_context, record_note, record_decision, update_plan, list_context) using snake_case. The verbs are descriptive and the pattern is uniform across the set.
With 5 tools, the server is well-scoped for managing AI context. Each tool serves a clear purpose without redundancy, and the count is appropriate for the narrow domain.
The set covers the core workflow: reading the full context, listing stored files, and writing notes, decisions, and plans. Minor gaps exist (e.g., no direct note or decision deletion/editing), but these are acceptable given the 'permanent' nature of decisions and the mutable plan overwrite capability.
Maintenance
Related MCP Connectors
One memory, every AI. A shared, user-owned markdown memory your AI clients read and write over MCP.
Hosted MCP memory for coding agents: persistent across sessions, editable markdown, team sharing.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
Related MCP Servers
- AlicenseAqualityCmaintenanceA self-hosted MCP server that gives AI agents shared, long-term memory over a git-backed folder of markdown, enabling persistent knowledge search, read, and write without a database.1624 npm21MIT
- AlicenseBqualityDmaintenanceLocal-first memory server for AI coding agents that stores work sessions, tasks, and durable memories in Markdown files, exposed through MCP tools for session management and memory retrieval.1010 npm1MIT
- AlicenseAqualityBmaintenanceA local-first MCP server that provides a shared Markdown-based memory for AI coding agents, enabling cross-agent context persistence via tools like memory_search and memory_capture.161MIT
- AlicenseNot gradedqualityDmaintenanceMCP server providing persistent, local-first memory for AI agents via Markdown files in a git repo, with search, branching, and auditability.11 npm2MIT