This MCP server provides Claude with memory capabilities through a knowledge graph stored in MongoDB. It uses a REST API for persistence, allowing the memory to be shared and persisted across sessions.
- Create and manage entities with observations
- Create relationships between entities
- Search through entities and their observations
- Persistent storage through MongoDB
- Full CRUD operations for entities, relations, and observations
The server requires the following environment variables:
-
MEMORY_API_KEY
: API key for authentication with the MongoDB API -
MEMORY_API_URL
: URL of the MongoDB API server (defaults to http://localhost:3000 if not set)
You can set these environment variables in your system or use them when configuring the MCP server in your settings file.
npm install @modelcontextprotocol/server-memory-mongo
Add the following to your MCP settings file (e.g., cline_mcp_settings.json
or claude_desktop_config.json
):
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/memory-mongo/dist/index.js"],
"env": {
"MEMORY_API_KEY": "your_api_key_here",
"MEMORY_API_URL": "https://memory-api-production.up.railway.app"
}
}
}
}
-
create_entities
: Create new entities in the knowledge graph -
create_relations
: Create relationships between entities -
add_observations
: Add observations to existing entities -
delete_entities
: Remove entities and their relations -
delete_observations
: Remove specific observations from entities -
delete_relations
: Remove relationships between entities -
read_graph
: Retrieve the entire knowledge graph -
search_nodes
: Search for nodes based on a query -
open_nodes
: Retrieve specific nodes by their names
# Install dependencies
npm install
# Build the server
npm run build
# Watch for changes during development
npm run watch
MIT