Grok Bot
Connect a cloud-hosted Grok Bot to Nowledge Mem through a public, authenticated MCP endpoint.
For your agent
Give this to the Grok Bot after you have a public Mem MCP endpoint:
Read https://nowledgemem.study/SKILL.md and the Grok Bot guide at https://nowledgemem.study/docs/integrations/grok-bot. Use the configured Nowledge Mem MCP connector to search my memories and save a scoped test decision. Do not use localhost. Do not claim automatic full-thread capture unless Grok Bot provides a documented export or hook.What this is
This is Grok's cloud-hosted custom-connector path. xAI makes connectors available to all Grok users, and the same connector can be enabled in a normal Grok conversation or for a Bot. It is different from Grok Build, the coding agent that can load a local plugin. Use the Browser Extension when you want Mem to capture a Grok web conversation; use this connector when you want Grok to search or update Mem. Creating a custom connector and enabling it for a Bot are separate steps. See Grok's connector guide for current client controls.
Connect Mem
Grok Bot cannot reach a service running on your computer. Use Nowledge Cloud or an authenticated Access Anywhere endpoint that is publicly reachable over HTTPS.
The connection is two-way in a precise sense: Grok Bot can call Mem, while Mem cannot read Grok Bot's private conversation history. For a local desktop Mem, Access Anywhere is the bridge; for a hosted Mem, use the Cloud MCP address.
You do not need Plus or Max to connect a Bot. Access Anywhere Quick link works without a subscription, Cloudflare account, or domain. Plus and Max include the stable managed Nowledge Link; a user-managed Cloudflare domain is another option for a stable address.
MCP is the reliable connection path. Create the custom connector at
grok.com/connectors; do not try to create it
inside the Bot's Plugins page. If the Bot or its team also exposes the shared
Nowledge Mem package, you may enable that separately for the skills and
lifecycle hooks that the host supports. The package does not bypass Grok's team
policy or give Mem access to private Bot data.
- For a Desktop workspace, keep Mem running and choose a connection type in Settings → Access Anywhere. Then open Connectors → AI Tools and click Install on the Grok Bot card. In the local Desktop app, this starts Access Anywhere if needed, copies the public MCP URL, and opens the browser pairing page. Finish any required tunnel configuration first. If accessing Mem remotely, start the tunnel on the computer running Mem first.
- For a Hosted Cloud workspace, copy the full MCP URL from
Connectors → AI Tools, including
?space_protocol=exact-v1. Skip Desktop pairing and Access Anywhere; use Cloud sign-in. - Open
grok.com/connectors, choose New Connector → Custom, paste the MCP address, and use OAuth. For a Business or Enterprise team, an admin must provision the connector before members can use it. Do not paste a Mem API key or Tunnel token. - For Desktop, keep the pairing page and OAuth approval page in the same browser profile. For Cloud, if Mem asks you to sign in, open its sign-in link, finish sign-in in the new tab, return to the approval tab, and choose Continue after sign-in. Review the workspace and requested permissions.
- Enable the connector in the Bot's Settings → Plugins, then ask it to
search for a memory you already saved. To save a test decision, the client
must request and receive
mem:write. Save one clearly named test memory and ask the Bot to read it back by its returned ID in the intended Space.
Use the copied public HTTPS address ending in /mcp (with its query string
for Cloud). Do not use the bare domain, /remote-api/mcp, a private LAN
address, localhost, or 127.0.0.1. Keep the Desktop app and tunnel running
while the Bot uses the connection. App MCP traffic goes directly to your
published endpoint.
What works
- MCP memory search, context retrieval, distillation, and scoped writes
- The same Cloud/App Space and identity rules used by other remote clients
- Saving client-supplied conversation snapshots with
sync_thread, when the server exposes it and the client hasthreads:syncpermission - Explicit Bot role and identity configuration when several Bots share one account
Save a conversation snapshot
Use a Mem version that includes sync_thread. The Grok connector must
explicitly request threads:sync, and you must approve it; threads:read
permits retrieval, while mem:write permits memory writes. An old read-only
grant needs new authorization with the required scopes. Refreshing tools does
not add permission, and threads:write does not authorize sync_thread.
If Grok cannot request the scope or submit original messages, this path cannot
save the conversation.
Once sync_thread appears in the Bot's tool list, try a small test:
Use Nowledge Mem's sync_thread to save these two test messages.
Choose a new conversation ID, an external source, and stable message IDs.
Save only these originals and show the receipt.
user: This is a Grok Bot connection test.
assistant: This is a synthetic test reply.Check for snapshot_saved: true and two added messages. Ask the Bot to resend
the same snapshot with the same conversation ID, source, message IDs, and
returned space_id; messages_added should be 0. In Mem's Threads, check
the originals, roles, and order. This verifies the submitted test messages,
not access to the Bot's full history.
To fill gaps later, send every saved message plus the missing ones in conversation order. Keep the source, conversation ID, message IDs, roles, and original text unchanged. Do not send only the new tail or replace originals with a summary. If a response is lost, resend the same snapshot rather than creating new IDs. Saving a Thread does not automatically distill Memories.
Snapshots allow up to 5,000 messages, 256 KiB per message, and 8 MiB of original text in total, measured in UTF-8 bytes. Cloud may apply a lower per-message limit. Each growing snapshot must include all saved messages and fit the limits; independent chunks do not bypass them.
The MCP connector does not automatically import every Grok Bot conversation.
There is no verified Bot-specific transcript export or hook for automatic
complete-thread capture, and no nmem t sync --from grok-bot command. Mem can
save only the originals the client submits. For supported export files, use
Import existing conversations.
Identity and Spaces
When a Bot represents a durable role, configure that role explicitly in Mem. Do not use the Bot's display name or source_app as an identity selector. The server remains authoritative for the Space and access scope.
Troubleshooting
- The connector cannot connect: confirm the MCP address is public HTTPS and not a loopback or private LAN address.
- Continue appears to do nothing: finish sign-in in the tab opened by Mem, then return to the approval tab and choose Continue after sign-in.
- Pairing or approval expired: click Install again on the Grok Bot card to start fresh Desktop pairing. This cancels an active pairing. Keep approval in the same browser profile. On Cloud, restart authorization from Grok.
sync_threadis missing or denied: check the Mem version, client tool list, and explicitthreads:syncconsent; reconnect with the required scopes.- A snapshot is rejected: include all saved messages in order with their
original IDs, roles, and text, and reuse the returned
space_id. - The Desktop address changed: update the connector URL and authorize again. For a stable URL, configure Nowledge Link or your own domain.
- Memory tools are missing: confirm the custom connector exists at
grok.com/connectors, then reload the Bot and enable it under Settings → Plugins. - A team member cannot connect: ask a team admin to check the shared MCP allowlist and member-managed-server policy.
- The Bot searches the wrong Space: check the remote Mem connection and explicit Space/identity configuration; do not create a new Space just to make the connection pass.
For the separate local coding-agent path, see Grok Build.
