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, providing tools to list, get, recall, and search sessions while excluding system messages and redacting sensitive patterns.

Category
Visit Server

README

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

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured