A Model Context Protocol (MCP) server for Neo4j graph database operations, designed for the Magic Garden AI children's education platform.
user_create- Create new user accounts with password hashinguser_authenticate- Authenticate users and generate tokensuser_profile_get- Get user profiles with statisticsuser_update- Update user informationuser_delete- Delete users with cascade options
record_create- Create records with vector embeddingsrecord_update- Update record propertiesrecord_search- Multi-condition search with paginationrecord_similarity_search- Vector similarity searchrecord_batch_operation- Batch operations with transactions
conversation_create- Create new conversationsconversation_update- Update conversation metadatamessage_create- Add messages to conversationsmessage_update- Update message contentconversation_history_get- Retrieve conversation historyconversation_search- Search conversations with filtersconversation_analysis- Analyze conversation patterns
# Clone the repository
git clone https://github.com/yourusername/magic-garden-neo4j-server.git
cd magic-garden-neo4j-server
# Install dependencies
pip install -r requirements.txtCreate a .env file with:
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your-password
NEO4J_DATABASE=neo4j
LOG_LEVEL=INFOAdd to Claude Desktop settings:
{
"mcpServers": {
"magic-garden-neo4j": {
"command": "python",
"args": ["-m", "magic_garden_neo4j_server"],
"cwd": "/path/to/magic-garden-neo4j-server",
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "your-password"
}
}
}
}For Cursor IDE integration, add to .cursor/mcp-settings.json:
{
"servers": [
{
"name": "magic-garden-neo4j",
"command": "python",
"args": ["-m", "magic_garden_neo4j_server"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "your-password"
}
}
]
}# Direct execution
python -m magic_garden_neo4j_server
# With environment variables
NEO4J_URI=bolt://localhost:7687 python -m magic_garden_neo4j_server{
"tool": "user_create",
"arguments": {
"username": "alice",
"password": "secure123",
"nickname": "Alice",
"age": 8
}
}{
"tool": "record_create",
"arguments": {
"user_id": "user_abc123",
"title": "My Drawing",
"image_url": "https://example.com/image.jpg",
"mood_color": "happy_yellow",
"embedding": [0.1, 0.2, 0.3, ...]
}
}{
"tool": "conversation_create",
"arguments": {
"user_id": "user_abc123",
"title": "Story Time",
"conversation_type": "story"
}
}magic-garden-neo4j-server/
├── src/
│ ├── __init__.py
│ ├── server.py # MCP server implementation
│ ├── neo4j_manager.py # Neo4j connection management
│ ├── tool_registry.py # Tool registration system
│ ├── tools/
│ │ ├── base.py # Base tool class
│ │ ├── user_tools.py # User management tools
│ │ ├── record_tools.py # Record management tools
│ │ ├── conversation_tools.py # Conversation tools
│ │ └── ... # Other tool modules
│ └── utils/
│ ├── errors.py # Error handling
│ ├── logger.py # Logging configuration
│ └── validators.py # Input validation
├── requirements.txt
├── README.md
└── .env.example
- ✅ Core infrastructure (8 tasks)
- ✅ User management (5 tools)
- ✅ Record management (5 tools)
- ✅ Conversation management (7 tools)
- 🚧 Intelligent analysis tools (7 tools)
- 🚧 Vector service tools (7 tools)
- 🚧 Report generation tools (7 tools)
- 🚧 Advanced query tools (7 tools)
- 🚧 Transaction management tools (7 tools)
MIT
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
For issues and questions, please open an issue on GitHub.