Get the FREE Ultimate OpenClaw Setup Guide →

mcp-mem.ai

Production-ready MCP server for Mem.ai — intelligent memory platform integration for AI assistants.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add maplehilllabs-mcp-mem.ai

How to use

This MCP server integrates Mem.ai with the Model Context Protocol to provide AI assistants with access to Mem.ai’s memory, notes, and collections. It exposes tools for saving and organizing content, creating and reading markdown notes, and managing collections, all with asynchronous, type-safe request handling. You can deploy the server locally or in your environment and connect it to MCP clients (such as Claude Desktop or custom clients) to enable memory-aware interactions during conversations. The included tools are mem_it for intelligent content processing, create_note for structured notes, read_note and delete_note for note lifecycle, and create_collection and delete_collection for organizing notes into collections. Configure your Mem.ai API key and optional base URL to point at Mem.ai, and leverage the error handling to surface meaningful messages to AI assistants during operations.

How to install

Prerequisites:

  • Python 3.10+
  • A Mem.ai account and MEM_API_KEY
  • Git (optional, for cloning the repository)

Install and run locally:

  1. Clone the repository:
git clone https://github.com/yourusername/mcp-mem.ai.git
cd mcp-mem.ai
  1. Set up a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # on macOS/Linux
venv\Scripts\activate     # on Windows
  1. Install the package in editable mode (or install from PyPI if available):
pip install -e .
  1. Create and configure environment variables:
cp .env.example .env
# Edit .env and set MEM_API_KEY=your_mem_ai_api_key
  1. Run the MCP server:
fastmcp run src/mcp_mem/server.py

Note: You can also run via the CLI example used in the repository:

python -m mcp_mem.server
  1. If integrating with Claude Desktop or another MCP client, add the server configuration to the client with the provided command and environment variables (MEM_API_KEY, MEM_API_BASE_URL, etc.).

Additional notes

Tips and caveats:

  • Ensure MEM_API_KEY is kept secret and loaded from a secure environment or secret manager.
  • MEM_API_BASE_URL may be customized if Mem.ai is accessed via a proxy or enterprise endpoint.
  • MEM_REQUEST_TIMEOUT controls request timeouts to Mem.ai; increase if you experience slow responses.
  • DEBUG mode (MEM_DEBUG=true) can help diagnose issues during development but disable in production.
  • The server uses FastMCP; ensure the client configuration matches the server port and protocol expected by FastMCP.
  • If you encounter authentication errors, verify that MEM_API_KEY is valid and not expired, and that it’s correctly exported in your shell or environment.
  • When testing locally, you can exercise each tool (mem_it, create_note, read_note, delete_note, create_collection, delete_collection) via the provided Python API as shown in the examples of the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers