MCP Clients
Connect an MCP Streamable HTTP host to the team-scoped URL copied from /ui → Connect:
https://memory.example.com/teams/<team-id>/mcpFor local use, the main listener is http://127.0.0.1:8080. /mcp also supports authenticated unscoped access where team resolution permits it. Named /mcp/c/<name> URLs let one host keep a separate connection per team; see Browser Sign-In. Exact identity, token, and cookie rules belong to Request Lifecycle And Security.
Credentials And Discovery
%%{init: {"sequence": {"rightAngles": true}}}%%
sequenceDiagram
participant Host as MCP host
participant Server as Dense-Mem
Host->>Server: Initialize over authenticated Streamable HTTP
Server-->>Host: Negotiated protocol and instructions
Host->>Server: tools/list
Server-->>Host: Visible current schemas
Host->>Server: tools/call using discovered schema
Server-->>Host: Terminal result or actionable errorSupply an API key or configured customer-IdP OAuth access token in the bearer header, or let an OAuth-capable host sign in through the browser. Browser SSO/portal cookies do not authenticate MCP. Configure credentials privately and allow the server's bounded synchronous operation time.
OAuth-aware hosts can use the RFC 9728 resource metadata and 401 challenge link. Those require configured MCP_PUBLIC_BASE_URL; the portal's explicitly labeled browser-origin fallback is only a manual connection aid. See OAuth authentication.
Browser Sign-In
Release v2.9.2 introduces built-in sign-in; see implementation status. It works when the operator has set MCP_PUBLIC_BASE_URL and no customer IdP owns MCP OAuth; see MCP OAuth authority. The host opens a Dense-Mem consent page in the browser, then stores and refreshes its own tokens. No key is written to the host configuration.
Choose one URL per connection:
| URL | Use |
|---|---|
<base>/mcp | One connection. Sign-in selects the team: the key's team or the SSO team you pick. |
<base>/teams/<team-id>/mcp | Locked to one team. The consent page denies a key or SSO membership for another team. |
<base>/mcp/c/<name> | Named connection. The name only distinguishes connections; sign-in still selects the team. |
A name has 1–64 letters, digits, _, or -, and starts with a letter or digit. Claude Desktop rejects a second connector with an identical URL (A server with this URL already exists), so use a different name for each team, such as /mcp/c/research and /mcp/c/support. Each URL receives its own grant. A token issued for one URL is rejected on every other URL. Signing in to one connection does not affect another connection or the portal's selected team.
The consent page offers two sign-in methods:
| Team API key | SSO | |
|---|---|---|
| Sign-in | Paste a key. The page previews the team, role, scopes, and memory access before you approve. | Sign in with an enabled provider if needed, then pick one entitled team. |
| Connection acts as | That credential, under its rate limit. | Your membership in the chosen team. |
| Private memory | The credential's private space. | Your membership's private space. |
| Ends when | The key is revoked, rotated, retired, or expires. | The identity, membership, entitlement, or provider is disabled. |
Either connection also ends when you revoke it in Connected apps, when an operator revokes it, or after thirty days without a token refresh. An SSO connection can end sooner when the provider cannot renew group membership without a new login. Sign in again to reconnect. SSO consent also depends on the operator's origin setup. Token and revocation rules are in Request Lifecycle And Security.
| Host | Browser sign-in setup |
|---|---|
| Claude Desktop, Claude.ai | Add a custom connector with the URL, then complete the browser sign-in. Repeat with another /mcp/c/<name> URL for each additional team. |
| Claude Code | claude mcp add --transport http dense-mem-research "https://memory.example.com/mcp/c/research", then claude mcp login dense-mem-research. |
| Codex | codex mcp add dense-mem-research --url "https://memory.example.com/mcp/c/research", then codex mcp login dense-mem-research. Keep tool_timeout_sec = 240 as in the Codex example. |
The CLI commands were checked against the help output of Claude Code 2.1.331 and Codex 0.172.0; connector menus and OAuth handling are host behavior. A host configured with a static Authorization header keeps using that key and does not start browser sign-in. The examples below use the static-header form, which remains supported.
Claude Code
The installed Claude CLI exposes the HTTP transport/header form:
claude mcp add --transport http dense-mem "http://127.0.0.1:8080/teams/$DENSE_MEM_TEAM_ID/mcp" --header "Authorization: Bearer $DENSE_MEM_API_KEY"Set DENSE_MEM_TEAM_ID to the full UUID shown in /ui. Run
claude mcp add --help on the installed version before scripting the command
across machines.
Codex
Codex uses config.toml for Streamable HTTP MCP servers:
[mcp_servers.dense_mem]
url = "http://127.0.0.1:8080/teams/00000000-0000-0000-0000-000000000000/mcp"
bearer_token_env_var = "DENSE_MEM_API_KEY"
tool_timeout_sec = 240
enabled = trueReplace the zero UUID and base URL with the value copied from /ui. User
configuration normally lives at ~/.codex/config.toml; a trusted project can
use .codex/config.toml. Restart or refresh the host after changing
configuration, then use codex mcp list or /mcp.
Make DENSE_MEM_API_KEY available to the Codex process without committing it to
a configuration file. The 240-second client timeout allows the server's
180-second Remember budget plus transport overhead; it does not extend server
processing limits.
The version-sensitive source is the official Codex MCP documentation.
Remember Progress
A supporting host can display changing status while remember remains pending. See the processing sequence and protocol examples.
Illustrative text for a host that displays progress; each arrow replaces the running status:
dense-mem · remember
Preparing intake
↓
Checking duplicate Evidence
↓
Assessing Evidence
↓
Preparing search state
↓
Committing
↓
Final result: saved Evidence or actionable errorThe final line comes from the tool result. The sequence is abbreviated: a current server also reports partitioning, validation, Topic assignment, and provider waits or retries, and every other tool reports its own stages. A progress message alone never establishes success or a reason to resubmit.
| Client tested on 2026-11-12 | Observed CLI display | Verification limit |
|---|---|---|
| Claude Code 2.1.288 | Live stage text before the terminal result. | Controlled presentation fixture; invocation remained host-dependent. IDE/desktop and a deployed Dense-Mem connection were not tested. |
| Codex 0.166.0 | Generic working/tool status without stage text, despite receiving all five notifications and the final result. | Controlled presentation fixture; app-server protocol support does not establish CLI or IDE rendering. |
The client probes used numeric progress tokens. A valid final result alone does not prove that a host displays progress.
Claude Code documents automatic backgrounding of main-conversation MCP calls after two minutes by default; the task view retains the latest progress and later delivers the tool outcome. This is host behavior around the same server call. See Claude Code's MCP reference.
Server progress emission requires no extra model inference. A host that only updates its UI needs no model turn for each update. Context injection or host-managed background-result handling can consume tokens; rendering, model resumption, correction, and retries remain client decisions.
Verify The Connection
| Check | Expected behavior |
|---|---|
| Initialize and discover | Host negotiates protocol and reads the authenticated catalog. |
| Remember schema | Exact Evidence, explicit destination, retained key; retired graph fields absent. |
| Mutation outcome | Complete terminal receipt or typed failure, without required polling. |
| Recall | Eligible Evidence, current topic hints, conflicts, and explicit degradations. |
| Trace | Authorized evidence_id. |
Refresh tool discovery after upgrading; the MCP protocol revision and Dense-Mem contract version are different concepts. Feature/scopes can hide tools, and invocation rechecks the same gates.
Session And Python Integrations
Use Framework Integrations for the typed Python core, Google ADK memory service, and LangChain retriever. Exact private session intake is optional: send stable user-event IDs, original text/timestamps, and a retained complete request. External session/user identifiers never select authorization.
Troubleshooting
| Symptom | Check |
|---|---|
| 401/403 | Correct bearer source, selected team, current credential/membership, and permitted scopes. |
| Missing tool | Current discovery, feature/provider configuration, and effective access. |
| Invalid parameters | Refresh schemas; remove retired graph fields and old trace handles. |
| Timeout or lost response | Preserve request/key and follow unchanged-request recovery. |
| Browser works, MCP fails | Configure a bearer credential; browser cookies are deliberately separate. |
No browser sign-in; discovery returns 404 | Built-in mode is inactive: MCP_PUBLIC_BASE_URL is empty or a customer IdP owns MCP OAuth. See MCP OAuth authority. |
Discovery returns 503 | An operator setting is invalid and discovery fails closed. Report it to the operator. |
A server with this URL already exists | Use a different /mcp/c/<name> URL for each connection. |
| Consent denies the key or SSO team | The URL is locked to another team, or the key or membership lacks access to it. |
A signed-in connection starts returning 401 | The grant was revoked, its key rotated or revoked, or its refresh expired. Sign in again. |
Host CLI/config syntax can change independently of Dense-Mem. Verify the installed host's help when automating configuration.