Agent Memory MCP
Supports memory sharing and retrieval within VS Code through GitHub Copilot's MCP integration.
Provides OpenAI embeddings for semantic similarity search and memory organization.
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 Memory MCPremember that I prefer tabs over spaces"
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 Memory MCP
A self-improving agent memory server implementing the Model Context Protocol (MCP). It captures, organizes, and shares memories across all your workspaces and repositories, builds a personal knowledge graph, learns your preferences, and recommends the right tools to limit token usage.
Features
Cross-workspace memory sharing — memories stored in
~/.agent-memory-mcp/are available to every workspace/repo.Semantic + keyword recall — SQLite FTS5 full-text search plus lightweight vector similarity.
Knowledge graph — auto-extracts entities and relations from memories, like a personal CodeGraph.
Continuous correction — corrections are linked to memories and used to update confidence and generate preferences.
Preference learning — learns style, formatting, workflow, and tool-selection preferences from interactions.
Tool recommender — logs tool outcomes and recommends the best tool given a task description.
Self-improvement —
reflectanalyzes patterns, merges duplicates, surfaces insights, and updates preferences.
Related MCP server: MCP Memento
Quick start
npm install
npm run build
node dist/index.js📖 Full usage guide: https://jthiruveedula.github.io/agent-memory-mcp/
Platform Setup
VS Code (GitHub Copilot)
The .vscode/mcp.json is pre-configured for this workspace. Copilot will automatically discover it.
Claude Code CLI
Add the following to .claude/settings.json (already included in this repo):
{
"mcpServers": {
"agent-memory": {
"command": "node",
"args": ["${workspaceFolder}/dist/index.js"]
}
}
}Claude Desktop
Open ~/Library/Application Support/Claude/settings.json and add:
{
"mcpServers": {
"agent-memory": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/agent-memory-mcp/dist/index.js"]
}
}
}Replace the path with the actual absolute path to this project.
Cursor
The .cursor/mcp.json is pre-configured for this workspace. Cursor will discover it automatically.
OpenCode
The opencode.json is pre-configured for this workspace. OpenCode will discover it automatically.
Environment variables
Variable | Description |
| Storage directory (default: |
|
|
| Optional: enables OpenAI |
| Optional: enables Anthropic API-based reflections |
Available tools
remember— store a memory, correction, preference, or tool outcome.recall— search memories semantically and by keyword.recall_recent— list the most recently accessed or created memories.remember_correction— store a correction tied to an existing memory.remember_tool_outcome— log success/failure, tokens, duration for a tool call.get_preferences— retrieve learned preferences, optionally filtered by key prefix.set_preference— manually set a preference.get_tool_recommendations— get ranked tool recommendations for a task.get_knowledge_graph— explore entities and relations around a topic.reflect— run self-improvement analysis.update_memory_confidence— reinforce or penalize a memory.
Example workflow
After connecting the server to your MCP client, it will start learning as you work:
Store a preference
{ "tool": "remember", "content": "I prefer flat error handling over throwing." }Log a tool outcome
{ "tool": "remember_tool_outcome", "arguments": { "tool_name": "grep_search", "task_summary": "Find helper usages", "success": true, "duration_ms": 120, "tokens_used": 200 } }Recall when needed
{ "tool": "recall", "arguments": { "query": "error handling preference", "limit": 5 } }Run reflection periodically
{ "tool": "reflect" }
The server also exposes a memory-context prompt and three resources (memory://preferences, memory://recent, memory://stats) that MCP clients can pull into context.
Architecture
src/
├── index.ts # Entry point: starts MCP stdio server
├── server.ts # MCP Server wiring (tools, resources, prompts)
├── config.ts # Configuration and paths
├── types.ts # Shared types and Zod schemas
├── db/
│ ├── schema.ts # SQLite schema with versioned migrations
│ ├── embeddings.ts # Local hash-based or OpenAI embeddings
│ └── memory-store.ts # CRUD, search, embeddings, graph persistence
├── graph/
│ └── knowledge-graph.ts # Entity/relation extraction and graph queries
├── learning/
│ ├── preference-learner.ts # Preference extraction and updates
│ ├── tool-recommender.ts # Tool outcome learning
│ └── self-improver.ts # Reflection and consolidation
└── tools/
└── memory-tools.ts # MCP tool handlersDevelopment
npm run dev # run with tsx
npm run build # compile TypeScript
npm run inspector # test with MCP inspectorTesting
npm test # runs full-test + stress-test + platform-check
# Individual suites
bash scripts/smoke-test.sh
bash scripts/full-test.sh
bash scripts/stress-test.sh
bash scripts/platform-check.shA GitHub Actions CI workflow is included under .github/workflows/ci.yml. Last updated: July 14, 2026.
License
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.
Related MCP Servers
- Alicense-qualityDmaintenanceA persistent memory server for AI agents that stores structured notes in a local SQLite database with full-text search and graph-based relationships. It features 32 specialized tools for managing long-term context, including version history, automated TTL expiration, and complex filtering.23MIT
- AlicenseAqualityCmaintenanceA persistent long-term memory server for AI assistants that enables storing and recalling solutions, facts, and decisions with intelligent confidence tracking and relationship mapping. It allows developers to build a cross-platform knowledge base that integrates seamlessly with IDEs and CLI agents.172MIT

studiomeyer-memoryofficial
Alicense-qualityAmaintenanceAI memory server with 53 tools. Knowledge Graph, semantic search, session tracking, multi-agent support.4MIT- Alicense-qualityCmaintenanceA self-hosted, graph-aware memory server for AI assistants that provides persistent memory across sessions with hybrid search and knowledge graph capabilities.11MIT
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Appeared in Searches
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/jthiruveedula/agent-memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server