Documentation

API reference, MCP tools, and integration guides.

Get an API Key

Every snippet below expects a nams_... key. Replace the placeholder with your own.

Sign in to open your workspace — a default key is created for you, and the in-console Quick Start fills it into every snippet automatically. Or generate one on the API Keys page. Keys expire after 90 days.

REST: Make your first call

API keys work as Bearer tokens directly — no exchange step needed.

List entities

curl https://memory.neo4jlabs.com/v1/entities \
  -H "Authorization: Bearer nams_YOUR_API_KEY"

1. Create a conversation

curl -X POST https://memory.neo4jlabs.com/v1/conversations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer nams_YOUR_API_KEY" \
  -d '{"userId": "user-1"}'

# Response: {"id": "conv-abc-123", ...}

2. Add a message

curl -X POST https://memory.neo4jlabs.com/v1/conversations/CONV_ID/messages \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer nams_YOUR_API_KEY" \
  -d '{"role": "user", "content": "John works at Acme Corp in Denver"}'

3. Check extracted entities

curl https://memory.neo4jlabs.com/v1/entities \
  -H "Authorization: Bearer nams_YOUR_API_KEY"

# Returns entities extracted from your messages:
# John (person), Acme Corp (organization), Denver (location)

MCP: Connect an agent

Pick your client below. Each tab has the exact config snippet plus a 3-step verify check. The agent gets access to all 12 memory tools.

Claude Desktop's config does not accept a remote URL directly. Use the mcp-remote stdio bridge for static API keys, or open Settings -> Connectors -> Add custom connector for OAuth.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "nams-memory": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://memory.neo4jlabs.com/mcp",
        "--header",
        "Authorization:Bearer ${NAMS_API_KEY}"
      ],
      "env": {
        "NAMS_API_KEY": "nams_YOUR_API_KEY"
      }
    }
  }
}

Save, fully quit Claude Desktop (Cmd/Ctrl+Q), reopen it. The nams-memory server appears under the tools (hammer) icon. Ask: 'List the NAMS memory tools you have.'

Windows note: keep 'Authorization:Bearer' with no space -- mcp-remote arguments break on whitespace there.

Prefer OAuth 2.0?

MCP clients that support OAuth can authenticate interactively with PKCE — no static key to manage. Discovery endpoints:

# Protected Resource Metadata (RFC 9728)
https://memory.neo4jlabs.com/mcp/.well-known/oauth-protected-resource

# Authorization Server Metadata (RFC 8414)
https://memory.neo4jlabs.com/mcp/.well-known/oauth-authorization-server

# Dynamic Client Registration (RFC 7591)
POST https://memory.neo4jlabs.com/mcp/oauth/register

Access tokens are short-lived (1 hour); clients refresh automatically.

Base URLs

APIhttps://memory.neo4jlabs.com/v1
Authhttps://memory.neo4jlabs.com/v1/auth
MCPhttps://memory.neo4jlabs.com/mcp