mem0 MCP Server

by sadiuysal

Integrations

  • Provides the runtime environment for the MCP server implementation.

  • Used for package management and running scripts for the MCP server.

  • Implements the Model Context Protocol server using TypeScript for type safety and modern JavaScript features.

mem0 MCP Server

A TypeScript implementation of the Model Context Protocol (MCP) server for mem0, providing memory stream functionality with Mem0 integration.

Features

  • Create memory streams with Mem0 integration
  • Append content to memory streams
  • Search memories using Mem0's semantic search
  • Read from memory streams
  • Resource-based access to memory streams
  • Delete memory streams

Prerequisites

  1. Node.js and npm installed
  2. Mem0 API key (get one from mem0.ai)

Installation

npm install

Configuration

Set your Mem0 API key as an environment variable:

export MEM0_API_KEY=your-api-key-here

Building

npm run build

Running the Server

npm start

Testing

Run the test client to verify server functionality:

npm test

API

Tools

  1. create-memory-stream
    • Parameters:
      • name: string
      • initialContent: string (optional)
      • userId: string (optional) - Mem0 user ID
      • agentId: string (optional) - Mem0 agent ID
    • Returns: Stream ID and metadata
  2. append-to-stream
    • Parameters:
      • streamId: string
      • content: string
      • role: "user" | "assistant" (optional)
    • Returns: Success confirmation
  3. search-memories
    • Parameters:
      • query: string
      • userId: string
      • agentId: string (optional)
      • threshold: number (optional)
    • Returns: Search results from Mem0
  4. read-stream
    • Parameters:
      • streamId: string
      • startIndex: number (optional)
      • endIndex: number (optional)
    • Returns: Stream content
  5. delete-stream
    • Parameters:
      • streamId: string
    • Returns: Deletion confirmation

Resources

  • memory://{streamId} - Access memory stream content directly
  • memory:// - List all memory streams

Development

The server is implemented using the MCP TypeScript SDK and provides integration with Mem0 for persistent memory storage and semantic search. To extend the implementation:

  1. Add more Mem0 features (e.g., memory tagging, metadata)
  2. Implement proper error handling
  3. Add authentication and authorization
  4. Add additional memory operations

License

MIT

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A TypeScript implementation of the Model Context Protocol server that enables creation, management, and semantic search of memory streams with Mem0 integration.

  1. Features
    1. Prerequisites
      1. Installation
        1. Configuration
          1. Building
            1. Running the Server
              1. Testing
                1. API
                  1. Tools
                  2. Resources
                2. Development
                  1. License

                    Related MCP Servers

                    • A
                      security
                      F
                      license
                      A
                      quality
                      A TypeScript-based template for developing Model Context Protocol servers with features like dependency injection and service-based architecture, facilitating the creation and integration of custom data processing tools.
                      Last updated -
                      1
                      2
                      TypeScript
                    • -
                      security
                      F
                      license
                      -
                      quality
                      Model Context Protocol (MCP) server implementation for semantic search and memory management using TxtAI. This server provides a robust API for storing, retrieving, and managing text-based memories with semantic search capabilities. You can use Claude and Cline AI Also
                      Last updated -
                      4
                      Python
                      • Apple
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A Model Context Protocol server that enables Claude to persistently store, search, and manage text memories with tags in a local JSON file.
                      Last updated -
                      TypeScript
                      • Apple
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A TypeScript framework for building Model Context Protocol (MCP) servers with automatic discovery and loading of tools, resources, and prompts.
                      Last updated -
                      67
                      TypeScript
                      • Apple

                    View all related MCP servers

                    ID: rqp5fusn53