mem0 Memory System
# ✨ mem0 MCP Server Core Files ✨
This document outlines the core files needed to run the mem0 MCP server, separate from examples and tests.
## Core Server Files
These are the essential files needed to run the mem0 MCP server:
- **`server.py`**: The main server file that runs the FastAPI server
- **`api.py`**: Contains the API endpoints for the MCP server
- **`memory_provider.py`**: Implements the memory provider functionality
- **`auto_memory.py`**: Implements the autonomous memory functionality
- **`models.py`**: Defines the data models used by the API
- **`client.py`**: Client library for interacting with the mem0 MCP server
- **`start_mem0_server.py`**: Script to start the mem0 MCP server (for MCP integration)
- **`run_server.sh`**: Simple shell script to run the server with various options
## Configuration Files
- **`.env.example`**: Example environment variables file
- **`.env`**: Your environment variables (not tracked by git)
- **`requirements.txt`**: Python dependencies
## Documentation
- **`README.md`**: Main README file
- **`COMPREHENSIVE_README.md`**: Detailed documentation
- **`ENV_CONFIGURATION.md`**: Environment configuration guide
- **`INSTALL.md`**: Installation instructions
- **`MCP_INTEGRATION_GUIDE.md`**: Guide for integrating with MCP
## Directory Structure
```
mem0-mcp-server/
├── server.py # Main server file
├── api.py # API endpoints
├── memory_provider.py # Memory provider implementation
├── auto_memory.py # Autonomous memory implementation
├── models.py # Data models
├── client.py # Client library
├── start_mem0_server.py # MCP server starter script
├── run_server.sh # Simple server runner script
├── .env.example # Example environment variables
├── .env # Your environment variables (not tracked)
├── requirements.txt # Python dependencies
├── README.md # Main README
├── COMPREHENSIVE_README.md # Detailed documentation
├── ENV_CONFIGURATION.md # Environment configuration guide
├── INSTALL.md # Installation instructions
├── MCP_INTEGRATION_GUIDE.md # MCP integration guide
├── examples/ # Example applications
│ ├── demo_app.py # Demo chat application
│ ├── auto_memory_example.py # Autonomous memory example
│ └── example_integration.py # Example integration
└── tests/ # Test scripts
├── test_api.py # Python API tests
└── test_api.sh # Shell API tests
```
## Quick Start
To run the server:
```bash
# Using the shell script
./run_server.sh
# With custom options
./run_server.sh --port 8080 --data-dir ~/memory_data
# Using Python directly
python server.py --host 0.0.0.0 --port 8000
```
For MCP integration (e.g., with Cursor):
```bash
python start_mem0_server.py
```
## Examples
Example applications are now located in the `examples/` directory:
```bash
# Run the demo chat application
python examples/demo_app.py
# Run the autonomous memory example
python examples/auto_memory_example.py
```
## Tests
Test scripts are now located in the `tests/` directory:
```bash
# Run the Python API tests
python tests/test_api.py
# Run the shell API tests
./tests/test_api.sh
```
Made with ❤️ by Pink Pixel