Skip to main content
Glama
kashyaparun25

Unsloth session memory MCP

Unsloth session memory MCP

A read-only MCP server that lets Unsloth Studio retrieve earlier local chat sessions from its SQLite database.

It exposes four tools:

  • list_sessions

  • get_session

  • recall_previous_session

  • search_sessions

Only user and assistant text is returned. System messages, tool output, reasoning blocks, images, audio, and attachments are excluded. Common API-key and token patterns are redacted from returned text.

Requirements

  • Unsloth Desktop or Studio with history in ~/.unsloth/studio/studio.db

  • Node.js 22.5 or newer

Related MCP server: Claude Code History MCP Server

Add it to Unsloth with a config file

Download examples/unsloth-npx-import.json, then in Unsloth Studio:

  1. Open a chat and select MCP beside the composer.

  2. Select Manage MCP servers.

  3. Select Import config and choose the downloaded JSON file.

  4. Enable Unsloth session memory and select Test connection.

The config runs this command:

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

If Unsloth reports that local MCP commands are disabled, use the local HTTP option below. Source builds can set UNSLOTH_STUDIO_ALLOW_STDIO_MCP=1; packaged Desktop builds may control this option internally.

Add it as a command

Create a local MCP server in Unsloth and enter:

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

No repository checkout is required. npx downloads the public GitHub repository and starts the stdio server.

Add it as a local URL

Clone the repository and start the HTTP transport:

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

Enter http://127.0.0.1:7331/mcp in Unsloth, or import examples/unsloth-http-import.json.

A hosted website URL cannot read the Unsloth database on your Mac. Run this server on the same Mac as Unsloth unless you deliberately copy or mount the database elsewhere.

For access from another machine, use TLS and a bearer token:

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

Then configure the MCP client to send Authorization: Bearer <your token>. The server refuses a non-loopback HTTP binding without a token.

Configuration

Copy examples/config.json to change the database path, response limits, permitted message roles, or redaction behavior.

Environment overrides:

  • UNSLOTH_MEMORY_CONFIG: config-file path

  • UNSLOTH_STUDIO_DB_PATH: database-path override

  • UNSLOTH_MEMORY_TOKEN: HTTP bearer token

Verify the configuration without returning chat content:

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

The process opens SQLite in read-only mode and also enables PRAGMA query_only.

Use it in a chat

Ask Unsloth:

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

For precise retrieval, call list_sessions and then get_session with the selected thread ID.

Unsloth does not automatically give a third-party MCP server the current hidden thread ID. If the model does not supply currentThreadId, recall_previous_session treats the newest stored thread as the current chat and returns the second newest eligible thread. Supplying currentThreadId and projectId avoids that assumption.

Develop and test

npm install
npm run check
npm run build
npm test

See SECURITY.md before exposing the HTTP transport beyond localhost.

License

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