Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables AI assistants to interact with mem.ai memory through a standardized interface, providing complete API coverage with tools for notes, collections, and memory operations.

README.md

mem.ai MCP Server

![npm version](https://www.npmjs.com/package/@hskksk/mem-ai-mcp-server) ![License: MIT](https://opensource.org/licenses/MIT)

Model Context Protocol (MCP) server for mem.ai API integration. This server enables AI assistants like Claude to interact with your mem.ai memory through a standardized interface.

Features

  • Complete API Coverage: All 11 mem.ai API endpoints wrapped as MCP tools
  • TypeScript: Fully typed with strict mode enabled
  • Easy Integration: Works seamlessly with Claude Desktop and other MCP clients
  • Error Handling: Comprehensive error handling with detailed messages
  • Validation: Input validation using Zod schemas

Installation

No installation required! You can run the server directly using npx (recommended), or install it globally if you prefer.

Using npx (Recommended)

npx @hskksk/mem-ai-mcp-server

This automatically downloads and runs the latest version without requiring installation.

Global Installation (Optional)

npm install -g @hskksk/mem-ai-mcp-server

Configuration

Get Your API Key

  1. Visit mem.ai settings
  2. Generate a new API key
  3. Copy the key for configuration

Environment Variables

Create a .env file or set environment variables:

MEM_API_KEY=your_api_key_here

Optional configuration:

# Override the default API base URL (default: https://api.mem.ai)
MEM_API_BASE_URL=https://api.mem.ai

Usage

With Claude Desktop (Recommended)

Add the following configuration to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "mem-ai": {
      "command": "npx",
      "args": ["-y", "@hskksk/mem-ai-mcp-server"],
      "env": {
        "MEM_API_KEY": "your_api_key_here"
      }
    }
  }
}

After restarting Claude Desktop, you'll be able to use mem.ai tools in your conversations.

Alternative: Using Global Installation

If you've installed the package globally:

{
  "mcpServers": {
    "mem-ai": {
      "command": "mem-ai-mcp-server",
      "env": {
        "MEM_API_KEY": "your_api_key_here"
      }
    }
  }
}

Standalone Usage

# Using npx (recommended)
MEM_API_KEY=your_api_key_here npx @hskksk/mem-ai-mcp-server

# Or if installed globally
MEM_API_KEY=your_api_key_here mem-ai-mcp-server

Available Tools

Mem It

  • mem_it - Remember any content intelligently
  • Primary endpoint for saving information to mem.ai
  • Supports context and instructions for better processing
  • Parameters: input (required), instructions, context, timestamp

Notes Management

  • create_note - Create a new note with markdown content
  • Parameters: content (required), id, collection_ids, collection_titles, created_at, updated_at
  • get_note - Retrieve a specific note by ID
  • Parameters: noteId (required)
  • delete_note - Delete a note
  • Parameters: noteId (required)
  • list_notes - List all notes with advanced filtering and pagination
  • Supports cursor-based pagination with page and next_page
  • Parameters:
  • limit - Maximum number of results (default: 50, max: 100)
  • page - Cursor for pagination (from previous next_page)
  • order_by - Sort order: created_at or updated_at (default: updated_at)
  • collection_id - Filter by collection ID
  • contains_open_tasks - Filter notes with open tasks
  • contains_tasks - Filter notes with any tasks
  • contains_images - Filter notes with images
  • contains_files - Filter notes with files/attachments
  • include_note_content - Include full markdown content in response
  • search_notes - Search across notes with advanced filtering
  • Parameters:
  • query - Search query (optional)
  • filter_by_collection_ids - Filter by collection IDs array
  • filter_by_contains_open_tasks - Filter notes with open tasks
  • filter_by_contains_tasks - Filter notes with any tasks
  • filter_by_contains_images - Filter notes with images
  • filter_by_contains_files - Filter notes with files
  • config - Response configuration (include_snippet, include_content)

Collections Management

  • create_collection - Create a new collection
  • Parameters: title (required), description
  • get_collection - Retrieve a specific collection by ID
  • Parameters: collectionId (required)
  • delete_collection - Delete a collection
  • Parameters: collectionId (required)
  • list_collections - List all collections with pagination
  • Supports cursor-based pagination with page and next_page
  • Parameters:
  • limit - Maximum number of results (default: 50, max: 100)
  • page - Cursor for pagination (from previous next_page)
  • order_by - Sort order: created_at or updated_at (default: updated_at)
  • search_collections - Search across collections
  • Parameters:
  • query - Search query (optional)
  • config - Response configuration (include_description)

Development

Prerequisites

  • Node.js >= 20.0.0
  • pnpm (recommended) or npm

Setup

# Clone the repository
git clone https://github.com/hskksk/mem-ai-mcp-server.git
cd mem-ai-mcp-server

# Install dependencies
pnpm install

# Copy environment template
cp .env.example .env

# Edit .env and add your API key

Development Commands

# Run in development mode with auto-reload
pnpm dev

# Build the project
pnpm build

# Run tests
pnpm test

# Type check
pnpm type-check

# Lint
pnpm lint

Project Structure

src/
├── index.ts              # Entry point
├── server.ts             # MCP server setup
├── config/
│   └── env.ts           # Environment configuration
├── client/
│   └── mem-api-client.ts # mem.ai API client
├── tools/               # MCP tool implementations
│   ├── base-tool.ts
│   ├── mem-it.ts
│   ├── notes/
│   └── collections/
├── types/               # TypeScript type definitions
└── utils/               # Utility functions

API Documentation

For detailed information about the mem.ai API, visit the official API documentation.

Error Handling

The server provides detailed error messages for common issues:

  • 401 Unauthorized: Invalid API key
  • 404 Not Found: Resource not found
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Server Error: Internal server error

All errors are returned in a structured format for easy debugging.

Contributing

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

License

This project is licensed under the MIT License - see the LICENSE file for details.

Links

Support

If you encounter any issues or have questions:

  1. Check the GitHub Issues
  2. Create a new issue with detailed information
  3. Refer to the mem.ai API documentation

Changelog

See CHANGELOG.md for the full version history.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.