npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

openmemory

v0.0.1

Published

A Model Context Protocol (MCP) server that provides memory storage and retrieval capabilities using [Mem0](https://github.com/mem0ai/mem0). This tool allows you to store and search through memories, making it useful for maintaining context and making info

Readme

Mem0 Memory MCP Server

A Model Context Protocol (MCP) server that provides memory storage and retrieval capabilities using Mem0. This tool allows you to store and search through memories, making it useful for maintaining context and making informed decisions based on past interactions.

Features

  • Store memories with user-specific context
  • Search through stored memories with relevance scoring
  • Simple and intuitive API
  • Built on the Model Context Protocol
  • Automatic error handling
  • Support for multiple user contexts

Installation

Running with npx

env MEM0_API_KEY=your-api-key-here npx -y @mem0/mcp

Manual Installation

npm install -g @mem0/mcp

Configuration for AI Tools

Running on Cursor

Configuring Cursor 🖥️

To configure Mem0 MCP in Cursor:

  1. Open Cursor Settings
  2. Go to Features > MCP Servers
  3. Click "+ Add New MCP Server"
  4. Enter the following:
    • Name: "mem0-mcp" (or your preferred name)
    • Type: "command"
    • Command: env MEM0_API_KEY=your-api-key-here npx -y @mem0/mcp

To configure Mem0 MCP using JSON configuration:

{
  "mcpServers": {
    "mem0-mcp": {
      "command": "npx",
      "args": ["-y", "@mem0/mcp"],
      "env": {
        "MEM0_API_KEY": "YOUR-API-KEY-HERE"
      }
    }
  }
}

Running on VS Code

Add the following JSON block to your User Settings (JSON) file in VS Code:

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "apiKey",
        "description": "Mem0 API Key",
        "password": true
      }
    ],
    "servers": {
      "mem0-memory": {
        "command": "npx",
        "args": ["-y", "@mem0/mcp"],
        "env": {
          "MEM0_API_KEY": "${input:apiKey}"
        }
      }
    }
  }
}

Available Tools

1. Add Memory Tool (add-memory)

Store new memories with user-specific context.

{
  "name": "add-memory",
  "arguments": {
    "content": "User prefers dark mode interface",
    "userId": "user123"
  }
}

2. Search Memories Tool (search-memories)

Search through stored memories to retrieve relevant information.

{
  "name": "search-memories",
  "arguments": {
    "query": "What are the user's interface preferences?",
    "userId": "user123"
  }
}

Response Format

Add Memory Response

{
  "content": [
    {
      "type": "text",
      "text": "Memory added successfully"
    }
  ],
  "isError": false
}

Search Memory Response

{
  "content": [
    {
      "type": "text",
      "text": "Memory: User prefers dark mode interface\nRelevance: 0.95\n---\nMemory: User mentioned liking minimal UI\nRelevance: 0.82\n---"
    }
  ],
  "isError": false
}

Configuration

Environment Variables

  • MEM0_API_KEY: Your Mem0 API key (required)

Development

Prerequisites

  • Node.js (v14 or higher)
  • A Mem0 API key

Setup

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Create a .env file in the root directory and add your Mem0 API key:
MEM0_API_KEY=your-api-key-here

Running Development Server

To run the server in development mode:

npm run dev

Building

To build the project:

npm run build

Starting the Server

To start the server after building:

npm start

Error Handling

The server includes error handling for:

  • API connection issues
  • Invalid memory operations
  • Search errors
  • Authentication failures

Example error response:

{
  "content": [
    {
      "type": "text",
      "text": "Error: Failed to search memories: Invalid API key"
    }
  ],
  "isError": true
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT