Enables creation and management of structured markdown-formatted notes within the Mem.ai knowledge management platform
MCP Server for Mem.ai
A production-ready Model Context Protocol (MCP) server that provides AI assistants with intelligent access to Mem.ai's knowledge management platform.
โจ Features
๐ง Intelligent Memory: Save and process content with Mem It's AI-powered organization
๐ Note Management: Create, read, and delete structured markdown notes
๐ Collections: Organize notes into searchable collections
๐ Type-Safe: Full type hints and Pydantic validation
โก Async/Await: High-performance async I/O throughout
๐ฏ Clean API: Simple, intuitive interface for AI assistants
๐ก๏ธ Production-Ready: Comprehensive error handling and logging
๐งช Well-Tested: Full test suite with pytest
๐ Prerequisites
Python 3.10 or higher
A Mem.ai account
Mem.ai API key (get one here)
๐ Quick Start
Installation
Clone the repository:
Install dependencies:
Set up your environment:
Running the Server
Local Development
Using with Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json
):
Using with Other MCP Clients
๐ ๏ธ Available Tools
1. mem_it
- Intelligent Content Processing
Save and automatically process any content type with AI-powered organization.
Parameters:
input
(required): Content to save (text, HTML, markdown, etc.)instructions
(optional): Processing instructionscontext
(optional): Additional context for organizationtimestamp
(optional): ISO 8601 timestamp
Example:
2. create_note
- Create Structured Note
Create a markdown-formatted note with explicit control over content and organization.
Parameters:
content
(required): Markdown-formatted contentcollection_ids
(optional): List of collection UUIDscollection_titles
(optional): List of collection titles
Example:
3. read_note
- Read Note
Retrieve a note's full content and metadata by ID.
Parameters:
note_id
(required): UUID of the note
Example:
4. delete_note
- Delete Note
Permanently delete a note by ID.
Parameters:
note_id
(required): UUID of the note
Example:
5. create_collection
- Create Collection
Create a new collection to organize related notes.
Parameters:
title
(required): Collection titledescription
(optional): Markdown-formatted description
Example:
6. delete_collection
- Delete Collection
Delete a collection (notes remain, just unassociated).
Parameters:
collection_id
(required): UUID of the collection
Example:
โ๏ธ Configuration
Configuration is done via environment variables. Copy .env.example
to .env
and customize:
๐๏ธ Architecture
Key Components
models.py
: Pydantic models for request/response validationclient.py
: Async HTTP client wrapper for Mem.ai APIserver.py
: FastMCP server with tool implementations
๐งช Testing
Run the test suite:
๐ Error Handling
The server provides clear, actionable error messages:
MemAuthenticationError
: Invalid or missing API keyMemNotFoundError
: Resource (note/collection) not foundMemValidationError
: Invalid request parametersMemAPIError
: General API errors
All errors are logged and returned with helpful context to the AI assistant.
๐ Examples
See the examples/
directory for complete usage examples:
basic_usage.py
: Simple examples of each tooladvanced_usage.py
: Complex workflows and patterns
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature
)Commit your changes (
git commit -m 'Add amazing feature'
)Push to the branch (
git push origin feature/amazing-feature
)Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Links
๐ก Use Cases
Meeting Notes: Automatically process and organize meeting transcripts
Research: Save and categorize research papers, articles, and findings
Customer Feedback: Collect and organize customer conversations
Knowledge Base: Build a searchable knowledge repository
Personal Memory: Keep track of ideas, thoughts, and learnings
๐ Troubleshooting
Authentication Error
Solution: Set your MEM_API_KEY
in the .env
file or environment.
Connection Timeout
Solution: Increase MEM_REQUEST_TIMEOUT
in your .env
file.
Invalid UUID
Solution: Ensure note/collection IDs are valid UUIDs from Mem.ai.
This server cannot be installed
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.
Enables 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.