You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: servers/mcp-neo4j-cypher/README.md
+43-11Lines changed: 43 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,37 @@ The server supports namespacing to allow multiple Neo4j MCP servers to be used s
51
51
52
52
This is useful when you need to connect to multiple Neo4j databases or instances from the same session.
53
53
54
+
### ⚙️ Query Configuration
55
+
56
+
The server provides configuration options to optimize query performance and manage response sizes:
57
+
58
+
#### 📏 Token Limits
59
+
60
+
Control the maximum size of query responses to prevent overwhelming the AI model:
61
+
62
+
**Command Line:**
63
+
```bash
64
+
mcp-neo4j-cypher --token-limit 4000
65
+
```
66
+
67
+
**Environment Variable:**
68
+
```bash
69
+
export NEO4J_RESPONSE_TOKEN_LIMIT=4000
70
+
```
71
+
72
+
**Docker:**
73
+
```bash
74
+
docker run -e NEO4J_RESPONSE_TOKEN_LIMIT=4000 mcp-neo4j-cypher:latest
75
+
```
76
+
77
+
When a response exceeds the token limit, it will be automatically truncated to fit within the specified limit using `tiktoken`. This ensures:
78
+
79
+
-**Consistent Performance**: Responses stay within model context limits
80
+
-**Cost Control**: Prevents excessive token usage in AI interactions
81
+
-**Reliability**: Large datasets don't break the conversation flow
82
+
83
+
**Note**: Token limits only apply to `read_neo4j_cypher` responses. Schema queries and write operations return summary information and are not affected.
84
+
54
85
## 🏗️ Local Development & Deployment
55
86
56
87
### 🐳 Local Docker Development
@@ -261,17 +292,18 @@ docker run --rm -p 8000:8000 \
0 commit comments