local-agent-context
Provides persistent memory and context for AI coding agents in VS Code (GitHub Copilot), allowing them to store and recall project conventions, decisions, tasks, and lessons across sessions.
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., "@local-agent-contextstart session for my-app"
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.
local-agent-context
A local MCP server that gives AI coding agents persistent memory and context across sessions. Works with VS Code (Copilot), Cursor, Claude, and any MCP-compatible client.
Why?
Every time you start a new conversation with an AI coding agent, it forgets everything. This server gives agents a local, fast, searchable memory backed by SQLite — so they remember your project conventions, past decisions, active tasks, and lessons learned.
Related MCP server: local-memory-mcp
Quick Start
Global Setup (Recommended)
Configure once — works across all projects. Agents pass the workspace path dynamically.
VS Code (GitHub Copilot) — add to User Settings (MCP: Open User Configuration):
{
"servers": {
"agent-context": {
"type": "stdio",
"command": "npx",
"args": ["-y", "local-agent-context@latest"]
}
}
}Cursor — add to ~/.cursor/mcp.json:
{
"mcpServers": {
"agent-context": {
"command": "npx",
"args": ["-y", "local-agent-context@latest"]
}
}
}Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"agent-context": {
"command": "npx",
"args": ["-y", "local-agent-context@latest"]
}
}
}Per-Project Setup (Alternative)
If you prefer a fixed workspace, pass --workspace at startup:
VS Code — add to .vscode/mcp.json:
{
"servers": {
"agent-context": {
"type": "stdio",
"command": "npx",
"args": ["-y", "local-agent-context@latest", "--workspace", "${workspaceFolder}"]
}
}
}How It Works
Name-based workspaces: Every tool accepts an optional workspace parameter — the workspace or project name from your IDE (e.g., "my-app"). If a full path is passed instead, the basename is extracted automatically. The server lazily opens and caches workspace databases on demand.
Fallback chain: Tool workspace arg → --workspace CLI flag → WORKSPACE_PATH env var → global-only mode.
Centralized storage (nothing pollutes your project directories):
Workspace memories:
~/.local-agent-context/workspaces/<name>/memory.dbGlobal memory:
~/.local-agent-context/global.db
Both are SQLite databases with FTS5 full-text search.
Tools (10)
All tools accept an optional workspace parameter — the project name (e.g., "my-app") or path. Agents should pass the IDE's workspace/project name.
Core Memory
Tool | Description |
| Store a memory with type, title, content, tags, importance (1-10), and scope |
| Full-text search across all memories. Filter by type, tags, scope, status |
| Update any fields of an existing memory by ID |
| Soft-delete (archive) or hard-delete a memory by ID |
| List memories with optional filters and pagination |
Context
Tool | Description |
| Get a curated briefing: project info, active tasks, conventions, decisions, lessons, global prefs |
Session Lifecycle
Tool | Description |
| Start a coding session. Returns full workspace context. Auto-closes any dangling sessions |
| End session with a summary. Summary is stored as a searchable memory |
Shortcuts
Tool | Description |
| Store an architectural decision with rationale (importance defaults to 7) |
| Record a lesson learned with optional context (importance defaults to 6) |
Memory Types
Type | Use For |
| Stack, structure, build commands, environment setup |
| Coding style, patterns, naming conventions |
| Architectural choices with rationale |
| Active work items, TODOs, features in progress |
| Gotchas, things that went wrong, best practices |
| General-purpose notes |
| Auto-generated from |
Resources (3)
URI | Description |
| Full workspace context (same as |
| Last 5 session summaries |
| All active task memories |
Typical Agent Workflow
Session start: Agent calls
start_sessionwithworkspace→ gets full project briefingDuring work: Agent uses
store_memory,log_decision,add_lessonwithworkspaceto persist contextSearching: Agent uses
recallwithworkspaceto find relevant past memoriesSession end: Agent calls
end_sessionwithworkspaceand a summary
Configuration
The server accepts these optional startup flags:
--workspace <path>— default workspace path (used when tools don't passworkspace)WORKSPACE_PATHenv var — alternative to--workspace
If neither is set, the server runs in global-only mode until agents pass workspace in tool calls.
Agent Instructions
Copy INSTRUCTIONS.md into your IDE's instruction system so agents automatically use this server:
IDE | Where to Add |
VS Code (Copilot) | Copy contents into |
Cursor | Copy contents into |
Claude Desktop | Paste into your Project Instructions |
This teaches the agent to call start_session at the start of every conversation, store decisions/conventions/lessons as they arise, and call end_session with a summary at the end.
Development
git clone https://github.com/yourname/local-agent-context
cd local-agent-context
npm install
npm run build
node dist/index.js --workspace /path/to/projectLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/TomiwaPhilip/local-agent-context'
If you have feedback or need assistance with the MCP directory API, please join our Discord server