Deploy a memory application
This reference compares the deployment paths this repository documents for an application built on the SDKs. See backend capabilities before treating these as interchangeable: Bolt and NAMS support different operations, and the TypeScript SDK is REST/NAMS-only.
Options and constraints
Each option lists its transport, backend, credentials, and requirements and constraints.
Hosted NAMS workspace (Python or TypeScript)
- Transport
-
HTTPS REST,
https://memory.neo4jlabs.com/v1by default - Backend
-
NAMS (no database to operate)
- Credentials
-
A workspace API key (
MEMORY_API_KEY, prefixednams_), plusMEMORY_WORKSPACE_ID(sent asX-Workspace-Id) on deployments that scope by header rather than by key; a workspace-bound key rejects a different workspace id - Requirements and constraints
-
No Neo4j instance or extraction pipeline to run yourself. Some Bolt-only operations (preferences, facts, client-created relationships, geospatial search, custom Cypher writes) are unsupported; see backend capabilities. See Connect a Python application to NAMS.
Python SDK embedded in your own application
- Transport
-
Bolt (
bolt://,neo4j+s://) from your own process — no MCP server - Backend
-
Bolt, against a Neo4j instance you operate (self-managed or AuraDB)
- Credentials
-
NAM_NEO4JURI/NAM_NEO4JUSERNAME/NAM_NEO4J__PASSWORD, whichMemorySettings()reads from the environment, plus embedding/LLM provider credentials for the selected providers (MemorySettingsimplicitly selects OpenAI embeddings). PlainNEO4J_URI/NEO4J_USERNAME/NEO4J_PASSWORDare not read byMemorySettings; an application that uses them must pass the values itself, for exampleMemorySettings(neo4j=…). See environment variables. - Requirements and constraints
-
Full Bolt operation set, including preferences, facts, client-created relationships, geospatial search and custom Cypher; you operate the database and the extraction pipeline. See configuration reference.
Self-hosted Python MCP server, stdio transport
- Transport
-
stdio (the CLI default)
- Backend
-
Bolt, against a Neo4j instance you operate, or NAMS (
--backend nams, the default whenMEMORY_API_KEYis set) - Credentials
-
For Bolt,
NEO4J_URI/NEO4J_USER/NEO4J_PASSWORD(themcp serveoptions read these names); for NAMS,MEMORY_API_KEY(andMEMORY_ENDPOINTto override the default endpoint). Provider credentials (for example an OpenAI key) only if extraction or embeddings are enabled - Requirements and constraints
-
For local MCP hosts — Claude Desktop, Claude Code, Cursor. Not a network-reachable deployment: the host process owns stdio.
Self-hosted Python MCP server, Streamable HTTP transport
- Transport
-
http(streamable-httpis an explicit spelling of the same transport;sseis accepted but deprecated and served ashttp) - Backend
-
Bolt, against a Neo4j instance you operate (for example AuraDB), or NAMS (
--backend nams, the default whenMEMORY_API_KEYis set) - Credentials
-
For Bolt,
NEO4J_URI/NEO4J_USER/NEO4J_PASSWORD; for NAMS,MEMORY_API_KEY. Plus embedding/LLM provider credentials for whichever provider you select - Requirements and constraints
-
The documented example (Cloud Run MCP deployment) runs this transport on Cloud Run with Vertex AI embeddings (
gemini-embedding-001, 768 dimensions), Secret Manager forNEO4J_URI/NEO4J_USER/NEO4J_PASSWORD, Cloud Run IAM for endpoint authentication, and automatic extraction/preference detection disabled by default. It has no built-in application-level authentication — the platform (Cloud Run IAM, or your own reverse proxy) must supply that.
TypeScript REST client on an edge runtime (Cloudflare Workers, Vercel Edge)
- Transport
-
HTTPS REST, via
fetchonly (zero runtime dependencies) - Backend
-
NAMS
- Credentials
-
MEMORY_API_KEY, passed explicitly through the runtime’s request-scoped bindings (env.MEMORY_API_KEYon Workers) rather than read fromprocess.env - Requirements and constraints
-
Bolt is not reachable from these runtimes; NAMS/REST is the only supported backend here. See Deploy to edge runtimes for the API-key-resolution gotcha and what does and doesn’t work on edge (for example, the TCK bridge transport is not tested there).
See also
-
Backend capabilities and data scope — which operations each backend/language combination supports.
-
Configuration reference —
MemorySettings,BoltSettings, and provider configuration for the embedded Python SDK. -
Connect a Python application to NAMS — hosted setup walkthrough.
-
TypeScript edge runtime deployment — Cloudflare Workers and Vercel Edge specifics.
-
Cloud Run MCP deployment — the full Cloud Run deployment procedure, including secret setup, IAM, and troubleshooting.