Kirok Memory logo

Kirok Memory

Persistent MCP memory with hybrid semantic and keyword recall, SQLite storage, and Gemini-based consolidation.

Install Kirok Memory

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": {
    "kirok-memory": {
      "command": "uvx",
      "args": [
        "--from",
        "kirok-mcp",
        "kirok-doctor"
      ],
      "env": {
        "GEMINI_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

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

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx --from kirok-mcp kirok-doctor

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Kirok Memory MCP server gives AI agents durable memory through retain, recall, reflect, and consolidation tools. It stores memories in a local SQLite database, combining Gemini embeddings with FTS5 keyword search through Reciprocal Rank Fusion. A background process can consolidate memories into observations, while mental models capture higher-level insights. Use it when an agent needs searchable memory across sessions and sending embeddings and LLM requests to Google Gemini is acceptable.

Use cases

  • Store facts and preferences across agent sessions
  • Recall memories with semantic and keyword search
  • Consolidate raw memories into observations
  • Build mental models from accumulated memories

Key features

  • Hybrid semantic and FTS5 keyword retrieval
  • Local SQLite persistence with per-bank organization
  • Gemini-based embeddings and reflection
  • Automatic observation consolidation
  • Memory deduplication and smart retention
  • Soft deletes, snapshots, and audit events

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.

23/26 checks healthy over the last 111d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · kirok-mcp (PyPI)

Adoption & maintenance

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

GitHub stars1Stargazers on the source repository.
Last commit21d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Kirok Memory works

What the Kirok Memory MCP server does

The Kirok Memory MCP server provides persistent, searchable memory for MCP-compatible agents. It separates storage into banks and supports both raw memories and derived observations. Agents can save information, retrieve relevant items, build mental models, and manage stored data through MCP tools.

The main workflow is to retain useful information, recall it later, and use reflect or consolidation to turn accumulated memories into reusable insights. Smart retain can assess importance before saving. Deduplication can classify a new item as an add, update, or no-op when it resembles existing content.

How it works

Kirok stores data in a SQLite database at ~/.kirok/memory.db by default. SQLite WAL mode supports the local persistence layer, while FTS5 supplies BM25 keyword search and sqlite-vec supplies per-bank vector KNN. If the native vector extension cannot load, the server uses a NumPy brute-force scan instead.

Recall runs semantic and keyword searches and combines their rankings with Reciprocal Rank Fusion. Observations are presented before ordinary memories when they match. Semantic results use configurable similarity floors, while keyword hits are not subject to the semantic threshold.

Google Gemini handles embeddings, entity extraction, reflection, and consolidation. The documented defaults use gemini-embedding-001 for 3072-dimensional embeddings and gemini-2.5-flash-lite for language-model tasks. Because these operations use the Gemini API, the Kirok Memory MCP server is not fully on-device.

A background consolidation loop can synthesize pending memories into observations. Background failures do not block a retain operation, and destructive LLM decisions are soft-deleted with an audit trail. Startup snapshots can also be enabled and rotated according to configuration.

Setup and configuration

Kirok requires Python 3.12 or newer, uv, and a Google Gemini API key. The package is available through PyPI, so a typical client can launch it with uvx kirok-mcp. Store the key as GEMINI_API_KEY in ~/.kirok/.env, or provide it in the MCP client configuration; a client-level environment value takes precedence.

Run uvx --from kirok-mcp kirok-doctor to perform an offline setup check. For development, clone the repository, run uv sync, configure .env, and launch with uv run kirok-mcp. The server communicates over stdio using JSON-RPC 2.0.

Available settings include the database path, deduplication threshold, recall similarity floors, consolidation batch size and timeout, reflection timeout, and automatic snapshot retention. The bundled skill at skills/kirok/SKILL.md can guide an agent on when to use the memory tools.

Tools and capabilities

Core tools include:

  • KIROK_retain, KIROK_recall, KIROK_reflect, KIROK_smart_retain, and KIROK_consolidate
  • Memory retrieval, browsing, editing, and deletion through KIROK_get_memory, KIROK_list_memories, KIROK_update_memory, and KIROK_forget
  • Mental-model listing, inspection, refresh, and deletion
  • Bank listing, statistics, clearing, deletion, and per-bank configuration

Bank clearing and deletion require explicit confirmation; without it, the tools preview the operation. Memory and mental-model deletion are irreversible according to the documented tool behavior.

Limitations and notes

The server depends on Google Gemini for embedding and language-model operations, so it does not meet a requirement that all data processing remain local. The database itself is stored locally and can be placed elsewhere with KIROK_DB_PATH.

The documented server uses stdio rather than a hosted HTTP endpoint. Native sqlite-vec may be unavailable in some environments, although the NumPy fallback preserves the documented search behavior. The project lists Python 3.12+ as a requirement, and the Gemini API key is required for operation.

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 Kirok Memory

Kirok Memory is an MCP server that connects AI agents to a local SQLite memory store and Google Gemini for embeddings and language-model tasks. Its main tools retain memories, recall them with hybrid search, reflect on stored information, and consolidate memories into reusable observations.

Install and launch it with `uvx kirok-mcp` after installing Python 3.12+, uv, and setting a Google Gemini API key. The package is published on PyPI, and `uvx --from kirok-mcp kirok-doctor` checks the setup.

Set `GEMINI_API_KEY` in `~/.kirok/.env` or pass it through the MCP client configuration. A value supplied in the client configuration takes precedence over the `.env` value.

Yes. Configure Cursor to launch `uvx kirok-mcp` and provide the Gemini API key through the environment.

No. The SQLite database is local, but embeddings, entity extraction, reflection, and consolidation use the Google Gemini API. It is therefore not suitable when all inference and memory processing must remain on-device.

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 PreviewKirok Memory AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/kirok-memory?style=directory)](https://allmcps.com/mcp/kirok-memory)
HTML Embed
<a href="https://allmcps.com/mcp/kirok-memory"><img src="https://allmcps.com/api/badge/kirok-memory?style=directory" alt="Kirok Memory on AllMCPs" /></a>