haksnbot-memory
Provides persistent memory storage for AI agents with full-text search, tagging, and importance levels, enabling agents to store and retrieve memories efficiently.
README
haksnbot-memory
An MCP (Model Context Protocol) server that provides persistent memory storage for AI agents. Uses SQLite with full-text search for efficient storage and retrieval of memories.
Part of the Haksnbot suite: This project was originally developed as part of Haksnbot, an autonomous Minecraft bot. The suite includes four repos that work together: haksnbot-tools (Minecraft bot control), haksnbot-mind (the autonomous agent), haksnbot-admin (server administration), and haksnbot-memory (this repo - persistent memory). Each can be used independently, but they're designed to work together.
Features
- Persistent storage - Memories survive agent restarts
- Full-text search - Find memories by content using FTS5
- Tagging system - Organize memories with flexible tags
- Importance levels - Prioritize significant memories
- Pagination - Handle large memory collections efficiently
Installation
git clone https://github.com/haksndot/haksnbot-memory.git
cd haksnbot-memory
npm install
Usage with Claude Code
Add to your Claude Code MCP settings (~/.claude/settings.json):
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/haksnbot-memory/src/index.js"]
}
}
}
Configuration
The database path can be set via environment variable:
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/haksnbot-memory/src/index.js"],
"env": {
"MEMORY_DB_PATH": "/path/to/memories.db"
}
}
}
}
If not set, defaults to memories.db in the package directory.
Available Tools
| Tool | Description |
|---|---|
create_memory |
Store a new memory with optional tags, context, and importance |
get_memory |
Retrieve a specific memory by ID |
update_memory |
Update an existing memory's content, tags, or importance |
delete_memory |
Remove a memory |
list_memories |
List memories with filtering, sorting, and pagination |
search_memories |
Full-text search across memory content, tags, and context |
get_memory_stats |
Get statistics: total count, tag distribution, date range |
Memory Structure
Each memory contains:
- content - The main memory text (required)
- tags - Array of categorization tags (e.g.,
["player:Steve", "event:trade"]) - context - Additional context about when/where the memory was created
- importance - Priority level 1-10 (default 5)
- created_at / updated_at - Timestamps
Examples
> Remember that Steve helped me find diamonds at coordinates -234, 12, 567
> Search my memories for anything about Steve
> List my most important memories (importance >= 8)
> What do I remember about trading?
Requirements
- Node.js 18+
Dependencies
- better-sqlite3 - SQLite bindings
- @modelcontextprotocol/sdk - MCP server SDK
Related Projects
- haksnbot-mind - Autonomous Minecraft bot using Claude Agent SDK
- haksnbot-tools - Minecraft MCP tools
- haksnbot-admin - Server administration MCP tools
License
MIT
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.