Skip to main content
Glama
AliYar-Khan

light-agent-memory-mcp-server

by AliYar-Khan

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-server

Related 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 Desktopclaude_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

工具

项目记忆

工具

描述

memory_project_save

保存/更新项目上下文(技术栈、架构、约定)

memory_project_get

按名称获取项目详情

memory_project_list

列出所有已保存的项目

偏好记忆

工具

描述

memory_pref_save

保存/更新个人编码偏好

memory_pref_get

按 key 获取偏好

memory_pref_list

列出偏好(可按类别筛选)

学习记忆

工具

描述

memory_learning_save

记录一次会话学习心得(解决方案、洞见、Bug 备注)

memory_learning_search

按关键词搜索学习心得

通用

工具

描述

memory_save

统一保存(按类型自动路由)

memory_search

按关键词跨类型搜索

memory_delete

按类型和 ID 删除记忆

memory_list

列出所有记忆,支持分页与统计

示例

保存项目:

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)。数据库会在首次运行时自动创建。

表结构

  • projectsidname(唯一)、pathtech_stack(JSON)、architectureconventionsnotes、时间戳

  • preferencesidkey(唯一)、valuecategory、时间戳

  • learningsidtitlecontentproject_nametags(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

A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides persistent, local-first AI memory across sessions via MCP tools for storing, searching, and retrieving context from past interactions.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.
    5
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides 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
  • A
    license
    Not graded
    quality
    C
    maintenance
    Persistent 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.
    45
    2
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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