mem.ai MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mem.ai MCP Server save 'dentist appointment next Tuesday' to my memory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mem.ai MCP Server
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
Related MCP server: Memos MCP Server
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-serverThis automatically downloads and runs the latest version without requiring installation.
Global Installation (Optional)
npm install -g @hskksk/mem-ai-mcp-serverConfiguration
Get Your API Key
Visit mem.ai settings
Generate a new API key
Copy the key for configuration
Environment Variables
Create a .env file or set environment variables:
MEM_API_KEY=your_api_key_hereOptional configuration:
# Override the default API base URL (default: https://api.mem.ai)
MEM_API_BASE_URL=https://api.mem.aiUsage
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-serverAvailable Tools
Mem It
mem_it- Remember any content intelligentlyPrimary 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 contentParameters:
content(required),id,collection_ids,collection_titles,created_at,updated_at
get_note- Retrieve a specific note by IDParameters:
noteId(required)
delete_note- Delete a noteParameters:
noteId(required)
list_notes- List all notes with advanced filtering and paginationSupports cursor-based pagination with
pageandnext_pageParameters:
limit- Maximum number of results (default: 50, max: 100)page- Cursor for pagination (from previousnext_page)order_by- Sort order:created_atorupdated_at(default:updated_at)collection_id- Filter by collection IDcontains_open_tasks- Filter notes with open taskscontains_tasks- Filter notes with any taskscontains_images- Filter notes with imagescontains_files- Filter notes with files/attachmentsinclude_note_content- Include full markdown content in response
search_notes- Search across notes with advanced filteringParameters:
query- Search query (optional)filter_by_collection_ids- Filter by collection IDs arrayfilter_by_contains_open_tasks- Filter notes with open tasksfilter_by_contains_tasks- Filter notes with any tasksfilter_by_contains_images- Filter notes with imagesfilter_by_contains_files- Filter notes with filesconfig- Response configuration (include_snippet,include_content)
Collections Management
create_collection- Create a new collectionParameters:
title(required),description
get_collection- Retrieve a specific collection by IDParameters:
collectionId(required)
delete_collection- Delete a collectionParameters:
collectionId(required)
list_collections- List all collections with paginationSupports cursor-based pagination with
pageandnext_pageParameters:
limit- Maximum number of results (default: 50, max: 100)page- Cursor for pagination (from previousnext_page)order_by- Sort order:created_atorupdated_at(default:updated_at)
search_collections- Search across collectionsParameters:
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 keyDevelopment 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 lintProject 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 functionsAPI 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:
Check the GitHub Issues
Create a new issue with detailed information
Refer to the mem.ai API documentation
Changelog
See CHANGELOG.md for the full version history.
Available Tools
11 toolscreate_collectionB
Create a new collection in mem.ai.
Inputs: title (required), description.
create_noteB
Create a new note in mem.ai with markdown content.
Inputs: content (required), id, created_at, updated_at, +2 more.
delete_collectionB
Delete a collection from mem.ai.
Inputs: collection_id (required).
delete_noteB
Delete a note from mem.ai.
Inputs: note_id (required).
get_collectionA
Retrieve a specific collection by its ID.
Inputs: collection_id (required).
get_noteA
Retrieve a specific note by its ID.
Inputs: note_id (required).
list_collectionsA
List all collections in mem.ai with optional sorting and cursor-based pagination.
Inputs: page, limit, order_by.
list_notesA
List all notes in mem.ai with optional filtering, sorting, and cursor-based pagination.
Inputs: page, limit, order_by, collection_id, +5 more.
mem_itA
Remember any content intelligently. This is the primary endpoint for saving information to mem.ai.
Inputs: input (required), context, timestamp, instructions.
search_collectionsC
Search across all collections in mem.ai with optional query and configuration.
Inputs: query, config.
search_notesB
Search across all notes in mem.ai with optional query and advanced filtering options.
Inputs: query, config, filter_by_collection_ids, filter_by_contains_files, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
mem_it and create_note both handle saving content, creating ambiguity in which to use. list_notes and search_notes have overlapping filtering and query capabilities, though descriptions help differentiate. Overall, most tools target distinct operations.
Most tools follow a consistent verb_noun pattern with pluralization for listing/searching. The exception is 'mem_it', which breaks the convention and uses an imperative phrase instead of a clear verb_noun structure.
11 tools cover two main resources (notes and collections) with a full set of CRUD-like operations plus search and a special save capability. This is well-scoped and appropriate for the server's purpose.
The tool set provides create, get, delete, list, and search for both notes and collections, but lacks update operations for either resource, which is a notable gap for a note-taking service. This prevents agents from modifying existing notes or collections.
Maintenance
Related MCP Connectors
Securely search, create, and organize your Mem notes and collections from AI assistants.
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to intelligently save, organize, and retrieve content through Mem.ai's knowledge management platform. Supports creating notes, collections, and AI-powered content processing with automatic organization.4MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Memos instances for knowledge management. Supports searching, creating, updating, and retrieving memos with markdown content, tags, and visibility controls.45MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to manage memories via the mem9 memory service, supporting memory storage, semantic search, retrieval, update, and deletion across multiple platforms.5Apache 2.0
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Memos instances, supporting multi-instance connections, note management, tags, attachments, and shortcuts.1614 npm2MIT