1. Conduid
  2. Data
  3. Mem Sqlite
MCP server · Data

Mem Sqlite

MCP server: Mem Sqlite

Unclaimed last commit a year ago data
42Fair

Scored 3 months ago · breakdown

About Mem Sqlite

Mem Sqlite is an MCP server published by alosec in the Data category: mCP server: Mem Sqlite. It has been installed 0 times through Conduid.

The repository has 10 stars and 1 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx mem-sqlite

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Mem Sqlite

Powered by Claude · Grounded in docs

I know everything about Mem Sqlite. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

mem-sqlite

Released Tue, Aug 12, 2025

mem-sqlite is an MCP server to let Claude Code query your chat history, powered by a synchronization engine that transforms Claude Code JSONL conversation logs into structured SQLite databases.

TypeScript, MIT License, in beta. Anthropic will probably release a memory function for CC in three days making all of this pointless lol. This README is accurate as of Tue, Aug 12, 2025

Overview

Claude Code stores conversation history as JSONL files in ~/.claude/projects/. mem-sqlite watches these files and transforms them into queryable SQLite databases, enabling conversation search, tool analytics, and real-time monitoring.

Core Components

  • JSONL Watcher - Monitors Claude Code project directories for file changes
  • Message Parser - Transforms JSONL records into structured data
  • Database Engine - SQLite operations with normalized schema
  • MCP Server - Model Context Protocol server for Claude Code integration

Database Schema

sessions        -- Conversation sessions
messages        -- User/assistant messages and summaries  
tool_uses       -- Tool invocations with parameters
tool_use_results -- Tool execution outputs and errors
attachments     -- File attachments and metadata
env_info        -- Environment context per message

Installation & Usage

Docker Deployment (Recommended)

Docker is the recommended deployment method with proper volume mounts:

# Clone and build
git clone https://github.com/alosec/mem-sqlite
cd mem-sqlite

# Start sync daemon
docker compose up -d

# Check status
docker compose ps

# View logs
docker compose logs -f

# One-time sync only
docker compose --profile sync-once up memory-sqlite-sync-once

Local Development (Optional)

For development purposes only:

npm install
npm run build

# One-time sync
npm run cli sync

# Start watcher daemon  
npm run cli start

# Start MCP server (separate terminal)
npm run mcp-server

Claude Code MCP Integration

Add the MCP server to your Claude Code configuration:

# Add the MCP server using Claude Code CLI
claude mcp add-json '{
  "mem-sqlite": {
    "command": "npm", 
    "args": ["run", "mcp-server", "--prefix", "/path/to/mem-sqlite"]
  }
}'

Replace /path/to/mem-sqlite with the actual path to your installation.

Querying Your Conversations

Once the MCP server is configured, simply ask Claude Code to query your conversation history:

"Show me all conversations from the last week"
"What tools have I used most frequently?"
"Find conversations where I worked on React components"
"Show me all error messages from tool executions"

Claude Code will automatically use the mem-sqlite MCP server to query your synchronized conversation database.

File Locations

  • Source: ~/.claude/projects/**/*.jsonl
  • Database: ~/.local/share/memory-sqlite/claude_code.db
  • Transaction Log: ~/.local/share/memory-sqlite/mem_db_changes.jsonl

MCP Integration

The included MCP server provides SQL query access to synchronized conversation data:

// Query recent messages
SELECT userText, assistantText, timestamp 
FROM messages 
WHERE timestamp > datetime('now', '-1 day')
ORDER BY timestamp DESC;

// Tool usage analytics  
SELECT toolName, COUNT(*) as usage_count
FROM tool_uses
GROUP BY toolName
ORDER BY usage_count DESC;

Architecture

Claude Code → JSONL Files → File Watcher → Parser → SQLite → MCP Server
    ↑                                                           ↓
User Activity                                            Claude Code Queries

Dependencies

  • better-sqlite3 - SQLite database operations
  • chokidar - File system watching
  • @modelcontextprotocol/sdk - MCP server implementation
  • TypeScript - Type safety and development experience

Status

Production ready with real-time sync achieving sub-second latency. Successfully processes 500+ JSONL files with complete tool extraction and foreign key integrity.

Known Issues

None as of this time, but surely there are a few bugs! Please consider this software in beta.

Disclaimer

The creator of this repo has taken a good amount of care to ensure safety and security in the repo but nothing is ever guaranteed in life! Please do your own due dilligence and look at the code to ensure this is something you want running on your machine. Trying out the tools, everything looks functional, but YMMV and the software is offered without warranty nor any guarantee of perfection.

License

MIT

README mirrored from the source repository 3 months ago. The original is authoritative.

Questions

About Mem Sqlite

How do I install Mem Sqlite?

Run npx mem-sqlite, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Mem Sqlite safe to use with an AI agent?

Its trust score is 42 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Mem Sqlite still maintained?

The last commit was a year ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.