HTTP configuration
HTTP mode accepts the target URI and authentication credentials per request.
The database is selected by the URL path in the form /db/{databaseName}/mcp.
Do not set NEO4J_MCP_URI, NEO4J_MCP_USERNAME, NEO4J_MCP_PASSWORD, or NEO4J_MCP_DATABASE in HTTP mode because the URI and credentials come from HTTP request headers and the database comes from the URL path.
See HTTP mode for endpoint, header, and error details.
Environment variables and equivalent command-line flags for HTTP mode:
| Variable | Equivalent command-line flag | Description | Default |
|---|---|---|---|
|
|
Server binding address |
|
|
|
Server listening port |
|
|
|
CORS configuration (comma-separated list, |
empty (disabled) |
|
|
Header used for per-request credentials (see Custom auth header name) |
|
|
|
Allow JSON-RPC |
|
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.
HTTP clients can use X-Neo4j-MCP-Request-Timeout to set a lower limit for an individual request.
See X-Neo4j-MCP-Request-Timeout.
TLS/HTTPS configuration
Configure TLS for secure HTTPS connections in HTTP mode:
| Variable | Equivalent command-line flag | Description | Default |
|---|---|---|---|
|
|
Enable TLS/HTTPS |
|
|
|
Path to TLS certificate file |
Required if TLS enabled |
|
|
Path to TLS private key file |
Required if TLS enabled |