Skip to content

Commit 8ebcf78

Browse files
authored
Cypher fix params parsing issue (#104)
* fix param arg parsing issue with pydantic * Update CHANGELOG.md
1 parent f827e4e commit 8ebcf78

File tree

4 files changed

+65
-34
lines changed

4 files changed

+65
-34
lines changed

servers/mcp-neo4j-cypher/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
### Fixed
1212
* Updated the `get_neo4j_schema` tool to include Relationship properties as well
13+
* Fix bug where `params` arg wouldn't be parsed correctly
1314

1415
### Changed
1516
* Update error handling in read and write tools

servers/mcp-neo4j-cypher/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "A simple Neo4j MCP server"
55
readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
8-
"fastmcp>=2.2.7",
8+
"fastmcp>=2.10.5",
99
"neo4j>=5.26.0",
1010
"pydantic>=2.10.1",
1111
]

servers/mcp-neo4j-cypher/src/mcp_neo4j_cypher/server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ def clean_schema(schema: dict) -> dict:
170170
))
171171
async def read_neo4j_cypher(
172172
query: str = Field(..., description="The Cypher query to execute."),
173-
params: Optional[dict[str, Any]] = Field(
174-
None, description="The parameters to pass to the Cypher query."
173+
params: dict[str, Any] = Field(
174+
dict(), description="The parameters to pass to the Cypher query."
175175
),
176176
) -> list[ToolResult]:
177177
"""Execute a read Cypher query on the neo4j database."""
@@ -204,8 +204,8 @@ async def read_neo4j_cypher(
204204
))
205205
async def write_neo4j_cypher(
206206
query: str = Field(..., description="The Cypher query to execute."),
207-
params: Optional[dict[str, Any]] = Field(
208-
None, description="The parameters to pass to the Cypher query."
207+
params: dict[str, Any] = Field(
208+
dict(), description="The parameters to pass to the Cypher query."
209209
),
210210
) -> list[ToolResult]:
211211
"""Execute a write Cypher query on the neo4j database."""

servers/mcp-neo4j-cypher/uv.lock

Lines changed: 59 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)