mem.ai MCP Server
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
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
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
- 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_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
- Parameters:
-
get_note- Retrieve a specific note by ID- Parameters:
noteId(required)
- Parameters:
-
delete_note- Delete a note- Parameters:
noteId(required)
- Parameters:
-
list_notes- List all notes with advanced filtering and pagination- Supports cursor-based pagination with
pageandnext_page - Parameters:
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
- Supports cursor-based pagination with
-
search_notes- Search across notes with advanced filtering- Parameters:
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)
- Parameters:
Collections Management
-
create_collection- Create a new collection- Parameters:
title(required),description
- Parameters:
-
get_collection- Retrieve a specific collection by ID- Parameters:
collectionId(required)
- Parameters:
-
delete_collection- Delete a collection- Parameters:
collectionId(required)
- Parameters:
-
list_collections- List all collections with pagination- Supports cursor-based pagination with
pageandnext_page - Parameters:
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)
- Supports cursor-based pagination with
-
search_collections- Search across collections- Parameters:
query- Search query (optional)config- Response configuration (include_description)
- Parameters:
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:
- 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。