mcp/neo4j-cypher image in HTTP transport mode, then register its public endpoint as a remote MCP server in TrueFoundry.
How TrueFoundry Manages the MCP Server
TrueFoundry’s MCP Gateway acts as a reverse proxy between your agents and MCP servers like Neo4j. When you register your deployed Neo4j server, TrueFoundry handles:- Authentication — Agents authenticate once to the TrueFoundry MCP Gateway. The gateway attaches the outbound Basic Auth header to every request reaching your Neo4j MCP server, so individual users never handle the database credentials.
- Tool-level access control — You can selectively enable or disable individual tools (for example, disable
write_neo4j_cypher) per team from the TrueFoundry UI. - Audit trail — Every tool invocation is traced with the calling user, tool name, input payload (including the Cypher query), and latency. Traces export via OpenTelemetry to your observability stack.
- Guardrails — TrueFoundry’s guardrail hooks apply at
mcp_pre_tool(before a tool is invoked) andmcp_post_tool(after the tool returns), letting you enforce policies on queries and results in real time.
Prerequisites
- A TrueFoundry account with permission to add MCP servers.
- A running Neo4j instance — Neo4j Aura (cloud), self-managed, or Docker — and its connection URI (for example,
neo4j+s://xxxxxx.databases.neo4j.iofor Aura). - The Neo4j MCP server deployed and reachable over a public HTTPS URL. You can run the
mcp/neo4j-cypherDocker image on any platform (AWS ECS, Azure Container Apps, Google Cloud Run, Railway, Render, etc.).
Deploy the Neo4j MCP Server
The Neo4j MCP server must run in HTTP transport mode to work as a remote MCP server. The default STDIO mode only works for local desktop clients (Claude Desktop, VS Code). HTTP mode exposes a network endpoint that TrueFoundry’s MCP Gateway can route traffic to. Use the official Docker imagemcp/neo4j-cypher:latest, expose port 8080, and set these environment variables:
NEO4J_DATABASE — For Neo4j Aura, the database name is typically your instance ID (visible in the Aura console top bar), not the default neo4j. Run SHOW DATABASES in the Aura Query tab to confirm.NEO4J_MCP_SERVER_ALLOWED_HOSTS — If you see Invalid host header after deployment, this variable is missing. Set it to your public hostname (for example, neo4j.mcp.example.com).Register Neo4j in TrueFoundry
Open the Add MCP Server picker
Navigate to MCP Servers in the TrueFoundry sidebar and click Add new MCP Server. Select Connect any Remote MCP Server — this lets you provide the URI and auth credentials for any remote MCP server you host.

Configure the server and auth
Fill in your deployed server’s details and Basic Auth credentials:
Add Collaborators — the users and teams that can use or manage this server — and assign each an MCP Server Manager or MCP Server User role. Click Update MCP Server to save.
| Field | Value |
|---|---|
| Name | neo4j |
| Description | Neo4j graph database |
| URL | https://<your-public-hostname>/mcp/ |
| Auth Type | API Key → Shared Credentials |
| Header Name | Authorization |
| Header Value | Basic <base64(username:password)> |


Connecting to an MCP Client
TrueFoundry exposes the Neo4j MCP server over HTTP transport. The endpoint is specific to your TrueFoundry tenant, so don’t construct it by hand — copy the exact URL and ready-to-paste connection commands from the How To Use tab on the Neo4j server detail page. The How To Use tab generates connection instructions for every major client, including Cursor, VS Code, Claude Code, Claude Desktop, Windsurf, Codex, and the Python and TypeScript MCP SDKs. Click Show API Key to reveal your personal gateway API key, which authenticates your client to the TrueFoundry Gateway. Copy the snippet for your client and paste it into the relevant settings file.
Using Neo4j in TrueFoundry Agents
You can attach the Neo4j MCP server directly to an agent in the TrueFoundry AI Engineering UI:Attach the MCP server
Under MCP Servers, click + and select
neo4j. Choose All tools or select specific tools as needed.
Environment Variables Reference
| Variable | Required | Description |
|---|---|---|
NEO4J_URL | ✅ | Bolt URI to your Neo4j instance |
NEO4J_USERNAME | ✅ | Neo4j username |
NEO4J_PASSWORD | ✅ | Neo4j password |
NEO4J_DATABASE | ✅ | Database name |
NEO4J_TRANSPORT | ✅ | Set to http for remote deployment |
NEO4J_MCP_SERVER_HOST | ✅ | Set to 0.0.0.0 for Docker |
NEO4J_MCP_SERVER_PORT | ✅ | Port to expose (e.g. 8080) |
NEO4J_MCP_SERVER_PATH | Recommended | URL path prefix (e.g. /mcp/) |
NEO4J_MCP_SERVER_ALLOWED_HOSTS | Recommended | Comma-separated allowed hostnames |
NEO4J_READ_ONLY | Optional | true to disable write operations |
NEO4J_READ_TIMEOUT | Optional | Query timeout in seconds (default: 30) |
NEO4J_SCHEMA_SAMPLE_SIZE | Optional | Nodes to sample for schema (default: 100) |
Next Steps
MCP Gateway Overview
Learn how the TrueFoundry MCP Gateway centralizes access, auth, and observability for all your MCP servers.
MCP Gateway Getting Started
Add MCP servers and use them in the AI Gateway playground and IDEs.
Neo4j MCP documentation
Reference for the Neo4j MCP server, its tools, and configuration options.
MCP Gateway Security
Configure authentication and guardrails on your MCP servers.
