Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Persistent memory with semantic search for Claude and MCP-compatible clients, storing context that survives conversations and can be retrieved intelligently.

README.md

🧠 MCP Semantic Memory Server

Persistent memory with semantic search for Claude and MCP-compatible clients

![License: MIT](https://opensource.org/licenses/MIT) ![Node.js Version](https://nodejs.org/) ![MCP Compatible](https://modelcontextprotocol.io)

Give your AI assistant persistent memory that survives between conversations. Save context once, retrieve it intelligently forever.

✨ Features

  • 🔍 Semantic Search - Find memories by meaning, not just keywords
  • 💾 SQLite Storage - Fast, reliable, and scalable
  • 👤 User Biography - Structured profile (name, occupation, tech stack, etc.)
  • 🏠 100% Local - No external APIs, all processing on your machine
  • Fast - Powered by all-MiniLM-L6-v2 embeddings (~50ms searches)
  • 🔒 Private - Your data never leaves your computer

🎯 Problem & Solution

Problem: Claude forgets everything between conversations. You constantly re-explain your context, projects, preferences, and tech stack.

Solution: This MCP server gives Claude persistent memory with intelligent semantic search. Save information once, and Claude retrieves it automatically when relevant.

Example

// Save once
save_memory("project-info", "Working on an e-commerce site with Next.js and Stripe")

// Days later, in a new conversation
User: "How do I add payments to my project?"
Claude: *searches memory* "Since you're using Stripe in your e-commerce project..."

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/GFYURI/mcp-semantic-memory.git
cd mcp-semantic-memory

# Install dependencies (pnpm recommended)
pnpm install
# or: npm install

Configuration

Add to your MCP client config (e.g., Claude Desktop):

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "semantic-memory": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-semantic-memory/index.js"]
    }
  }
}

Example (Windows): ``json { "mcpServers": { "semantic-memory": { "command": "node", "args": ["C:\\Users\\YourName\\mcp-semantic-memory\\index.js"] } } } ``

First Run

  1. Restart your MCP client (e.g., Claude Desktop)
  2. The server will download the embedding model (~25MB) on first use
  3. Start saving memories!

📚 Available Tools

Memory Management

save_memory(id, text, metadata?)

Save a memory with semantic embedding.

save_memory({
  id: "my-cat",
  text: "My cat's name is Mia, she's orange and very playful",
  metadata: { category: "personal", type: "pet" }
})

search_memory(query, n_results?, threshold?)

Search memories by semantic similarity.

search_memory({
  query: "what's my pet's name?",
  n_results: 5,      // optional, default: 5
  threshold: 0.3     // optional, default: 0.3 (0-1 scale)
})

get_memory(id)

Retrieve a specific memory by ID.

delete_memory(id)

Delete a memory permanently.

list_all_memories()

List all stored memories (ordered by last update).

User Biography

get_user_bio()

Get the user's complete biographical profile.

set_user_bio(data)

Create or update user biography. All fields are optional.

set_user_bio({
  nombre: "Angel",
  ocupacion: "Student",
  ubicacion: "Santiago, Chile",
  tecnologias: ["Python", "JavaScript", "Node.js"],
  herramientas: ["VS Code", "Docker", "pnpm"],
  idiomas: ["Spanish", "English"],
  timezone: "America/Santiago",
  mascotas: ["Mia (cat)"]
})

update_user_bio(field, value)

Update a single field in the biography.

update_user_bio({
  field: "tecnologias",
  value: ["Python", "JavaScript", "TypeScript"]
})

🎨 Use Cases

For Developers

  • Remember your tech stack and project context
  • Store solutions to common problems
  • Keep track of configurations and preferences

For Students

  • Save study notes and learning progress
  • Remember assignment deadlines and requirements
  • Track research topics and sources

For Everyone

  • Personal preferences and interests
  • Important dates and events
  • Conversation context across sessions

🔧 How It Works

Semantic Search

Traditional keyword search: `` Query: "what's my pet's name?" Memory: "My cat Mia is orange" Result: ❌ No matches (different words) ``

Semantic search: `` Query: "what's my pet's name?" Memory: "My cat Mia is orange" Result: ✅ 78% similarity (understands meaning) ``

Technical Details

  • Embeddings: all-MiniLM-L6-v2 (384 dimensions)
  • Storage: SQLite with optimized indexes
  • Search: Cosine similarity between vectors
  • Performance: ~50-100ms per save, ~200ms search in 100 memories

📊 Database Schema

-- Memories table
CREATE TABLE memories (
  id TEXT PRIMARY KEY,
  text TEXT NOT NULL,
  embedding TEXT NOT NULL,  -- JSON array of 384 floats
  metadata TEXT,            -- JSON object
  created_at TEXT NOT NULL,
  updated_at TEXT NOT NULL
);

-- User biography table
CREATE TABLE user_bio (
  id INTEGER PRIMARY KEY CHECK (id = 1),
  nombre TEXT,
  ocupacion TEXT,
  ubicacion TEXT,
  tecnologias TEXT,  -- JSON array
  herramientas TEXT, -- JSON array
  idiomas TEXT,      -- JSON array
  timezone TEXT,
  mascotas TEXT,     -- JSON array
  created_at TEXT NOT NULL,
  updated_at TEXT NOT NULL
);

🆚 Comparison with Alternatives

| Feature | This MCP | @modelcontextprotocol/server-memory | |---------|----------|-------------------------------------| | Semantic Search | ✅ | ❌ | | User Biography | ✅ | ❌ | | Storage | SQLite | In-memory | | Persistence | ✅ Disk | ❌ RAM only | | Scalability | 1000s of memories | Limited | | Search Speed | Fast (indexed) | N/A |

🛠️ Development

# Install dependencies
pnpm install

# Run locally
node index.js

# Test with MCP inspector
npx @modelcontextprotocol/inspector node index.js

📝 Requirements

  • Node.js >= 18.0.0
  • ~100MB disk space (model + dependencies)
  • MCP-compatible client (Claude Desktop, LM Studio, etc.)

🐛 Troubleshooting

First run takes 30-60 seconds

The embedding model is being downloaded (~25MB). Subsequent runs are instant.

sharp installation fails on Windows

pnpm rebuild sharp
# or
pnpm install --force

Database is locked

Close other connections to memory.db or restart your MCP client.

Memories not loading

Check that the absolute path in your MCP config is correct.

🤝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests
  • Improve documentation

📄 License

MIT License - feel free to use this in your own projects!

🙏 Acknowledgments

⭐ Star History

If you find this useful, consider giving it a star! It helps others discover the project.

---

Made with ❤️ for the MCP community

Report Bug · Request Feature

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.