CRITICAL FIX - Database Parameter (graphiti_core):
- Fixed graphiti_core/driver/neo4j_driver.py execute_query method
- database_ parameter was incorrectly added to params dict instead of kwargs
- Now correctly passed as keyword argument to Neo4j driver
- Impact: All queries now execute in configured database (not default 'neo4j')
- Root cause: Violated Neo4j Python driver API contract
Technical Details:
Previous code (BROKEN):
params.setdefault('database_', self._database) # Wrong - in params dict
result = await self.client.execute_query(cypher_query_, parameters_=params, **kwargs)
Fixed code (CORRECT):
kwargs.setdefault('database_', self._database) # Correct - in kwargs
result = await self.client.execute_query(cypher_query_, parameters_=params, **kwargs)
FIX - Index Creation Error Handling (MCP server):
- Added graceful handling for Neo4j IF NOT EXISTS bug
- Prevents MCP server crash when indices already exist
- Logs warning instead of failing initialization
- Handles EquivalentSchemaRuleAlreadyExists error gracefully
Files Modified:
- graphiti_core/driver/neo4j_driver.py (3 lines changed)
- mcp_server/src/graphiti_mcp_server.py (12 lines added error handling)
- mcp_server/pyproject.toml (version bump to 1.0.5)
Testing:
- Python syntax validation: PASSED
- Ruff formatting: PASSED
- Ruff linting: PASSED
Closes issues with:
- Data being stored in wrong Neo4j database
- MCP server crashing on startup with EquivalentSchemaRuleAlreadyExists
- NEO4J_DATABASE environment variable being ignored
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
134 lines
3 KiB
TOML
134 lines
3 KiB
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src", "config"]
|
|
|
|
[tool.hatch.metadata]
|
|
allow-direct-references = true
|
|
|
|
[project]
|
|
name = "graphiti-mcp-varming"
|
|
version = "1.0.5"
|
|
description = "Graphiti MCP Server - Enhanced fork with additional tools by Varming"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10,<4"
|
|
license = {text = "Apache-2.0"}
|
|
authors = [
|
|
{name = "Varming", email = "varming@example.com"}
|
|
]
|
|
keywords = ["mcp", "graphiti", "knowledge-graph", "llm", "ai"]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
]
|
|
dependencies = [
|
|
"mcp>=1.21.0",
|
|
"openai>=1.91.0",
|
|
"graphiti-core>=0.16.0", # Includes neo4j driver by default
|
|
"pydantic-settings>=2.0.0",
|
|
"pyyaml>=6.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
graphiti-mcp-varming = "src.graphiti_mcp_server:main"
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/Varming73/graphiti"
|
|
Repository = "https://github.com/Varming73/graphiti"
|
|
Issues = "https://github.com/Varming73/graphiti/issues"
|
|
|
|
[project.optional-dependencies]
|
|
# FalkorDB support (Neo4j is included in graphiti-core by default)
|
|
falkordb = ["graphiti-core[falkordb]>=0.16.0"]
|
|
|
|
# Azure support
|
|
azure = [
|
|
"azure-identity>=1.21.0",
|
|
]
|
|
|
|
# LLM/Embedder providers (lightweight - no sentence-transformers)
|
|
api-providers = [
|
|
"google-genai>=1.8.0",
|
|
"anthropic>=0.49.0",
|
|
"groq>=0.2.0",
|
|
"voyageai>=0.2.3",
|
|
]
|
|
|
|
# LLM/Embedder providers (includes heavy sentence-transformers for local embeddings)
|
|
providers = [
|
|
"google-genai>=1.8.0",
|
|
"anthropic>=0.49.0",
|
|
"groq>=0.2.0",
|
|
"voyageai>=0.2.3",
|
|
"sentence-transformers>=2.0.0",
|
|
]
|
|
|
|
# All optional features
|
|
all = [
|
|
"graphiti-core[falkordb]>=0.16.0",
|
|
"azure-identity>=1.21.0",
|
|
"google-genai>=1.8.0",
|
|
"anthropic>=0.49.0",
|
|
"groq>=0.2.0",
|
|
"voyageai>=0.2.3",
|
|
"sentence-transformers>=2.0.0",
|
|
]
|
|
|
|
dev = [
|
|
"graphiti-core>=0.16.0",
|
|
"httpx>=0.28.1",
|
|
"mcp>=1.21.0",
|
|
"pyright>=1.1.404",
|
|
"pytest>=8.0.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
"ruff>=0.7.1",
|
|
]
|
|
|
|
[tool.pyright]
|
|
include = ["src", "tests"]
|
|
pythonVersion = "3.10"
|
|
typeCheckingMode = "basic"
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
# pycodestyle
|
|
"E",
|
|
# Pyflakes
|
|
"F",
|
|
# pyupgrade
|
|
"UP",
|
|
# flake8-bugbear
|
|
"B",
|
|
# flake8-simplify
|
|
"SIM",
|
|
# isort
|
|
"I",
|
|
]
|
|
ignore = ["E501"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "single"
|
|
indent-style = "space"
|
|
docstring-code-format = true
|
|
|
|
# Note: For local development, you can override graphiti-core source:
|
|
# [tool.uv.sources]
|
|
# graphiti-core = { path = "../", editable = true }
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"faker>=37.12.0",
|
|
"psutil>=7.1.2",
|
|
"pytest-timeout>=2.4.0",
|
|
"pytest-xdist>=3.8.0",
|
|
]
|