Unsloth session memory MCP
Unsloth 会话记忆 MCP
一个只读的 MCP 服务器,允许 Unsloth Studio 从其 SQLite 数据库中检索之前的本地聊天会话。
它提供四个工具:
list_sessionsget_sessionrecall_previous_sessionsearch_sessions
仅返回用户和助手的文本。系统消息、工具输出、推理块、图像、音频和附件被排除在外。常见的 API 密钥和令牌模式会从返回的文本中删除。
要求
Unsloth Desktop 或 Studio,其历史记录位于
~/.unsloth/studio/studio.dbNode.js 22.5 或更新版本
Related MCP server: Claude Code History MCP Server
通过配置文件添加到 Unsloth
下载 examples/unsloth-npx-import.json,然后在 Unsloth Studio 中:
打开一个聊天,并在编辑器旁选择 MCP。
选择 管理 MCP 服务器。
选择 导入配置 并选择下载的 JSON 文件。
启用 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。如果模型未提供 currentThreadId,recall_previous_session 会将最新的存储线程视为当前聊天,并返回第二新的合格线程。提供 currentThreadId 和 projectId 可以避免这种假设。
开发和测试
npm install
npm run check
npm run build
npm test在将 HTTP 传输暴露到 localhost 之外之前,请参阅 SECURITY.md。
许可证
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
- Flicense-qualityDmaintenanceAn 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
- AlicenseAqualityDmaintenanceAn 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.42511MIT
- Alicense-qualityCmaintenanceA 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
- Alicense-qualityBmaintenanceMCP 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
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.
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/kashyaparun25/unsloth-session-memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server