Commit graph

1 commit

Author SHA1 Message Date
Lars Varming
9d594c1aa5 Fix: Pass database parameter to Neo4j driver initialization
The MCP server was reading NEO4J_DATABASE from environment config but not
passing it to the Neo4jDriver during initialization. This caused data to be
stored in the default 'neo4j' database instead of the configured database.

Changes:
- factories.py: Added database parameter to Neo4j config dictionary
- graphiti_mcp_server.py: Use graph_driver pattern with Neo4jDriver
- Added Neo4jDriver import and pass database parameter during initialization
- test_database_param.py: Added comprehensive test for database configuration

Implementation uses the graph_driver pattern (matching FalkorDB) instead of
direct parameter passing, as the Graphiti constructor does not accept a
database parameter directly.

This fix enables property-based multi-tenancy with a single configured
database (e.g., 'graphiti') instead of the hardcoded default ('neo4j').

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 06:59:03 +01:00