Memori MCP Server
Security-first MCP server exposing Memori-backed remember and recall tools for IDE agents like Claude Code, Cursor, and Cline.
Overview
memori-mcp is an MCP (Model Context Protocol) server that gives AI coding assistants
persistent memory capabilities. It exposes two simple tools - remember and recall -
backed by Memori's semantic memory layer.
The server is designed with security as the primary concern, following MCP security best practices to ensure safe operation in agentic environments.
Security Design
This server follows MCP security guidance and implements multiple layers of protection:
🎯 Least Privilege
Only two tools exposed. No file-system access, no network calls, no shell execution.
🔐 Scoped Memory
Memories are isolated by entity_id + process_id to prevent cross-project leakage.
📏 Input Limits
Size caps and validation on all tool inputs to prevent abuse and resource exhaustion.
🙈 No Secrets in Logs
Structured logging avoids dumping request payloads by default.
🚫 No Code Execution
Tools validate inputs and never execute arbitrary code (MCP-01 mitigation).
🔒 Local by Default
stdio transport with no open network listeners (MCP-05 mitigation).
Installation
From PyPI (Recommended)
From Source
Dependencies
memori>=3.1.5- Memori SDK for memory operationsmcp>=1.26.0- Model Context Protocol SDKpydantic>=2.5- Input validationsqlalchemy>=2.0- Database abstraction
Configuration
Configure the server using environment variables:
| Variable | Default | Description |
|---|---|---|
MEMORI_MCP_DB |
sqlite:///./memori.db |
Database connection string |
MEMORI_MCP_ENTITY_ID |
Current OS user | User/entity identifier for memory scoping |
MEMORI_MCP_PROCESS_ID |
Current working directory name | Project/process identifier for memory scoping |
Available Tools
memori.remember
Stores a memory snippet such as decisions, preferences, TODOs, or architectural notes.
memori.recall
Recalls relevant memories using semantic search based on the query.
Client Configuration
Configure your AI coding assistant to use the Memori MCP server:
Running the Server
Start the server directly (uses stdio transport by default):
The server will start and listen for MCP messages on stdin/stdout. Your AI assistant client handles the connection automatically based on the configuration above.
Hardening Recommendations
For production deployments, consider these additional security measures:
- Use dedicated databases per user/repo to prevent cross-project memory leakage
- Run locally over stdio when possible (the default for Claude Code/Cursor/Cline)
- If exposing over network, put it behind authentication and IP allowlists
- Monitor logs for unusual tool usage patterns
- Keep dependencies updated for security patches
Ready to Get Started?
Install the Memori MCP server and give your AI coding assistant persistent memory.
Resources
- GitHub Repository: github.com/colygon/memori-mcp
- MCP Specification: modelcontextprotocol.io
- MCP Security Guide: modelcontextprotocol-security.io
- Memori Documentation: memorilabs.ai/docs
- AI Assistants Guide: Integration walkthrough
Found a security issue? Please report it to security@memorilabs.ai
Back to Home