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_MCP_USERNAME

--username

Neo4j username (STDIO mode only)

Required for STDIO

NEO4J_MCP_PASSWORD

--password

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

NEO4J_MCP_URI

--uri

Connection URI; required for STDIO and provided per request in HTTP

Required for STDIO; unset for HTTP

NEO4J_MCP_DATABASE

--database

Database name; required for STDIO and selected in the HTTP URL

Required for STDIO; unset for HTTP

NEO4J_MCP_READ_ONLY

--read-only

Set to true to disable write tools (see Readonly mode)

false

NEO4J_MCP_TELEMETRY

--telemetry

Set to false to disable telemetry (see Telemetry)

true

NEO4J_MCP_LOG_LEVEL

--log-level

Log level (see Logging)

info

NEO4J_MCP_LOG_FORMAT

--log-format

Log output format: text or json (see Log formats)

text

NEO4J_MCP_SCHEMA_SAMPLE_SIZE

--schema-sample-size

Number of nodes to sample for schema inference

100

NEO4J_MCP_TRANSPORT_MODE

--transport-mode

Transport mode: stdio or http

stdio

NEO4J_MCP_TOOLS

--tools

Comma-separated list of tools advertised by the server; see Tool filtering

All four tools

NEO4J_MCP_REQUEST_TIMEOUT

--request-timeout

Maximum time allowed for an MCP request; specify a number followed by a time unit, such as 45s or 5m

3m (maximum 30m)

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:

  • ms for milliseconds, for example 500ms

  • s for seconds, for example 45s

  • m for minutes, for example 5m

You can combine units, for example 1m30s. The default is 3m and the maximum is 30m. See X-Neo4j-MCP-Request-Timeout.