Memora MCP Server is a lightweight backend built using FastAPI and Neo4j that acts as a memory engine — capable of storing entities and relationships representing personal interests, skills, and experiences as a Knowledge Graph. This project demonstrates how MCP (Model Context Protocol) can be used to give LLMs persistent memory and reasoning over structured context.
- 🧩 Entity and relationship creation with Neo4j
- ⚡ REST API built with FastAPI
- 🤖 Integration-ready MCP endpoint for LLM clients (like Claude)
- 🧠 Designed as a base for building personalized AI memory or contextual intelligence systems
git clone https://github.com/Deepak3168/Memora.git
cd memora-mcp-serverUse venv to keep dependencies simple and isolated:
python -m venv mcp
source mcp/bin/activate # (Linux/Mac)
mcp\Scripts\activate # (Windows)pip install -r requirements.txtuvicorn main:app --host 0.0.0.0 --port 8000 --reloadYour API will now be available at: 👉 http://127.0.0.1:8000/docs
sudo apt install neo4j -yUse this terminal command:
cypher-shell -u neo4j -p neo4j "ALTER CURRENT USER SET PASSWORD FROM 'neo4j' TO 'password';"sudo systemctl start neo4j
sudo systemctl enable neo4jCreate a .env file as mentioned in constants.py:
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_password_hereYou can connect this backend to Claude Desktop as an MCP Server.
-
Open Claude → Settings → Developers → Edit Config
-
Copy the JSON config from:
claude_desktop_config.json -
Restart Claude
- On Windows: close it from Task Manager
- On Mac/Linux: simply restart the app
You should now see Memora MCP Server listed in Claude’s connected MCP tools.
Try this inside Claude after connecting the MCP server:
“From now, create entities and relationships based on my interests, skills, and knowledge. Build a knowledge graph that reflects my personality, expertise, and learning history.”
Claude will then begin creating entities (representing your interests, skills, etc.) and relationships (showing how they connect), gradually forming a personal knowledge graph.
- 🧠 Personalized AI assistants that remember your context
- 🎯 Context-driven recommendations and ads
- 🔍 Graph-to-vector embeddings for LLM fine-tuning
- 🧩 Building a long-term AI memory system
📦 Memora
├── main.py # FastAPI entry point
├── routes/
│ ├── entity_ops.py # Entity creation & listing routes
│ └── relation_ops.py # Relationship endpoints
├── models/
│ └── entity.py # EntityNode definition
| └── relation.py # RelationEdge definition
├── db/
│ └── init.py # Neo4j connection setup
├── constants.py # Env and configuration constants
├── mcp_config.json # MCP config for Claude
└── requirements.txt
Every time you interact with the MCP server, new entities (like Deepak, Backend Developer, Python) and relationships (like Deepak → skilled_in → Python) are stored in Neo4j.
Over time, this forms a graph representation of your memory and interests — a foundational step toward a Memory Engine that can later:
- Generate embeddings
- Train fine-tuned models
- Enable contextual recall for future prompts
Deepak Ootala Passionate about backend development, data engineering, and building intelligent systems that evolve with user context.