mcp-mem0  by coleam00

MCP server template for long-term agent memory using Mem0

created 3 months ago
491 stars

Top 63.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a template implementation of a Model Context Protocol (MCP) server, integrating with Mem0 to offer AI agents persistent, semantically indexed long-term memory. It's designed for developers building custom MCP servers or as a reference for AI coding assistants, enabling agents to store, retrieve, and search memories efficiently.

How It Works

The server implements three core memory management functions: save_memory for storing and indexing, get_all_memories for retrieving all data, and search_memories for semantic retrieval. It leverages Mem0 for vector storage and semantic indexing, adhering to Anthropic's best practices for MCP server development, ensuring compatibility with MCP-compatible clients.

Quick Start & Requirements

  • Install: Clone the repository and install dependencies using uv pip install -e ..
  • Prerequisites: Python 3.12+, PostgreSQL (Supabase recommended) for vector storage, LLM API keys (OpenAI, OpenRouter, Ollama), and Docker (recommended).
  • Setup: Create a .env file from .env.example and configure environment variables.
  • Running: Use uv run src/main.py for SSE transport or configure clients for stdio transport. Docker images can be built and run similarly.
  • Docs: Configuration details and integration examples for various clients (Claude Desktop, Windsurf, n8n) are provided.

Highlighted Details

  • Supports both SSE (Server-Sent Events) and stdio transport protocols.
  • Configurable LLM providers (OpenAI, OpenRouter, Ollama) and embedding models.
  • PostgreSQL/Supabase integration for persistent vector storage.
  • Serves as a foundational template for building more complex MCP servers with custom tools and resources.

Maintenance & Community

The repository is maintained by coleam00. No specific community channels or roadmap links are provided in the README.

Licensing & Compatibility

The repository does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is presented as a template and reference implementation. Specific performance benchmarks, detailed error handling, or production-readiness assessments are not included. The absence of an explicit license may pose a barrier to commercial adoption.

Health Check
Last commit

3 months ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
307 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
1 more.

fastmcp by punkpeye

3.7%
2k
TypeScript framework for building MCP servers handling client sessions
created 7 months ago
updated 2 days ago
Feedback? Help us improve.