STDIO configuration
STDIO mode requires NEO4J_MCP_URI, NEO4J_MCP_USERNAME, NEO4J_MCP_PASSWORD, and NEO4J_MCP_DATABASE (or their CLI equivalents).
Provide the database explicitly with NEO4J_MCP_DATABASE or --database.
Connectivity, query execution, and APOC requirements are checked when the MCP handshake request (initialize or server/discover) is processed.
Environment variables and equivalent command-line flags for STDIO mode:
| Variable | Equivalent command-line flag | Description | Default |
|---|---|---|---|
|
|
Neo4j username (STDIO mode only) |
Required for STDIO |
|
|
Neo4j password (STDIO mode only) |
Required for STDIO |
General configuration
The following environment variables and equivalent command-line flags are general configuration options:
| Variable | Equivalent command-line flag | Description | Default |
|---|---|---|---|
|
|
Connection URI; required for STDIO and provided per request in HTTP |
Required for STDIO; unset for HTTP |
|
|
Database name; required for STDIO and selected in the HTTP URL |
Required for STDIO; unset for HTTP |
|
|
Set to |
|
|
|
Set to |
|
|
|
Log level (see Logging) |
|
|
|
Log output format: |
|
|
|
Number of nodes to sample for schema inference |
|
|
|
Transport mode: |
|
|
|
Comma-separated list of tools advertised by the server; see Tool filtering |
All four tools |
|
|
Maximum time allowed for an MCP request; specify a number followed by a time unit, such as |
|
Request timeout
MCP requests, including tool calls and the handshake, are bounded by the configured timeout.
Set NEO4J_MCP_REQUEST_TIMEOUT or --request-timeout as a number followed by a time unit:
-
msfor milliseconds, for example500ms -
sfor seconds, for example45s -
mfor minutes, for example5m
You can combine units, for example 1m30s.
The default is 3m and the maximum is 30m.
See X-Neo4j-MCP-Request-Timeout.