Turbovec MCP Server
Click on "Deploy 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., "@Turbovec MCP Serversearch my memory for how we handle user authentication"
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.
Turbovec MCP - Long-Term Memory for AI Coding Assistants
Turbovec MCP is an ultra-fast, local-first Model Context Protocol (MCP) server that equips your AI assistant with a persistent, autonomous memory across chats, editors, and projects.
Everything runs strictly on your machine — zero network calls, zero external databases, zero cloud dependencies. It seamlessly unifies vector ANN search (turbovec), full-text keyword search (SQLite FTS5), and a typed knowledge graph with time travel and background intelligence.
Works out of the box with Claude Desktop, Cursor, Cline / Roo Code, Windsurf, Zoo Code, and any standard MCP client.
Table of Contents
Related MCP server: Heimdall MCP Server
Why Turbovec?
Problem | What Turbovec Does |
Token bloat & context pollution | Pasting huge files drains tokens and impairs reasoning. Turbovec stores them once and extracts only the most relevant, context-rich chunks. |
Amnesia between sessions | Closing a chat wipes your decisions and guidelines. Turbovec persists typed entities, weighted relations, and session summaries locally. |
Keyword search misses intent | Exact keywords miss synonyms and rephrased queries. Turbovec fuses vector semantic search and SQLite FTS5 lexical search via Reciprocal Rank Fusion (RRF). |
Stale, fragmented notes | Manual notes drift into disorganization. An autonomous background librarian clusters concepts (DBSCAN), surfaces unlinked ideas, and prunes stale data. |
Destructive updates | Modifying knowledge overwrites past assumptions. Turbovec supports point-in-time time travel to audit or diff project history at any timestamp. |
Key Features
Hybrid Search with RRF & Reranking: Combines fast cosine similarity vector search (
turbovec) and BM25/FTS5 keyword search using Reciprocal Rank Fusion (RRF), with optional cross-encoder reranking.Rich Typed Knowledge Graph: Entities, weighted relationships, and timestamped observations with ontology enforcement. Traverse entity neighborhoods with one-call
get_hologram.Time Travel & Timeline Audit: Every mutation is timestamped. Diff knowledge states between any two points in time or inspect your graph as of any past moment.
Autonomous Background Librarian & Radar: Runs DBSCAN concept clustering, identifies latent relationships (
semantic_radar), synthesizes new concepts, and flags orphaned nodes without slowing you down.Message Bottles (Cross-Session Hand-offs): Leave prioritized, expiring sticky notes for subsequent sessions (e.g. "auth migration halfway done, tests pending").
100% Local-First & Private: In-process SQLite DB + local vector index. No remote vector stores, no external API keys required for core retrieval.
How Retrieval Works
A query evaluated by search_memory passes through an orchestrated multi-stage pipeline designed for low latency, high recall, and fail-loud transparency.
graph TD
Q[User Query] --> VC[1. Vector Channel: Sentence-Transformers + Turbovec ANN]
Q --> LC[2. Lexical Channel: Sanitized SQLite FTS5 BM25]
VC --> RRF[3. Reciprocal Rank Fusion: RRF Score Blending]
LC --> RRF
RRF --> HYD[4. Batched Graph Hydration: Entity Nodes + Observations]
HYD --> CE{Reranker Enabled?}
CE -- Yes --> RERANK[5. Cross-Encoder Transformer Rerank: ms-marco-MiniLM]
CE -- No --> OUT[Final Ranked Results]
RERANK --> OUT
OUT --> EXP[6. Graph Context Expansion: get_hologram Local Subgraph]Retrieval Stages
Vector Channel (Semantic Search)
The query text is encoded using Sentence-Transformers (
all-MiniLM-L6-v2at 384 dimensions by default, orBAAI/bge-m3at 1024 dimensions).Queries under 4,096 characters hit an in-memory LRU cache (
EMBEDDING_CACHE_SIZE=512), eliminating model overhead for repeated or overlapping searches.The embedded vector queries the native
turbovecindex (IdMapIndex) using cosine distance. An oversampling multiplier (vector_oversample=5, minimum 100 candidates) guarantees deep candidate recall.Vector IDs are resolved to entity IDs via
vector_id_mappingjoined with SQLitenodesin chunked batches, automatically filtering out archived entities and scoping to the targetproject_id.
Lexical Channel (Exact & Keyword Search)
The query is sanitized via
sanitize_fts_queryto escape syntax characters and prevent malformed query exceptions.SQLite FTS5 executes an exact BM25 lexical match against
entities_fts(ORDER BY rank), targeting entity names, aliases, and indexed property fields.Archived entities are excluded, preserving genuine lexical ranking order.
Reciprocal Rank Fusion (RRF)
The independent rank lists from the vector and lexical channels are combined without fragile score-normalization or scale-matching heuristics.
The standard RRF formula is applied: $$\text{RRF}(d) = \sum_{c \in {\text{vector}, \text{lexical}}} \frac{w_c}{k + \text{rank}_c(d)}$$ where $k = 60.0$ by default and $w_c$ allows custom channel weighting (e.g., lexical-only or vector-heavy biasing).
If cross-encoder reranking is active, the candidate pool expands to
limit * rerank_candidate_multiplier(default 3x) to give the reranker a wider selection.
Batched Graph Hydration
Candidate entity IDs are hydrated in chunked SQLite queries (
fetch_nodesandfetch_observations), avoiding N+1 round-trips.Hydrates core entity metadata, JSON properties, status, and chronological observations.
Increments entity salience counters (
retrieval_count,last_retrieved_at) atomically.
Optional Cross-Encoder Reranking
When
RERANKER_ENABLED=true, candidate text pairs (query against hydrated entity name, type, and concatenated observations) are evaluated by a cross-encoder model (cross-encoder/ms-marco-MiniLM-L-6-v2).Re-sorts candidates based on joint attention scores, significantly improving precision for subtle queries before slicing to the requested
limit.
Graph Context Expansion
Results provide structured context rather than bare text snippets.
Clients can call
get_hologram(node_id, depth=1)to pull the complete local subgraph — node attributes, weighted relationships, and connected neighbor entities — providing holistic context directly into the AI prompt window.
Quick Start
1. Clone & Set Up Environment
git clone https://github.com/henny-bee/Turbovec-MCP-Tiar.git
cd Turbovec-MCP-Tiar
# Create and activate virtual environment
python -m venv venv
# macOS / Linux:
source venv/bin/activate
# Windows (Command Prompt / PowerShell):
.\venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt2. Verify Startup
python main.pyStartup logs and database initialization are written to server.log.
Client Integration & Configs
Crucial: Always use the absolute path to your virtual environment's Python, never a bare
python. A bare command uses your global system Python and will throwModuleNotFoundError.
1. Claude Desktop
Add this to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"turbovec": {
"command": "/absolute/path/to/Turbovec-MCP-Tiar/venv/bin/python",
"args": ["/absolute/path/to/Turbovec-MCP-Tiar/main.py"],
"env": {
"PYTHONUNBUFFERED": "1",
"BACKGROUND_DISCOVERY": "true"
}
}
}
}(On Windows, use forward slashes or escaped backslashes, e.g., C:/path/to/venv/Scripts/python.exe)
2. Cursor
Navigate to Cursor Settings -> Features -> MCP -> Add New MCP Server:
Name:
turbovecType:
commandCommand:
/absolute/path/to/Turbovec-MCP-Tiar/venv/bin/python(orC:/path/to/venv/Scripts/python.exeon Windows)Args:
["/absolute/path/to/Turbovec-MCP-Tiar/main.py"]
3. Cline / Roo Code
Open your cline_mcp_settings.json (accessible via the MCP tab in the extension settings, or located at %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json on Windows, or ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json on Linux):
{
"mcpServers": {
"turbovec": {
"command": "/absolute/path/to/Turbovec-MCP-Tiar/venv/bin/python",
"args": ["/absolute/path/to/Turbovec-MCP-Tiar/main.py"],
"env": {
"PYTHONUNBUFFERED": "1",
"BACKGROUND_DISCOVERY": "true"
},
"disabled": false
}
}
}(On Windows, use forward slashes or escaped backslashes, e.g., C:/path/to/venv/Scripts/python.exe)
4. Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"turbovec": {
"command": "/absolute/path/to/Turbovec-MCP-Tiar/venv/bin/python",
"args": ["/absolute/path/to/Turbovec-MCP-Tiar/main.py"],
"env": {
"PYTHONUNBUFFERED": "1"
}
}
}
}(On Windows, use forward slashes or escaped backslashes, e.g., C:/path/to/venv/Scripts/python.exe)
5. Standalone / SSE Mode (Shared Server)
If multiple editors or clients need to share a single memory instance without spawning duplicate processes:
Create a
.envfile in the project root:run_mode=localStart the server:
python main.py # Serves SSE endpoint on http://localhost:4392/sseConnect any MCP client via SSE URL:
{ "mcpServers": { "turbovec": { "url": "http://localhost:4392/sse" } } }
Custom Instructions for AI Assistants
To ensure your assistant actively queries and maintains memory without prompting, add the following snippet to your client's system prompt (e.g., Cursor .cursorrules, Cline .clinerules, or Claude Desktop Project instructions):
# Long-Term Memory Guidelines (Turbovec MCP)
You have access to Turbovec MCP tools for persistent long-term memory across sessions.
1. Session Start:
- Check unread hand-off notes using `get_bottles()`.
- Query project context and recent architecture decisions using `search_memory(query="...")`.
2. During Work:
- When encountering a novel architectural pattern, convention, or domain entity, persist it using `create_entity()` and attach timestamped context using `add_observation()`.
- Connect related entities using `create_relationship()` with validated relation types from ontology.json.
- For complete local context of an entity and its neighbors, invoke `get_hologram(node_id="...")`.
3. Session End / Milestones:
- When completing major milestones or handing off unfinished work, leave a note using `create_bottle(message="...", priority="high")`.
- Record significant breakthroughs with `record_breakthrough()`.Core Tools Cheatsheet
Turbovec provides 35 specialized MCP tools across distinct functional domains:
Category | Key Tools | What They Do |
Search & Retrieval |
| Hybrid vector + FTS5 search (fused via RRF) or pure vector search. |
Structured Graph |
| Build and traverse the typed graph. |
Documents & Files |
| Ingest local files or text chunks; auto-embeds and links to the graph. |
Time Travel |
| Inspect graph state at any timestamp or diff changes between two dates. |
Autonomous Radar |
| Discovers latent connections between unlinked entities using vector proximity. |
Message Bottles |
| Cross-session hand-off notes and reminders that persist outside the graph. |
Sessions & History |
| Track chronological project work units and chain milestones. |
Lifecycle & Hygiene |
| Archive superseded concepts and prune orphaned nodes safely. |
Librarian & Admin |
| Autonomous DBSCAN concept clustering, PageRank centrality, and index compaction. |
(For complete argument schemas and defaults, refer to the Tools Reference.)
Developer Dashboard
Turbovec includes an interactive Streamlit dashboard for visualizing your knowledge graph, monitoring search latency percentiles, and tracking background librarian cycles.
pip install -r requirements-dashboard.txt
streamlit run dashboard/app.pyOpen http://localhost:8501 in your browser. Reads directly from your local memory.db.
Configuration & Environment
Tune behavior via .env or your MCP client's env block. Key settings include:
Variable | Default | Purpose |
| (unset) | Set to |
|
| Run background daemon to discover unlinked relationships. |
|
| Discovery daemon interval in seconds. |
|
| Embedding backend: |
|
| Reciprocal Rank Fusion smoothing constant. |
|
| Set |
|
| SQLite database file path. |
|
| Turbovec vector index file path. |
(Full reference available in the Configuration Guide.)
Documentation
Guide | Description |
In-depth setup, Docker instructions, environment variables, and SQLite storage schema. | |
Exhaustive parameter reference for all 35 tools and 2 prompt templates. | |
System prompt templates to ensure assistants use memory consistently. | |
Architectural layout, performance benchmarks, and design decisions. |
Testing & Development
Run the test suite with pytest:
pip install -r requirements-dev.txt
# Run all 78 unit & integration tests
pytest
# Enforce code style
black .Docker deployment is also supported:
docker-compose up -dLicense
Distributed under the MIT License. See LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Hosted persistent memory with semantic search, importance and TTL for AI agents.
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceProvides persistent memory for AI coding assistants, storing and retrieving architectural decisions, patterns, and solutions across sessions using semantic search, while also offering git integration for commit messages and code expertise mapping.MIT- AlicenseNot gradedqualityDmaintenanceProvides AI coding assistants with persistent, context-rich memory of a codebase, including documentation and git history, enabling recall across sessions.105Apache 2.0
- AlicenseAqualityBmaintenanceProvides persistent memory and a codebase knowledge graph for AI coding assistants, enabling shared context across multiple tools like Claude, Cursor, and ChatGPT, with significant token reduction.522 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides long-term memory for AI coding agents, enabling them to remember, search, and organize information across sessions and platforms like Claude Code, ChatGPT, and Cursor.8 npm8MIT