light-agent-memory-mcp-server
light-agent-memory-mcp-server
用于持久化智能体记忆的 MCP 服务器 — 将项目、偏好设置和会话学习内容存储在本地 SQLite 数据库中。
与框架无关。 可用于任何与 MCP 兼容的客户端:opencode、Claude Desktop、Cursor、Windsurf 等。
安装
npm install -g light-agent-memory-mcp-server或者直接通过 npx 使用(无需安装):
npx light-agent-memory-mcp-serverRelated MCP server: tartarus-mcp
配置
添加到 MCP 客户端的配置中:
opencode(~/.config/opencode/opencode.json):
{
"mcp": {
"memory": {
"type": "local",
"command": ["npx", "-y", "light-agent-memory-mcp-server"],
"enabled": true
}
}
}Claude Desktop(claude_desktop_config.json):
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "light-agent-memory-mcp-server"]
}
}
}Cursor(.cursor/mcp.json):
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "light-agent-memory-mcp-server"]
}
}
}自定义数据库路径
npx light-agent-memory-mcp-server --db /path/to/custom.db工具
项目记忆
工具 | 描述 |
| 保存/更新项目上下文(技术栈、架构、约定) |
| 按名称获取项目详情 |
| 列出所有已保存的项目 |
偏好记忆
工具 | 描述 |
| 保存/更新个人编码偏好 |
| 按 key 获取偏好 |
| 列出偏好(可按类别筛选) |
学习记忆
工具 | 描述 |
| 记录一次会话学习心得(解决方案、洞见、Bug 备注) |
| 按关键词搜索学习心得 |
通用
工具 | 描述 |
| 统一保存(按类型自动路由) |
| 按关键词跨类型搜索 |
| 按类型和 ID 删除记忆 |
| 列出所有记忆,支持分页与统计 |
示例
保存项目:
memory_project_save({
name: "my-app",
path: "/home/user/projects/my-app",
tech_stack: ["TypeScript", "React", "SQLite"],
architecture: "Monorepo with pnpm workspaces, plugin-based architecture",
conventions: "ESM-only, strict TypeScript, no comments in code"
})保存偏好设置:
memory_pref_save({
key: "language.typescript.style",
value: "Always use ESM imports, strict mode, and prefer readonly types",
category: "language"
})记录学习心得:
memory_learning_save({
title: "Fix SQLite WAL mode deadlock",
content: "When using WAL mode in SQLite, set busy_timeout to 5000ms to avoid SQLITE_BUSY errors under concurrent reads.",
project_name: "my-app",
tags: ["sqlite", "debugging", "concurrency"]
})搜索所有记忆:
memory_search({ query: "SQLite" })数据库
数据默认存储在 ~/.agent-memory/memory.db(使用 Node.js 内置的 node:sqlite 实现 SQLite)。数据库会在首次运行时自动创建。
表结构
projects —
id、name(唯一)、path、tech_stack(JSON)、architecture、conventions、notes、时间戳preferences —
id、key(唯一)、value、category、时间戳learnings —
id、title、content、project_name、tags(JSON)、时间戳
开发
git clone https://github.com/AliYar-Khan/light-agent-memory-mcp-server.git
cd light-agent-memory-mcp-server
npm install
npm run build
npm run dev # runs with tsx, no build step许可证
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
- AlicenseNot gradedqualityCmaintenanceProvides persistent, local-first AI memory across sessions via MCP tools for storing, searching, and retrieving context from past interactions.1MIT
- AlicenseNot gradedqualityCmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.51Apache 2.0
- AlicenseNot gradedqualityAmaintenanceProvides persistent memory for AI coding agents via MCP, enabling agents to store and semantically recall facts, events, and lessons across sessions, all running locally without cloud dependencies.Apache 2.0
- AlicenseNot gradedqualityCmaintenancePersistent memory for AI coding agents. Enables agents to save and recall decisions, patterns, bugs, and context across sessions via an MCP server with local SQLite storage.452MIT
Related MCP Connectors
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Persistent memory for AI agents. Search, store, and recall across sessions.
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
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/AliYar-Khan/light-agent-memory-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server