memoryhub

memoryhub

MCP server for persistent memory using Qdrant vector store. Stores text memories with LLM-generated embeddings and retrieves them via semantic search.

Category
访问服务器

README

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/memoryhub

Or run directly:

npx @taraksh011/memoryhub

Quick Start

# Start Qdrant (see docs/install-qdrant.md for help)
docker run -p 6333:6333 qdrant/qdrant

# Start memoryhub in stdio mode (for MCP clients)
memoryhub

# Or as a daemon
memoryhub start
memoryhub status
memoryhub stop

Prerequisites

Memory Hub needs three things:

  1. Qdrant — vector database (install guide)
  2. LLM API — extracts facts from text (e.g. OpenAI, Anthropic, local Ollama)
  3. Embedding API — converts text to vectors (e.g. OpenAI text-embedding-3-small, local Ollama)

If your LLM and embedding APIs are the same provider, you can set just the LLM values and reuse them (see config example below).

Configuration

Configuration is checked in this order: config fileenvironment variabledefault.

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,
  "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-..."
  }
}

If your embedder matches your LLM provider, you can omit embedder — it falls back to the llm settings.

Environment variables

Env Var Default Description
MEMORYHUB_DIR ~/.memoryhub Base directory for config and data files
QDRANT_URL http://localhost:6333 Qdrant server URL
MEMORYHUB_COLLECTION memories Collection name
MEMORYHUB_VECTOR_SIZE 768 Vector dimension
LLM_MODEL LLM model for extraction
LLM_BASE_URL LLM API base URL
LLM_API_KEY LLM API key
EMBED_MODEL Embedding model (falls back to LLM_MODEL)
EMBED_BASE_URL Embedding API base URL (falls back to LLM_BASE_URL)
EMBED_API_KEY Embedding API key (falls back to LLM_API_KEY)
MEMORYHUB_PORT 9876 Port for HTTP/SSE mode

MCP Tools

Tool Description
add_memories Store text (LLM extracts facts, embeds them)
search_memory Semantic search with optional limit
list_memories List memories with pagination (limit, offset)
get_memory Get a single memory by ID
update_memory Update a memory's text (re-embeds)
delete_memories Delete specific memories by IDs
delete_all_memories Delete ALL memories
memory_stats Collection statistics
get_config Show current runtime configuration
update_config Update a config value at runtime (not persisted)
health_check Check connectivity to Qdrant

Config changes via update_config are in-memory only — lost on restart. Use config file or env vars for permanent changes.

Retry

LLM and embedding API calls retry up to 3 times on transient errors (rate limits, server errors) with exponential backoff.

CLI

Command Description
memoryhub Start MCP server in stdio mode
memoryhub serve Start HTTP/SSE server
memoryhub start Daemon mode (background)
memoryhub stop Stop daemon
memoryhub status Check daemon status
memoryhub bootstrap Auto-start Qdrant if needed, then serve
memoryhub install Install auto-start service (systemd/launchd/Windows)
memoryhub uninstall Remove auto-start service
memoryhub --help Show help
memoryhub --version Show version

Transport Modes

  • stdio (default): Connect MCP clients via stdin/stdout
  • HTTP/SSE: memoryhub serve starts an HTTP server on port 9876

Build

pnpm build       # type-check + bundle
pnpm typecheck   # type-check only
pnpm dev         # run with tsx

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选