agent-context
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., "@agent-contextrecord 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
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
- AlicenseAqualityAmaintenanceA 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.162210MIT
- AlicenseBqualityBmaintenanceLocal-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.10111MIT
- AlicenseAqualityCmaintenanceA 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.101MIT
- AlicenseAqualityBmaintenanceA local MCP server that provides AI agents with persistent sticky-note memory, storing Markdown notes on disk and offering tools for creating, reading, updating, deleting, searching, and listing notes across sessions.13MIT
Related MCP Connectors
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
Cloud-hosted MCP server for durable AI memory
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/gkrisz22/ai_context'
If you have feedback or need assistance with the MCP directory API, please join our Discord server