Llmslim logo

Llmslim

Local-first MCP memory that stores messages verbatim, recalls relevant context, and fits documents into token budgets without LLM calls.

Install Llmslim

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "llmslim": {
      "command": "uvx",
      "args": [
        "--from",
        "llmslim[mcp]==0.12.0",
        "llmslim",
        "mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio llmslim -- uvx --from 'llmslim[mcp]==0.12.0' llmslim mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

llmslim MCP server provides deterministic long-term memory and context compression for agents and coding tools. It stores messages verbatim, searches them within a token budget, and can reduce documents, logs, or tool output while preserving query-relevant sections. The default MCP setup uses a local SQLite database, with Postgres and MongoDB available through the library. Reach for it when an agent needs persistent conversation context without an embedding service, model call, or API key.

Use cases

  • Store user preferences and past conversation details
  • Recall relevant history within a fixed token budget
  • Compress long logs before adding them to an agent prompt
  • Delete individual memories by identifier
  • Use persistent memory without an LLM or embedding API

Key features

  • Verbatim long-term message storage
  • Deterministic token-budgeted recall
  • SQLite storage with Postgres and MongoDB library backends
  • Query-focused document and log compression
  • Optional session-scoped memory operations
  • No default LLM or embedding API calls

Tools5

What Llmslim lets your agent do. Expand a tool for its parameters.

Verified live~682 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 37d

What it can do

From the 5 tools this server returned when we ran it; 5 declare their own safety hints.

Can delete or modify data · 1Makes changes · 2Handles credentials · 2Read-only tools · 3
Network at startup2 connections
Files written at startup17

Observed 2026-12-02 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · llmslim (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars27Stargazers on the source repository.
Last commit12d agoMost recent push to the default branch.
Tools exposed5Callable tools this server registers over MCP.

How Llmslim works

What llmslim MCP server does

llmslim provides five MCP tools for retaining and selecting agent context without sending the work through another language model. remember writes a user or assistant message to long-term memory exactly as supplied. recall searches stored conversations and returns relevant original messages within a token limit. list_memories exposes recent entries, while forget permanently removes one entry by its identifier.

The fifth tool, fit_context, handles context that is not necessarily a conversation. Give it a document, log, or tool result and a maximum token count; it returns a shorter version, keeping relevant sections in their original order. If the input already fits, it is returned unchanged.

How it works

The MCP process performs storage and retrieval with ordinary database operations and deterministic ranking code. It makes no LLM call, uses no embedding API by default, and requires no model credential. Stored messages remain verbatim rather than being summarized or extracted during ingestion.

A memory can optionally carry a session identifier. Retrieval and listing can then be limited to that conversation; entries without a session are grouped by day. Recall accepts a query and token budget, returning matching material under its dates and including complete messages where they fit. The server fixes user and agent scope when it starts, rather than allowing the model to choose those identifiers during a request.

Setup and configuration

The MCP command is llmslim mcp. With uv, a client can launch it using the llmslim[mcp] package extra. Python 3.10 or newer is required. The default storage location is the SQLite file ~/.llmslim/memory.db.

The project also provides a Python library and a small HTTP server. The library can use SQLite, PostgreSQL with the Postgres extra, or MongoDB with the MongoDB extra. TypeScript clients can connect to the HTTP service; its default base URL is http://127.0.0.1:8080, and LLMSLIM_BASE_URL can override that URL.

Named integrations include Claude Code, Codex, Gemini CLI, VS Code, Cursor, and LM Studio. A Claude Code plugin is also available. The first uvx launch downloads the package and dependencies; preloading the command can help clients with short startup timeouts.

Tools and capabilities

  • remember: save a message with an optional role and session.
  • recall: find relevant stored messages for a question within a token budget.
  • list_memories: list recent memory records, newest first, with a limit of up to 100.
  • forget: delete a memory by ID; deletion cannot be undone.
  • fit_context: shorten text to a budget, optionally prioritizing material that answers a query.
  • Local SQLite storage by default, with PostgreSQL and MongoDB library backends.
  • Optional semantic relevance mode through the semantic package extra.

Limitations and notes

The default lexical search matches words, so differently phrased questions may fail to find semantically equivalent messages. Semantic relevance is optional and downloads a cross-encoder model on its first use. Tokenizer data may also be downloaded once by tiktoken.

forget is irreversible. Memory scope is established at server startup, so deployments should start separate processes with the intended user and agent scope. The MCP server and HTTP service do not make network calls during normal operation, apart from installation and the tokenizer or optional semantic-model downloads described above.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Llmslim

llmslim is an MCP server that connects AI agents to persistent memory in SQLite, Postgres, or MongoDB and provides remember, recall, list_memories, forget, and fit_context tools. It stores messages verbatim, retrieves relevant context within token budgets, and compresses long text without making an LLM call.

Install and launch it with `uvx --from "llmslim[mcp]" llmslim mcp` through an MCP client. Python 3.10 or newer is required. The first launch downloads the package and dependencies; running the command once beforehand can help clients with short startup timeouts.

Yes, llmslim works with Cursor through its MCP installation flow. Configure Cursor to launch `llmslim mcp` with `uvx` and the `llmslim[mcp]` package extra, using the local SQLite database by default.

No, the default memory and recall paths make no LLM or embedding API calls. Retrieval uses database writes and deterministic ranking. Optional semantic relevance adds a cross-encoder model, which is downloaded on first use.

Call `fit_context` with the text and a maximum token budget, optionally including a query. It keeps query-relevant parts first and preserves their original order; text already within the budget is returned unchanged.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLlmslim AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/llmslim?style=directory)](https://allmcps.com/mcp/llmslim)
HTML Embed
<a href="https://allmcps.com/mcp/llmslim"><img src="https://allmcps.com/api/badge/llmslim?style=directory" alt="Llmslim on AllMCPs" /></a>