
Store and retrieve entities, relations and observations in a persistent local knowledge graph.

An MCP server that gives AI assistants persistent semantic memory, storing coding experiences in a SQLite vector database and retrieving them through similarity search.
Vector Memory MCP Server is cataloged as an MCP server attributed to xsaven. An MCP server that gives AI assistants persistent semantic memory, storing coding experiences in a SQLite vector database and retrieving them through similarity search. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Vector Memory MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
README.md · 4cdfe093e6d6 · 采集于 2026-11-13 13:22:06 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A secure, vector-based memory server for Claude Desktop using sqlite-vec and sentence-transformers. This MCP server provides persistent semantic memory capabilities that enhance AI coding assistants by remembering and retrieving relevant coding experiences, solutions, and knowledge.
sqlite-vecsentence-transformers| Component | Technology | Purpose |
|---|---|---|
| Vector DB | sqlite-vec | Vector storage and similarity search |
| Embeddings | sentence-transformers/all-MiniLM-L6-v2 | 384D text embeddings |
| Normalization | Semantic similarity + guards | Tag/category auto-merge |
| MCP Framework | FastMCP | High-level tools-only server |
| Dependencies | uv script headers | Self-contained deployment |
| Security | Custom validation | Path/input sanitization |
| Testing | pytest + coverage | Comprehensive test suite |
vector-memory-mcp/
├── main.py # Main MCP server entry point
├── README.md # This documentation
├── requirements.txt # Python dependencies
├── pyproject.toml # Modern Python project config
├── .python-version # Python version specification
├── claude-desktop-config.example.json # Claude Desktop config example
│
├── src/ # Core package modules
│ ├── __init__.py # Package initialization
│ ├── models.py # Data models & configuration
│ ├── security.py # Security validation & sanitization
│ ├── embeddings.py # Sentence-transformers wrapper
│ ├── memory_store.py # SQLite-vec operations
│ ├── README_AGENTS.md # Agent documentation (4 levels)
│ └── CASES_AGENTS.md # Use cases for Brain ecosystem
│
└── .gitignore # Git exclusions
This project is organized for clarity and ease of use:
main.py - Start here! Main server entry pointsrc/ - Core implementation (security, embeddings, memory store)claude-desktop-config.example.json - Configuration templateNew here? Start with main.py and claude-desktop-config.example.json
Installing uv (if not already installed):
macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Verify installation:
uv --version
The easiest way to use this MCP server - no cloning or setup required!
Once published to PyPI, you can use it directly:
# Run without installation (like npx)
uvx vector-memory-mcp --working-dir /path/to/your/project
Claude Desktop Configuration (using uvx):
{
"mcpServers": {
"vector-memory": {
"command": "uvx",
"args": [
"vector-memory-mcp",
"--working-dir",
"/absolute/path/to/your/project",
"--memory-limit",
"100000"
]
}
}
}
Note:
--memory-limitis optional. Omit it to use default 10,000 entries.
Note: Publishing to PyPI is in progress. See PUBLISHING.md for details.
Clone the project:
git clone <repository-url>
cd vector-memory-mcp
Install dependencies (automatic with uv): Dependencies are automatically managed via inline metadata in main.py. No manual installation needed.
To verify dependencies:
uv pip list
Test the server:
# Test with sample working directory
uv run main.py --working-dir ./test-memory
Configure Claude Desktop:
Copy the example configuration:
cp claude-desktop-config.example.json ~/path/to/your/config/
Open Claude Desktop Settings → Developer → Edit Config, and add (replace paths with absolute paths):
{
"mcpServers": {
"vector-memory": {
"command": "uv",
"args": [
"run",
"/absolute/path/to/vector-memory-mcp/main.py",
"--working-dir",
"/your/project/path",
"--memory-limit",
"100000"
]
}
}
}
Important:
--memory-limit is optional (default: 10,000)Restart Claude Desktop and look for the MCP integration icon.
# Install globally (once published to PyPI)
pipx install vector-memory-mcp
# Run
vector-memory-mcp --working-dir /path/to/your/project
Claude Desktop Configuration (using pipx):
{
"mcpServers": {
"vector-memory": {
"command": "vector-memory-mcp",
"args": [
"--working-dir",
"/absolute/path/to/your/project",
"--memory-limit",
"100000"
]
}
}
}
store_memory - Store KnowledgeStore coding experiences, solutions, and insights:
Please store this memory:
Content: "Fixed React useEffect infinite loop by adding dependency array with [userId, apiKey]. The issue was that the effect was recreating the API call function on every render."
Category: bug-fix
Tags: ["react", "useEffect", "infinite-loop", "hooks"]
search_memories - Semantic SearchFind relevant memories using natural language:
Search for: "React hook dependency issues"
list_recent_memories - Browse RecentSee what you've stored recently:
Show me my 10 most recent memories
get_memory_stats - Database HealthView memory database statistics:
Show memory database statistics
clear_old_memories - CleanupClean up old, unused memories:
Clear memories older than 30 days, keep max 1000 total
get_by_memory_id - Retrieve Specific MemoryGet full details of a specific memory by its ID:
Get memory with ID 123
Returns all fields including content, category, tags, timestamps, access count, and metadata.
delete_by_memory_id - Delete MemoryPermanently remove a specific memory from the database:
Delete memory with ID 123
Removes the memory from both metadata and vector tables atomically.
get_unique_tags - List All TagsGet all unique tags currently used in memories:
Show all unique tags
Returns sorted list of tags from memory metadata.
get_canonical_tags - List Canonical TagsGet all canonical (normalized) tags:
Show canonical tags
Returns the normalized tag forms after semantic merging. Useful for understanding tag consolidation.
get_tag_frequencies - Tag Usage StatisticsGet frequency count for all canonical tags:
Show tag frequencies
Shows how often each tag is used. Higher frequency = more common tag.
get_tag_weights - IDF WeightsGet IDF-based weights for search relevance:
Show tag weights
Returns weights calculated as 1 / log(1 + frequency):
cookbook - Knowledge Base (CRITICAL)CRITICAL: READ THIS FIRST before using any other tools. Without this, you are operating blind.
# FIRST: Initialize context (READ THIS FIRST)
mcp__vector-memory__cookbook()
# List available categories with keys
mcp__vector-memory__cookbook(include="categories")
# Cases by key (exact match)
mcp__vector-memory__cookbook(include="cases", case_category="gates-rules")
mcp__vector-memory__cookbook(include="cases", case_category="search")
# Search in cookbook
mcp__vector-memory__cookbook(include="cases", query="JWT token")
mcp__vector-memory__cookbook(include="docs", query="tag normalization", level=2)
# Pagination
mcp__vector-memory__cookbook(include="cases", query="task", limit=5, offset=0)
# Documentation by level
mcp__vector-memory__cookbook(include="docs", level=0) # Quick start
mcp__vector-memory__cookbook(include="docs", level=2) # Advanced patterns
# Full debug info
mcp__vector-memory__cookbook(include="all", level=3)
Parameters:
| Parameter | Values | Description |
|---|---|---|
include | "init", "docs", "cases", "categories", "all" | What to return (default "init") |
level | 0-3 | Docs verbosity (default 0) |
case_category | string | Filter cases by key (exact) or title (partial) |
query | string | Text search in content |
limit | 1-50 | Max results (default 10) |
offset | int | Pagination offset (default 0) |
Include Modes:
| Mode | Returns |
|---|---|
init | FIRST READ - quick start + available resources |
docs | Documentation by level |
cases | Use case scenarios (filtered by category/query) |
categories | List of categories with keys and descriptions |
all | Everything combined |
Docs Levels:
| Level | Content |
|---|---|
| 0 | Identity & Quick Start |
| 1 | Practical Usage |
| 2 | Advanced Patterns |
| 3 | Architecture & Internals |
Category Keys:
| Key | Description |
|---|---|
cookbook-usage | How to use cookbook() tool |
store | Store memories with deduplication |
search | Multi-probe search, pre-task mining |
statistics | Memory stats, tag frequencies |
task-management | Memory integration with Task MCP |
brain-docs | CLI docs indexing |
agent-coordination | Brain delegation, multi-agent |
integration | Multi-source knowledge, error recovery |
debugging | Debug flow with memory capture |
cleanup | Delete operations, cleanup by age |
gates-rules | CRITICAL/HIGH priority rules |
task-integration | Memory-Task workflow patterns |
Case Categories: Cookbook Usage, Store, Search, Statistics, Task Creation, Task Decomposition, Task Status, Brain Docs, Agent Coordination, Integration, Debugging, Cleanup
Contains: 4 documentation levels + 12 use case categories + Brain ecosystem reference.
| Category | Use Cases |
|---|---|
code-solution | Working code snippets, implementations |
bug-fix | Bug fixes and debugging approaches |
architecture | System design decisions and patterns |
learning | New concepts, tutorials, insights |
tool-usage | Tool configurations, CLI commands |
debugging | Debugging techniques and discoveries |
performance | Optimization strategies and results |
security | Security considerations and fixes |
other | Everything else |
The server automatically normalizes tags and categories using semantic similarity to maintain consistency.
When storing memories, similar tags are merged into canonical tags:
| Input Tags | Canonical Result |
|---|---|
api v2.0, api 2, API version 2 | api v2.0 |
php8, PHP 8, php-8 | php8 |
laravel, laravel framework | laravel (with substring boost) |
✅ Merges when:
api v2.0 ↔ api 2 (threshold 0.85)php8 ↔ php 8 (threshold 0.90)laravel ⊂ laravel framework (+0.03 similarity)❌ Never merges:
api v1 ≠ api v2php7 ≠ php8type:refactor ≠ refactortype:refactor ≠ type:bugapi ≠ rest api, ui ≠ web uiUse structured tags for fine-grained organization:
["type:refactor", "priority:high", "domain:api", "module:auth"]
Allowed prefixes: type, domain, strict, cognitive, batch, module, vendor, priority, scope, layer
Invalid prefixes are rejected: random:stuff → removed
Categories are also normalized semantically. Short inputs use dictionary fallback:
| Input | Output |
|---|---|
bugfix, bug, fix | bug-fix |
auth, sec | security |
perf, opt | performance |
debug | debugging |
arch, design | architecture |
| Threshold | Value | Purpose |
|---|---|---|
| Tag merge | 0.90 | Default similarity for merge |
| Same version | 0.85 | Lower threshold for same-version tags |
| Substring boost | +0.03 | Boost for subset tags |
| Category | 0.50 | Category matching threshold |
| Min substring length | 4 | Minimum for substring boost |
These tags never get substring boost (too generic):
api, ui, db, test, auth, infra, ci, cd, app, lib, sdk, cli, gui, web, sql, orm, log, cfg, env, dev, prod, stg
Good tags (describe subject/domain):
["authentication", "laravel", "middleware", "api v2"]
Bad tags (describe tools/activities):
["phpstan", "ci", "tests", "run-migration"] # Don't use these
Tags are weighted using IDF (Inverse Document Frequency):
weight = 1 / log(1 + frequency)
| Tag | Frequency | Weight | Interpretation |
|---|---|---|---|
api | 50 | 0.26 | Very common, low discriminative power |
laravel | 10 | 0.43 | Common, moderate discriminative power |
module:terminal | 2 | 1.44 | Rare, high discriminative power |
Use get_tag_weights to see all weights. Rare tags boost search relevance more than common tags.
The server supports the following arguments:
# Run with uv (recommended) - default 10,000 memory limit
uv run main.py --working-dir /path/to/project
# With custom memory limit for large projects
uv run main.py --working-dir /path/to/project --memory-limit 100000
# Working directory is where memory database will be stored
uv run main.py --working-dir ~/projects/my-project --memory-limit 500000
Available Options:
--working-dir (required): Directory where memory database will be stored--memory-limit (optional): Maximum number of memory entries
your-project/
├── memory/
│ └── vector_memory.db # SQLite database with vectors
├── src/ # Your project files
└── other-files...
--memory-limit (default: 10,000 entries)# Store a useful code pattern
"Implemented JWT refresh token logic using axios interceptors"
# Store a debugging discovery
"Memory leak in React was caused by missing cleanup in useEffect"
# Store architecture decisions
"Chose Redux Toolkit over Context API for complex state management because..."
# Store team conventions
"Team coding style: always use async/await instead of .then() chains"
# Store deployment procedures
"Production deployment requires running migration scripts before code deploy"
# Store infrastructure knowledge
"AWS RDS connection pooling settings for high-traffic applications"
# Store learning insights
"Understanding JavaScript closures: inner functions have access to outer scope"
# Store performance discoveries
"Using React.memo reduced re-renders by 60% in the dashboard component"
# Store security learnings
"OWASP Top 10: Always sanitize user input to prevent XSS attacks"
The server uses sentence-transformers to convert your memories into 384-dimensional vectors that capture semantic meaning:
| Query | Finds Memories About |
|---|---|
| "authentication patterns" | JWT, OAuth, login systems, session management |
| "database performance" | SQL optimization, indexing, query tuning, caching |
| "React state management" | useState, Redux, Context API, state patterns |
| "API error handling" | HTTP status codes, retry logic, error responses |
The get_memory_stats tool provides comprehensive insights:
{
"total_memories": 247,
"memory_limit": 100000,
"usage_percentage": 0.25,
"categories": {
"code-solution": 89,
"bug-fix": 67,
"learning": 45,
"architecture": 23,
"debugging": 18,
"other": 5
},
"recent_week_count": 12,
"database_size_mb": 15.7,
"health_status": "Healthy"
}
# Check if uv is installed
uv --version
# Test server manually
uv run main.py --working-dir ./test
# Check Python version
python --version # Should be 3.10+
~/Library/Logs/Claude/get_memory_stats to check database healthclear_old_memories to clean up old entriesRun the server manually to see detailed logs:
uv run main.py --working-dir ./debug-test
Store multiple related memories by calling the tool multiple times through Claude Desktop interface.
Use tags to organize by project:
["project-alpha", "frontend", "react"]["project-beta", "backend", "node"]["project-gamma", "devops", "docker"]["javascript", "react", "hooks"]["python", "django", "orm"]["aws", "lambda", "serverless"]["authentication", "security", "jwt"]["performance", "optimization", "caching"]["testing", "unit-tests", "mocking"]"Code review insight: Extract validation logic into separate functions for better testability and reusability"
"Sprint retrospective: Using feature flags reduced deployment risk and enabled faster rollbacks"
"Technical debt: UserService class has grown too large, needs refactoring into smaller domain-specific services"
Based on testing with various dataset sizes:
| Memory Count | Search Time | Storage Size | RAM Usage |
|---|---|---|---|
| 1,000 | <50ms | ~5MB | ~100MB |
| 5,000 | <100ms | ~20MB | ~200MB |
| 10,000 | <200ms | ~40MB | ~300MB |
Tested on MacBook Air M1 with sentence-transformers/all-MiniLM-L6-v2
The memory store uses 4 optimized indexes for performance:
Content deduplication uses SHA-256 hashing to prevent storing identical memories:
Each memory tracks usage statistics for intelligent management:
Smart cleanup prioritizes memory retention based on multiple factors:
This is a standalone MCP server designed for personal/team use. For improvements:
This project is released under the MIT License.
Built for developers who want persistent AI memory without the complexity of dedicated vector databases.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Vector Memory MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/vector-memory-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

Organize problem solving into revisable, branching thought steps through an MCP tool.

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.