/ Каталог / Песочница / mcp-memory-service
● Сообщество doobidoo ⚡ Сразу

mcp-memory-service

автор doobidoo · doobidoo/mcp-memory-service

Persistent long-term memory for your AI with semantic search, tags, 5ms retrieval, and cloud sync — SQLite local, Cloudflare for multi-device.

doobidoo/mcp-memory-service is a Python MCP that stores semantic memories for agents. Default SQLite-vec backend is fast (5ms), a Cloudflare backend syncs across devices, and a hybrid mode writes locally first and replicates async. Includes a REST API, web dashboard, and OAuth 2.0 for remote access.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

memory-service.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "memory-service": {
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ],
      "_inferred": true
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "memory-service": {
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ],
      "_inferred": true
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "memory-service": {
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ],
      "_inferred": true
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "memory-service": {
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ],
      "_inferred": true
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "memory-service",
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "memory-service": {
      "command": {
        "path": "uvx",
        "args": [
          "mcp-memory-service"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add memory-service -- uvx mcp-memory-service

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: mcp-memory-service

How to give Claude stable memory of your preferences and context

👤 Daily power users tired of re-explaining themselves ⏱ ~10 min beginner

Когда использовать: Every new chat starts from scratch and you want continuity.

Предварительные требования
  • uvx installed — brew install uv
Поток
  1. Seed preferences
    memory_store: 'I work on iOS + Swift projects. Prefer MVVM with @Observable. Always comment in English.' with tags [preference, coding].✓ Скопировано
    → Stored confirmation
  2. In a future session, retrieve
    memory_search: 'my coding style preferences'.✓ Скопировано
    → Preferences returned, agent applies them
  3. Decay cleanup
    Show me memories older than 90 days with no recent hits — offer to prune.✓ Скопировано
    → Stale list for review

Итог: Claude behaves like it remembers you.

Подводные камни
  • Storing sensitive PII that becomes retrievable forever — Don't — treat memory like a public notebook. Use tags to compartmentalize.

How to share a memory pool across a team via Cloudflare backend

👤 Teams running shared AI workflows ⏱ ~30 min advanced

Когда использовать: You want every engineer's chat to remember the same architectural decisions.

Предварительные требования
  • Cloudflare account with Workers KV or D1 — cloudflare.com, set up as per the Cloudflare backend docs
Поток
  1. Switch backend
    Configure MCP_MEMORY_BACKEND=cloudflare with CF creds in env.✓ Скопировано
    → Memory endpoints point to CF
  2. Seed team-shared memory
    memory_store: 'Our auth lives in services/auth. Always rotate JWT keys via the rotate-keys Make target.' with tag 'team-arch'.✓ Скопировано
    → Stored
  3. Verify from a second machine
    memory_search 'auth service' — should return the same entry.✓ Скопировано
    → Cross-device hit

Итог: Shared institutional memory that survives team turnover.

Подводные камни
  • Sensitive data in shared memory leaks cross-team — Run separate backends per team; don't store secrets

How to auto-harvest learnings at the end of a coding session

👤 Solo devs using agents heavily ⏱ ~5 min beginner

Когда использовать: At the end of a pair-programming chat, before closing.

Поток
  1. Run the harvester
    memory_harvest on this conversation — extract durable facts (API keys patterns, project decisions, known gotchas). Ignore chit-chat.✓ Скопировано
    → Structured list of candidate memories
  2. Approve + save
    Save items 1, 3, 5 as memories with tag 'project-x'. Drop the rest.✓ Скопировано
    → Count saved

Итог: Low-friction capture of what you learned, nothing more.

Комбинации

Сочетайте с другими MCP — эффект x10

memory-service + contextplus

Use Context+ for live repo state, memory-service for durable cross-session facts

Save this architectural decision to memory-service and link it to the relevant files via Context+ memory graph.✓ Скопировано
memory-service + github

After each merged PR, harvest learnings into memory

Summarize the last 10 merged PRs in org/repo, extract repeat mistakes, and store them as memories with tag 'code-review-lessons'.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
memory_store content: str, tags?: str[] Save a durable fact 1 embedding
memory_search query: str, tags?: str[], limit?: int Retrieve relevant memories 1 vector search (local)
memory_harvest transcript: str End-of-session capture 1 LLM call
memory_store_session session_id, messages Ingest a whole chat N embeddings

Стоимость и лимиты

Во что обходится

Квота API
SQLite-vec: unlimited local. ChromaDB: local. Cloudflare: Workers/KV/D1 free tier is generous.
Токенов на вызов
Store: ~100 tokens for content. Search: ~50 tokens per result.
Деньги
Free (open source). Cloudflare backend: free tier usually enough.
Совет
Start with SQLite-vec. Switch to hybrid only when you need multi-device sync.

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: Local filesystem for SQLite mode Cloudflare API token for CF mode
Хранение учётных данных: CF creds via env vars
Исходящий трафик: Local (SQLite) or your Cloudflare account (CF)
Никогда не давайте: Don't let untrusted prompts call memory_store — poisoning attacks

Устранение неполадок

Частые ошибки и исправления

ModuleNotFoundError: sqlite_vec

pip/uv install with the sqlite-vec extra: uvx 'mcp-memory-service[sqlite]'

Проверить: python -c 'import sqlite_vec'
Cloudflare backend 403

Token lacks Workers/KV permissions. Create a new CF API token with the specific scopes.

Memories returned aren't relevant

Re-embed with a better model — defaults to local MiniLM; upgrade to nomic-embed via env var.

memory_harvest outputs duplicates

Enable the dedup config; harvester will skip items with cosine similarity > 0.95 to existing.

Альтернативы

mcp-memory-service в сравнении

АльтернативаКогда использоватьКомпромисс
mem0You want a hosted memory SaaSPaid beyond free tier; vendor-locked
contextplus memory graphYou want memory tightly integrated with code understandingScoped to a repo, not general-purpose

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills