Neo4j official MCP server authentication and enterprise setup

The official Neo4j MCP server supports SSO through bearer tokens in HTTP mode for Enterprise Edition and Aura, and basic credentials for Community and development use. This page covers the decisions, gaps and review evidence.

On this page

Does the Neo4j MCP server support SSO for AI assistants?

Yes, but only in HTTP mode and only through bearer tokens. The Neo4j MCP server's HTTP transport supports two methods: bearer token authentication and basic authentication. Bearer tokens are the path for SSO, OAuth or OIDC identity providers such as Okta or Azure AD, and the Neo4j authentication page places them in Neo4j Enterprise Edition and Aura environments that use those providers. Basic authentication with a username and password is the documented choice for Community Edition, development and testing, or for direct database credentials. Before you approve SSO for AI assistants, confirm which edition and which identity configuration your Neo4j deployment actually runs, because the token flow depends on both.

The server acts as a pass-through. It forwards the bearer token from the identity provider to Neo4j's own authentication system, so the decision about who may connect, and what that identity may read or write, is made by Neo4j and the roles configured in it, not by the MCP server. Each request in HTTP mode must also carry the X-Neo4j-MCP-URI header, and the credential header defaults to Authorization, which can be renamed with NEO4J_MCP_HTTP_AUTH_HEADER_NAME or --http-auth-header-name. Your team should confirm that the header name matches what your gateway or client expects and that tokens are not logged by any proxy in between. Check the HTTP Authentication page for Neo4j MCP against your deployed version.

Around that, the organization has to build the controls the server does not provide. Assign each AI-facing identity a least-privilege Neo4j role, and do not let assistants share an administrator account or a human's personal credentials. Decide how token lifetime, refresh and revocation work in your identity provider, and test that disabling a user removes their access to the graph. Keep the MCP endpoint off the public internet unless a reviewed gateway fronts it, and record which identity ran each Cypher request in your Neo4j audit logging. Finally, ask your Neo4j representative or your DeployOpen engagement team to confirm in writing which edition, token types and identity providers you are approved to use.

Authentication options by edition and transport

This table compares HTTP bearer token authentication, HTTP basic authentication and stdio use across Neo4j Enterprise Edition, Aura, Community Edition and development setups. Read each row as a question to answer before approving a connection, and treat the identity provider and vendor confirmation notes as open items for your review. The main takeaway is that bearer tokens depend on an outside identity provider and an SSO-capable database, while basic credentials are the documented path for Community Edition and testing.

SetupRecommended methodOutside identity provider needed?What to confirm before approval
Enterprise Edition with SSO, OAuth or OIDCHTTP bearer tokenYes, such as Okta or Azure ADConfirm the database accepts the identity provider's tokens and how token lifetime is managed
Aura with SSO, OAuth or OIDCHTTP bearer tokenYes, such as Okta or Azure ADConfirm with Neo4j how Aura applies the identity provider and which tenant settings apply
Community EditionHTTP or local basic authentication with username and passwordNoConfirm the account is a dedicated, least-privilege user rather than an administrator
Development and testingBasic authentication with username and passwordNoConfirm no production credentials or production data are used in the test instance
Direct database credentialsHTTP basic authenticationNoConfirm who holds the credentials and how they are rotated and stored
HTTP transport, all editionsBearer token or basic authentication via the Authorization headerDepends on methodConfirm the header name in your deployment, since NEO4J_MCP_HTTP_AUTH_HEADER_NAME can rename it
Stdio transportLocal credentials supplied to the server processNoConfirm the authentication page's current guidance for stdio before approving it for shared machines

How the bearer token travels from the identity provider to Neo4j

In HTTP mode, the MCP client is responsible for obtaining a bearer token from the identity provider before it talks to the server. The token is then sent in the credential header, which defaults to Authorization and can be renamed with NEO4J_MCP_HTTP_AUTH_HEADER_NAME or --http-auth-header-name. Every request also carries the X-Neo4j-MCP-URI header, which tells the server which Neo4j instance to reach. Your team should confirm the exact header name your proxy, gateway or client configuration expects, because a renamed header that does not match on either side will fail in ways that look like authentication problems. The HTTP Authentication page is the reference for these header names.

The server acts as a pass-through: it forwards the bearer token from the identity provider to Neo4j's authentication system rather than validating the user's identity itself. That means the MCP server is not the place where a user is verified, and it is not the place where a token's audience, expiry or group membership should be trusted on its own. Authorization decisions happen in Neo4j, based on what the forwarded token is allowed to do in the database. For a security review, this moves the key questions to the identity provider configuration and to the Neo4j Enterprise or Aura side of the setup, and both need to be inspected together.

Practical consequence for the review: confirm which identity provider issues the tokens, which Neo4j roles those identities map to, and whether any intermediary such as a reverse proxy or gateway can read, log or replace the Authorization header before it reaches the server. Ask the vendor or your own platform team to document what each hop stores. If the header is logged in plain text anywhere along the path, a valid token could be replayed by anyone with access to those logs, so log redaction should be checked at every layer.

Decisions to make before choosing bearer tokens or basic credentials

Choosing between bearer tokens and basic credentials sets the identity trail, the database permissions and the network exposure for the Neo4j MCP server in HTTP mode. The cards below cover the decisions that shape those outcomes, so the security and database teams agree on them before any client connects.

Identity provider and protocol

Bearer tokens are intended for Neo4j Enterprise Edition and Aura environments that use SSO, OAuth or OIDC, with identity providers such as Okta or Azure AD. The server passes the token from the identity provider through to Neo4j's authentication system, so Neo4j, not the MCP server, decides whether the caller is valid. Confirm which identity provider issues tokens, which protocol it uses, and how token lifetime and revocation are set on that side.

HTTP authentication docs

Database users and roles

The identity that reaches Neo4j determines what the agent can read and write, because the MCP server does not add its own permission layer on top of database privileges. Map each token or credential to a named database user with the narrowest roles that fit the task. Shared service accounts remove per-person attribution in the database audit trail, so ask whether each engineer or agent session can have a distinct identity.

Community or Enterprise boundary

The docs recommend basic authentication with a username and password for Community Edition, development and testing, or direct database credentials. Because bearer tokens are documented for Enterprise and Aura, a Community deployment cannot offer the same SSO path. Decide the edition first, then confirm which authentication modes your edition and hosting model actually support before writing the rollout plan.

Credential header name

In HTTP mode, the credential header defaults to Authorization, and it can be renamed with the NEO4J_MCP_HTTP_AUTH_HEADER_NAME setting or the --http-auth-header-name flag. Renaming changes what proxies, gateways and logging pipelines treat as sensitive, so check that the chosen name is excluded from request logs. Every request must also carry the X-Neo4j-MCP-URI header, which should be reviewed alongside the credential header in the client configuration.

Network exposure of the endpoint

The MCP endpoint is the path from every AI client to the database, so where it listens determines who can attempt to authenticate. Decide whether it runs only on a developer workstation, inside a private network segment, or behind an authenticated gateway. Confirm TLS termination, source restrictions and whether the database itself is reachable from anywhere other than the MCP host.

Audit attribution in logs

Audit value depends on whether the database, the MCP server logs and the identity provider can all name the same person or agent session. Confirm what the MCP server logs by default, whether tokens or passwords ever appear in those logs, and how long they are kept. Ask the vendor to confirm how the logging and telemetry pages describe what is recorded before relying on them for an investigation.

How the answer changes by identity setup and edition

For Neo4j Enterprise Edition with single sign-on through Okta, the Neo4j MCP authentication page recommends bearer token authentication. The MCP client obtains a token from Okta and sends it on each HTTP request. The server acts as a pass-through: it forwards the bearer token to Neo4j's authentication system, which decides what that identity can read or write. The database must be configured to accept tokens from your Okta tenant before any of this works.

  • Method: Bearer token from the identity provider, forwarded unchanged to Neo4j.
  • Headers: Send X-Neo4j-MCP-URI with every request, and send the token in Authorization unless you renamed the header with NEO4J_MCP_HTTP_AUTH_HEADER_NAME.
  • Database trust: Confirm that Neo4j Enterprise trusts your Okta tenant and maps token claims to the roles you intend.
  • Token lifecycle: Confirm how the client you use handles Okta token expiry and refresh, because each request needs a valid token.
  • Prerequisites: Confirm the APOC plugin is installed in the target instance, as the introduction page lists it as a requirement.

Before approval, check that the roles mapped to Okta groups match least privilege, because every MCP write runs under the identity Neo4j sees.

Order of work before connecting an AI client to production Neo4j

This sequence makes the authentication decision before any AI client reaches a production graph, so the identity, database role and header settings are reviewed and proven in a safer environment first. The result is a documented, tested configuration that security and IT can approve.

  1. Confirm the edition and identity provider

    Start by recording which Neo4j deployment the AI client will reach: Enterprise Edition, Aura, or Community Edition. The official authentication guidance matches bearer tokens to Enterprise Edition and Aura environments that use SSO, OAuth or OIDC with providers such as Okta or Azure AD, and recommends basic credentials for Community Edition, development and testing. Confirm with the database owner which identity provider issues the tokens and whether the team has an approved route for them. This step is done when the edition, provider and authentication method are written down and a reviewer has agreed that basic credentials are acceptable or ruled out for production.

  2. Define the database role each token maps to

    Work with the Neo4j administrator and the identity team to decide what a successful token is allowed to do once it reaches the database. The MCP server passes the bearer token through to Neo4j's authentication system, so the database's own roles and privileges, not the MCP server, decide what the client can read or write. Map each group or user population to a named role with the narrowest privileges that the use case needs. This step is done when every role is listed with its permitted operations and the owner who approved it.

  3. Choose and record the HTTP header names

    Decide the header settings before anything is deployed. Every HTTP request must carry the X-Neo4j-MCP-URI header, and the credential header defaults to Authorization unless it is renamed with NEO4J_MCP_HTTP_AUTH_HEADER_NAME or the matching command-line flag. Record the chosen names in the configuration standard and confirm that the reverse proxy, gateway or client settings in the environment pass them through unchanged. This step is done when the header names are documented, the proxy path is confirmed to forward them, and no header is stripped or renamed silently along the route.

  4. Configure HTTP mode in a non-production instance

    Stand up the server in HTTP mode against a non-production Neo4j instance that uses the same edition and identity provider as production. Keep the database contents non-sensitive or synthetic, and keep the server bound to a network segment the security team has approved. Check the server logs and the identity provider's sign-in records to confirm which principal the request was attributed to. This step is done when a test request with a valid token from the intended population succeeds and the logged identity matches that population.

  5. Verify that a denied token gets no graph access

    Test the negative cases before any approval. Use a token from a user outside the approved group, an expired token, a malformed token and a token from a different identity provider, and confirm each is rejected or returns no graph data. Also confirm that a basic-credential request is refused where policy forbids it. Repeat the checks for read operations and write operations separately, since the role mapping may allow one and not the other. This step is done when every denied case is recorded with its observed result and the team agrees that no denied token reached the graph.

  6. Review logging and the production boundary

    Before production, confirm what the server and the database record for each request, which logs are retained, and who can read them. Review the security and logging documentation for the version in use, and confirm how the identity provider's session lifetime and revocation affect an active AI client. Agree the production boundary, meaning which databases, environments and users the client may reach. This step is done when the logging owner, retention location and revocation procedure are named and reviewed.

  7. Document the decision and the retest trigger

    Write a short decision record that states the edition, identity provider, role mappings, header names, test results, denied-token results and the approving owner. Name the events that require a new review, such as a change of edition, identity provider, server version, header name or role. Store the record where the security and compliance reviewers can find it. This step is done when the record is approved, linked from the team's tool inventory, and assigned a review owner for the next change.

How a bearer token travels from the AI client to Neo4j

The flow starts with the AI client, which obtains a bearer token from the identity provider such as Okta or Azure AD after sign-in. The client then sends the request to the Neo4j MCP server in HTTP mode with that token in the credential header and the X-Neo4j-MCP-URI header. The MCP server acts as a pass-through and forwards the token to Neo4j's authentication system, which authenticates the caller and decides whether the Cypher call is allowed. Check that your Neo4j Enterprise or Aura instance validates the same identity provider you approved, and confirm the header name your configuration uses.

Bearer token flow in HTTP mode, with the MCP server passing the token through.

Evidence a security reviewer asks for on Neo4j MCP authentication

This table lists the records a reviewer typically asks for before approving the Neo4j MCP server in HTTP mode, with the source for each item. Read it as a checklist: confirm each artifact exists for every environment (Community, Enterprise, Aura and development) before sign-off. The main takeaway is that the authentication method and the database role mapping must be evidenced together, since a valid token alone does not show what the caller is allowed to do.

ArtifactWhat it showsSource to confirm
Chosen Neo4j edition and hostingWhether the target is Community Edition, Enterprise Edition or Aura, since this decides which authentication path appliesNeo4j deployment records and the Neo4j authentication page
Authentication method per environmentBearer token for SSO, OAuth or OIDC environments, or basic credentials for development and testingNeo4j MCP HTTP authentication page and the team's configuration records
Identity provider token configurationIssuer, audience and token lifetime settings used by the identity provider, such as Okta or Azure AD, that the server passes through to Neo4jIdentity provider application settings and the team's change records
Credential header configurationThe header that carries the credential (default Authorization), any rename through NEO4J_MCP_HTTP_AUTH_HEADER_NAME or --http-auth-header-name, and the X-Neo4j-MCP-URI header sent with every requestServer startup configuration, deployment manifests and the Neo4j MCP authentication page
Database role mappingWhich identity groups or database users map to which Neo4j roles, and confirmation that the server does not add privileges beyond those rolesNeo4j role and privilege definitions, and the identity provider group mapping
Basic credential inventoryWhere username and password pairs are stored, who holds them and when they were last rotated, for any environment still using basic authenticationSecrets manager records and the team's rotation log
Denied-access test resultsEvidence that requests with no token, an expired token, a token from the wrong issuer or a user without the required role are refusedRetest output from the team's own test environment, kept with the change ticket
Logging and attributionWhether Neo4j and server logs record which identity ran each Cypher statement, so writes can be traced to a person or serviceNeo4j MCP logging page and Neo4j database audit settings in the team's environment

Questions buyers ask before approving Neo4j MCP authentication

What drives the cost of Neo4j MCP authentication setup?

The biggest cost driver is which Neo4j edition and identity stack you already run, because the bearer token path is documented for Neo4j Enterprise Edition and Aura environments that use SSO, OAuth or OIDC. Neo4j licensing is paid to Neo4j, and identity provider licensing, such as Okta or Azure AD, is paid to that provider. Internal effort rises with the number of MCP clients, the number of identity providers you must connect, and whether the target database still needs the APOC plugin installed. Most of the work is one-time configuration, while licensing and token management recur. The supplied documentation does not give Neo4j prices or license terms, so ask Neo4j for a quote that names the edition, Aura tier and SSO support you need.

Can our own team set up Neo4j MCP authentication without outside help?

Yes, if your team already runs Neo4j and an identity provider, because the setup is configuration rather than new software. The server acts as a pass-through, forwarding the bearer token from your identity provider to Neo4j's authentication system, so your team must confirm that the token flow works from end to end. Your team must also send the X-Neo4j-MCP-URI header with every HTTP request, and set NEO4J_MCP_HTTP_AUTH_HEADER_NAME or --http-auth-header-name if your gateway expects a credential header other than Authorization. Teams without identity administration experience, or with no test environment, should plan extra time for validation before any staff connect.

Do we need outside help to roll out Neo4j MCP authentication?

Outside help is worth considering when your identity setup is complex, when no one on the team has tested SSO against the database, or when the rollout must pass a formal security review. DeployOpen's AI agent rollout security review tests the setup, including prompt injection, tool and file permissions, data exposure, credential handling, and SSO and admin settings. It then delivers a findings report with fixes and a retest. DeployOpen also implements self-hosted AI platforms in the client's infrastructure with SSO, access control, and audit logging. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and a quote follows from that written scope.

What does a Neo4j MCP rollout require from our team?

The Neo4j MCP introduction lists three prerequisites:

Does Neo4j Community Edition support SSO with the MCP server?

The Neo4j MCP authentication page ties bearer tokens to Enterprise Edition and Aura environments that use SSO, OAuth or OIDC. For Community Edition, the same page recommends basic authentication with a username and password, which it describes for development, testing or direct database credentials. For a production approval, this means individual SSO sign-in is not the documented path for Community Edition. Ask Neo4j directly whether any SSO option exists for Community Edition, whether it is supported with the MCP server, and what shared or direct credentials would mean for access reviews and offboarding.

How does audit attribution work for Neo4j MCP connections?

The server forwards the bearer token to Neo4j's authentication system, so the database should authenticate each request as the identity carried by that token. That is the attribution path to test before approval. With basic credentials, every client that uses the same database user appears as that one user, so attribution is only as specific as the account. Confirm with Neo4j which fields its audit logs record for each request, whether the MCP server adds its own log entries (see the HTTP Authentication - Neo4j MCP page), and how token expiry and revocation affect the identity recorded.

What should we check about the Neo4j MCP request headers?

In HTTP mode, the Neo4j MCP authentication page says to send the X-Neo4j-MCP-URI header with every request, so every client configuration must include it. The credential header defaults to Authorization and can be renamed with NEO4J_MCP_HTTP_AUTH_HEADER_NAME or --http-auth-header-name. Check three things: that any gateway or proxy in front of the server does not strip or overwrite these headers, that the chosen credential header name matches across every client, and that the header carries only the credential intended for that user. Ask Neo4j what the server does when a required header is missing, since the supplied documentation does not describe that behavior.

How DeployOpen helps roll out Neo4j MCP authentication safely

DeployOpen plans and implements self-hosted open-source platforms inside the client's own infrastructure, and runs security testing that includes AI systems and agents. For Neo4j MCP, that means working out which authentication path fits each Neo4j environment, then testing and documenting the setup so the security and compliance teams can review it before staff connect an AI client.

How we scope

  • Confirm which Neo4j edition or deployment each team uses: Enterprise, Aura, Desktop, or Community.
  • Map which identity provider, OAuth or OIDC setup, and bearer token flow apply to each environment.
  • Agree the written scope, deliverables and timeline in writing before any configuration work starts.

How we build

  • Configure HTTP mode with the required X-Neo4j-MCP-URI header and the agreed credential header name.
  • Set up database users with restricted privileges, and separate basic credentials from SSO-backed access.
  • Test token pass-through, credential handling, and whether the AI client can reach tools beyond its intended scope.

How we hand over

  • Deliver a findings report with fixes, a retest, and documentation of each authentication path in use.
  • Document configuration keys, header names, and the Neo4j roles each client is granted, for reviewer sign-off.
  • Provide evidence for the security questionnaire and compliance review, without issuing any audit attestation.

How we support

  • Ongoing support, upgrades, and continuous testing are available as a retainer when the MCP setup changes.
  • Re-check authentication settings after Neo4j MCP version changes, including any move from v1 to v2.
  • Review new AI clients or identity provider changes before they are allowed to connect to the graph database.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.