memoryhub
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
memoryhub
MCP server for persistent memory using Qdrant vector store.
Stores text memories with LLM-generated embeddings and retrieves them via semantic search.
Install
npm install @taraksh011/memoryhubOr run directly:
npx @taraksh011/memoryhubRelated MCP server: mcp-server-qdrant
Quick Start
# Start Qdrant (see docs/install-qdrant.md for help)
docker run -p 6333:6333 qdrant/qdrant
# Set API credentials (or run the setup wizard)
memoryhub configure
# Start memoryhub in stdio mode (for MCP clients)
memoryhub
# Or auto-start Qdrant + serve in one step
memoryhub bootstrapPrerequisites
Memory Hub needs three things:
Node.js >= 24 — runtime
Qdrant — vector database (install guide)
LLM API — extracts facts from text (e.g. OpenAI, Anthropic, local Ollama)
Embedding API — converts text to vectors (e.g. OpenAI
text-embedding-3-small, local Ollama)
Qdrant and the embedding API are required. The LLM is optional: if it is unset or fails, the raw text is stored as-is instead of extracted facts. The embedding config is separate from the LLM config — it does not fall back to it (see config example below). memoryhub configure walks you through all of them.
Configuration
Configuration is checked in this order: environment variable → config file → default.
Config files are looked up in this order (first existing wins): $MEMORYHUB_CONFIG → ./memoryhub.json → ~/.memoryhub/config.json.
The config file is hot-reloaded: edits are picked up within ~1 second without restarting the server (a 1s watcher re-reads the file and logs config hot-reloaded (...)). Environment variables are read once at startup, so they still require a restart. Runtime update_config values keep precedence over the file until the process restarts.
Config file
Create a memoryhub.json in your project root, or config.json in the memoryhub directory (~/.memoryhub/ by default):
{
"qdrant": {
"url": "http://localhost:6333"
},
"collection": "memories",
"vector_size": 768,
"retry_delay_ms": 1000,
"dedup": {
"enabled": true,
"threshold": 0.85,
"skip_threshold": 0.99
},
"llm": {
"model": "gpt-4o-mini",
"base_url": "https://api.openai.com/v1",
"api_key": "sk-..."
},
"embedder": {
"model": "text-embedding-3-small",
"base_url": "https://api.openai.com/v1",
"api_key": "sk-..."
}
}The embedder config is required — it does not fall back to the llm settings. Embedding models and chat models are usually different endpoints, so both must be configured explicitly.
Environment variables
Short names (LLM_BASE, LLM_KEY) are preferred. Long names (LLM_BASE_URL, LLM_API_KEY) are supported for backward compatibility.
Env Var | Short Alias | Default | Description |
| — |
| Base directory for config and data files |
| — |
| Qdrant server URL |
| — |
| Collection name |
| — |
| Vector dimension |
| — | — | LLM model for extraction |
|
| — | LLM API base URL |
|
| — | LLM API key |
| — |
| Output-token limit sent to the LLM |
| — |
| Name of the token-limit field. |
| — |
| Sampling temperature. |
| — | — | JSON object merged into the chat-completions request body (e.g. |
| — | — | JSON object merged into the chat-completions request headers |
| — | — | Embedding model (required) |
|
| — | Embedding API base URL (required) |
|
| — | Embedding API key (required) |
| — | — | JSON object merged into the embeddings request body (e.g. |
| — | — | JSON object merged into the embeddings request headers |
| — |
| Port for HTTP serve mode |
| — |
| Bind host for HTTP serve mode (dual-stack by default: accepts both IPv4 and IPv6 on |
| — |
| Set |
| — |
| Base retry delay for LLM/embed API calls (exponential backoff) |
| — |
| Semantic dedup on |
| — |
| Similarity score ≥ this merges the new fact into the existing memory |
| — |
| Similarity score ≥ this skips the new fact entirely (identical duplicate) |
| — | — | Optional bearer token. When set, the HTTP transport requires |
| — |
| Idle timeout for HTTP sessions in milliseconds. |
Customizing LLM / embedding requests
Providers and models differ in which request fields they accept (OpenAI reasoning models reject max_tokens and non-default temperature, for example). MemoryHub adapts automatically for gpt-5*/o* models and exposes everything else:
LLM_MAX_TOKENS_PARAMandLLM_TEMPERATUREacceptauto(default),none(omit the field), or an explicit value.LLM_EXTRA_BODY/LLM_EXTRA_HEADERS(andEMBED_EXTRA_BODY/EMBED_EXTRA_HEADERS) are JSON objects merged into the request, so any provider-specific field or header can be set — env var or config file.
{
"llm": {
"model": "gpt-5-nano",
"base_url": "https://api.openai.com/v1",
"temperature": "none",
"extra_body": { "reasoning_effort": "low" }
}
}Memory Scopes
Memories can be global or project-scoped:
Omit
project→ memory is global (visible to all searches)Pass
project="my-repo"→ memory is scoped to that projectSearch/list without
project→ returns all memories (global + all projects)Search/list with
project="my-repo"→ returns only that project's memories
Use scopes to keep memories isolated per repo, per feature, or any other boundary.
MCP Tools
Tool | Description | Scope Support |
| Store text (LLM extracts facts, embeds them). Deduplicates near-duplicates by default. Optional | Optional |
| Add multiple texts in one call ( | Optional |
| Semantic search with optional limit; returns full metadata per hit. Filter by | Optional |
| List memories with pagination ( | Optional |
| Get a single memory by ID (full metadata) | — |
| Get multiple memories by IDs | — |
| Update a memory's text (re-embeds); optional | — |
| Delete specific memories by IDs | — |
| Delete ALL memories (or filter by project) | Optional |
| Export memories as JSON ( | Optional |
| Import export JSON (array or | — |
| Report-only audit: buckets for expired, expiring soon ( | Optional |
| Collection statistics: totals, | — |
| Show current runtime configuration (API keys masked) | — |
| Update a config value at runtime; set | — |
| Check connectivity to Qdrant | — |
Every memory stores created_at, updated_at, and (when provided) project, source, expires_at, importance; all read tools return these fields. Memory IDs must be UUIDs (or numeric strings) — invalid IDs are rejected with a validation error before hitting Qdrant.
Config changes via
update_configare in-memory only unlesspersist: trueis passed (writes to~/.memoryhub/config.jsonatomically, survives restart).
Retry
LLM and embedding API calls retry up to 3 attempts on transient errors (rate limits, server errors) with exponential backoff.
CLI
Command | Description |
| Start MCP server in stdio mode |
| Start Streamable HTTP server |
| Daemon mode (background) |
| Stop daemon |
| Check daemon status |
| Auto-start Qdrant if needed, then serve |
| Interactive setup wizard (Qdrant, LLM, embedder) with connectivity checks; |
| Install auto-start service (systemd/launchd/Windows) pointing at the latest installed binary — package upgrades are picked up on the next boot/restart automatically, no re-run needed. |
| Remove auto-start service |
| Show help |
| Show version |
Transport Modes
stdio (default): Connect MCP clients via stdin/stdout
Streamable HTTP:
memoryhub servestarts an HTTP server on port 9876 implementing the MCP Streamable HTTP transport (singlePOST /mcpendpoint, session management viaMcp-Session-Idheader,DELETE /mcpto close a session). Clients must sendAccept: application/json, text/event-streamon POST requests. The server binds to::dual-stack by default (accepts both IPv4 and IPv6) — setMEMORYHUB_IPV6_ONLY=trueto restrict to IPv6 only, orMEMORYHUB_HOSTto pick a specific address. By default sessions are not pruned for idleness; whenMEMORYHUB_SESSION_IDLE_MSis set, sessions that stay silent past the timeout are pruned and subsequent requests with the old session ID get404— clients must then re-initialize (send a freshinitializewithout a session ID), per the MCP Streamable HTTP spec.
Remote clients connect to http://<host>:9876/mcp. If API_TOKEN is set, every request must include Authorization: Bearer <token>; unauthenticated requests get 401. Request bodies are capped at 5 MB (413).
Build
pnpm build # type-check + bundle
pnpm typecheck # type-check only
pnpm dev # run with tsxLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Shared cross-LLM long-term memory over MCP: semantic recall, sessions, and media (pgvector).
Cloud-hosted MCP server for durable AI memory
Related MCP Servers
- AlicenseNot gradedqualityDmaintenancePersistent semantic memory server for AI assistants via MCP, enabling long-term context retention and semantic search across conversations.12MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Qdrant vector database with local BERT embeddings. Enables semantic search and vector storage operations through natural language.MIT
- AlicenseBqualityDmaintenanceAn MCP server for storing and retrieving memories using Qdrant vector search, acting as a semantic memory layer.2Apache 2.0
- FlicenseNot gradedqualityCmaintenancePersistent memory MCP server for AI agents that stores, recalls, and searches conversation history, key-value context, and long-term entries across sessions with semantic search and FIFO queues.89 npm1-