Skip to main content
Glama
kashyaparun25

Unsloth session memory MCP

Unsloth 会话记忆 MCP

一个只读的 MCP 服务器,允许 Unsloth Studio 从其 SQLite 数据库中检索之前的本地聊天会话。

它提供四个工具:

  • list_sessions

  • get_session

  • recall_previous_session

  • search_sessions

仅返回用户和助手的文本。系统消息、工具输出、推理块、图像、音频和附件被排除在外。常见的 API 密钥和令牌模式会从返回的文本中删除。

要求

  • Unsloth Desktop 或 Studio,其历史记录位于 ~/.unsloth/studio/studio.db

  • Node.js 22.5 或更新版本

Related MCP server: Claude Code History MCP Server

通过配置文件添加到 Unsloth

下载 examples/unsloth-npx-import.json,然后在 Unsloth Studio 中:

  1. 打开一个聊天,并在编辑器旁选择 MCP

  2. 选择 管理 MCP 服务器

  3. 选择 导入配置 并选择下载的 JSON 文件。

  4. 启用 Unsloth 会话记忆 并选择 测试连接

该配置运行以下命令:

npx --yes github:kashyaparun25/unsloth-session-memory-mcp --stdio

如果 Unsloth 报告本地 MCP 命令被禁用,请使用下面的本地 HTTP 选项。源码构建可以设置 UNSLOTH_STUDIO_ALLOW_STDIO_MCP=1;打包的 Desktop 构建可能内部控制此选项。

作为命令添加

在 Unsloth 中创建一个本地 MCP 服务器,并输入:

npx --yes github:kashyaparun25/unsloth-session-memory-mcp --stdio

无需仓库检出。npx 会下载公共 GitHub 仓库并启动 stdio 服务器。

作为本地 URL 添加

克隆仓库并启动 HTTP 传输:

git clone https://github.com/kashyaparun25/unsloth-session-memory-mcp.git
cd unsloth-session-memory-mcp
npm install
npm run build
node dist/cli.js --http --config examples/config.json

在 Unsloth 中输入 http://127.0.0.1:7331/mcp,或导入 examples/unsloth-http-import.json

托管的网站 URL 无法读取您 Mac 上的 Unsloth 数据库。请在与 Unsloth 相同的 Mac 上运行此服务器,除非您有意复制或挂载数据库。

如需从另一台机器访问,请使用 TLS 和承载令牌:

UNSLOTH_MEMORY_TOKEN='replace-with-a-random-value' \
node dist/cli.js --http --host 0.0.0.0 --port 7331 --config examples/config.json

然后配置 MCP 客户端发送 Authorization: Bearer <your token>。如果没有令牌,服务器会拒绝非回环的 HTTP 绑定。

配置

复制 examples/config.json 以更改数据库路径、响应限制、允许的消息角色或编辑行为。

环境变量覆盖:

  • UNSLOTH_MEMORY_CONFIG:配置文件路径

  • UNSLOTH_STUDIO_DB_PATH:数据库路径覆盖

  • UNSLOTH_MEMORY_TOKEN:HTTP 承载令牌

验证配置而不返回聊天内容:

npx --yes github:kashyaparun25/unsloth-session-memory-mcp --check

该进程以只读模式打开 SQLite,并同时启用 PRAGMA query_only

在聊天中使用

向 Unsloth 提问:

Use recall_previous_session to retrieve the previous chat, then tell me what we decided.

如需精确检索,请先调用 list_sessions,然后使用选定的线程 ID 调用 get_session

Unsloth 不会自动向第三方 MCP 服务器提供当前隐藏的线程 ID。如果模型未提供 currentThreadIdrecall_previous_session 会将最新的存储线程视为当前聊天,并返回第二新的合格线程。提供 currentThreadIdprojectId 可以避免这种假设。

开发和测试

npm install
npm run check
npm run build
npm test

在将 HTTP 传输暴露到 localhost 之外之前,请参阅 SECURITY.md

许可证

MIT

A
license - permissive license
-
quality - not tested
C
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

  • F
    license
    -
    quality
    D
    maintenance
    An MCP server that interfaces with the Rewind.ai SQLite database to provide access to audio transcripts, screen OCR data, and activity tracking. It enables AI models to search personal memory, retrieve past conversations, and analyze application usage history.
    19
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables users to retrieve, filter, and search through Claude Code conversation history stored in local projects. It provides tools for listing projects and sessions, paginating through message history, and searching across conversations with keyword filtering.
    4
    25
    11
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    A read-only MCP server that enables LLMs to safely explore and query any SQLite database via natural language. It exposes tools for listing tables, describing schemas, and executing SELECT/WITH queries with built-in safety guards like write prevention and row limits.
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    MCP server for unified full-text search across chat histories from Claude Code, Codex, Cursor CLI, and Antigravity CLI, using SQLite FTS5. Provides read-only tools to search sessions, list conversations, and retrieve session details.
    MIT

View all related MCP servers

Related MCP Connectors

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

  • Read-only MCP server for ClassQuill, a tutoring-business-management platform.

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/kashyaparun25/unsloth-session-memory-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server