PAI Memory MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PAI Memory MCP Serversearch for recent learnings about React hooks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PAI Memory MCP Server
Semantic and keyword search across your AI work sessions, learnings, reflections, failures, research, and relationships. Built for PAI (Personal AI Infrastructure).
What It Does
Indexes your PAI MEMORY/ directory into a searchable SQLite database with:
Keyword search via FTS5 (full-text search) — works offline, no dependencies
Semantic search via LM Studio embeddings — meaning-based retrieval using
nomic-embed-text-v1.5MCP server exposing 7 tools for cross-tool access via Model Context Protocol
Related MCP server: LBrain MCP Server
Supported Memory Types
Type | Source | Description |
|
| Work sessions with META.yaml, tasks, and markdown notes |
|
| Algorithm execution and system learnings |
|
| JSONL self-assessment after each task |
|
| JSONL session ratings with sentiment |
|
| Context dumps from low-rated sessions |
|
| Research output files |
|
| Relationship memory notes |
Installation
cd ~/.claude/MCPs/pai-memory
bun installCLI Usage
# Index all MEMORY/ content into SQLite
bun cli.ts index
# Search (semantic if LM Studio running, keyword fallback)
bun cli.ts search "hook performance"
# Generate embeddings via LM Studio
bun cli.ts embed
# Show database statistics
bun cli.ts statsMCP Tools
When registered as an MCP server, exposes these tools:
Tool | Description |
| Semantic/keyword search across all memory types |
| List recent work sessions with status filter |
| List recent learnings with category filter |
| Get full details of a specific work entry |
| Database statistics — entry counts, size, embedding coverage |
| List recent failure analyses |
| List algorithm performance reflections |
MCP Registration
Add to your .mcp.json:
{
"mcpServers": {
"pai-memory": {
"command": "bun",
"args": ["run", "mcp-server.ts"],
"cwd": "/path/to/pai-memory"
}
}
}Architecture
cli.ts CLI entry point (index, search, embed, stats)
mcp-server.ts MCP server (7 tools via StdioServerTransport)
src/
types.ts Shared types (MemoryEntry, SearchResult, MemoryStats)
db.ts SQLite layer (FTS5 + cosine similarity + embeddings)
memory-reader.ts Filesystem parser (YAML, JSON, JSONL, Markdown)
search.ts Unified search (semantic first, keyword fallback)
embedder.ts LM Studio embedding client (nomic-embed-text-v1.5)
data/
pai-memory.db SQLite database (generated, not committed)Requirements
Bun runtime
PAI with populated
MEMORY/directoryOptional: LM Studio with
nomic-embed-text-v1.5for semantic search
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/srieg/pai-memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server