Skip to content
Connect an agent
DocumentationConnect an agent
Grok Bot app

Connect Grok Bot

Give your Bots the context you’ve saved in Maury. Connect your account with OAuth, then search your memories, remember something new, or correct a saved detail.

Before you start

Sign in to the Grok Bot app and have your Maury account ready. This guide connects the Grok Bot app. If you’re building your own bot with the xAI API, see the developer example below.

You only need Maury’s server URL. Your Bot prepares sign-in for you. Account access is granted only after you sign in to Maury and approve the requested permissions.

Ask your Bot to add Maury

Paste this message into a conversation with your Bot:

Message your Bot
Add Maury as an MCP server at https://app.maury.ai/mcp and show me the Connect card.

No client ID, client secret, or API key is needed. Choose Connect when Maury’s card appears.

Connection configuration

For clients that accept JSON, the complete connection configuration is:

Maury connection
{
  "url": "https://app.maury.ai/mcp"
}

Grok Bot identifies itself automatically through its HTTPS client metadata document (CIMD). Maury validates the document and callback before showing consent. Leave client credentials and bearer headers unset.

Sign in and approve access

  1. Choose Connect on the Maury card in your Bot’s reply.
  2. Choose Continue in Grok Bot’s connection dialog. Sign in on Maury’s website and review Maury’s consent screen. Grok Bot currently identifies itself as Cursor, with client identity cursor.com. Its hosted return address is www.cursor.com; its desktop flow may return to localhost.
  3. Choose Allow access. Leave the browser open for the OAuth handoff; when it says authorization is complete, choose Return to Grok Bot or switch back to the app.
  4. Check Connect apps → Your plugins for the connected Maury entry. If it needs authentication, choose Authenticate or reopen the Connect card.

URL-only setup requests the advertised memory permissions: memories:read to search and read memories in every brain you can access, memories:write to record new text in your default brain, memories:edit to correct memory text in all accessible brains, and memories:propose to submit and read private proposals for review. Review all four before approving. Existing tokens do not gain permissions automatically; reconnect to approve a new grant if saving or editing is unavailable.

Grok Bot currently cannot select individual scopes for a URL-only connection. For read-only access, use a client or pre-registered connection that explicitly requests only memories:read.

Try your connection

Send a new message after connecting. For example:

Search and read
Search Maury for my project notes and read the most relevant memory.

With write permission, you can also ask your Bot to record a memory:

Record and read back
Save a text memory in Maury that says "MCP connection test", then read it back to me.

To correct that same memory with edit permission:

Correct a memory
Correct the memory you just saved to say "MCP connection verified". Keep its existing ID.

Maury provides search, fetch, record_memory, and update_memory. The Bot fetches the text and revision before sending the complete correction. If someone has edited it meanwhile, it must fetch again and review the change. New and corrected text can be fetched immediately; search reflects it after indexing. Remove a test memory through the Maury app when you’re finished.

Review what your Bot finds

Ask your Bot to use propose_memory when extracting memories from chats. With memories:propose, it can submit text with a UUID submission ID and optional source chat title and link. Maury checks for similar saved memories and earlier proposals before adding anything. A close match returns skipped_similar with the existing item and creates no proposal. Saved-memory match details require read permission. Use list_proposed_memories to check pending and reviewed proposals. Existing connections need fresh consent for the new permission.

Propose from a chat
Propose useful memories from this chat in Maury for me to review. Include the source conversation. Use propose_memory and leave every proposal awaiting my review.

Open Proposed Memories in Maury’s web app to edit, choose a brain, and save or reject each proposal. Your Bot cannot accept or reject proposals through MCP. See the scheduled ingestion prompt and permission guide for agents with scheduling support. Scheduling and access to chats are handled by the agent.

If the connection needs a hand

Can I connect with a personal Grok Bot account?

Yes. The message above adds a custom connection to your own account. You do not need a team account or a marketplace listing. Installing an unpublished plugin package is a separate flow and is not required to connect Maury.

Grok Bot says the server won’t let it register as a client

Update Grok Bot and ask it to add the URL as a fresh custom MCP connection using Client ID Metadata Documents (CIMD), without a static client ID. Maury advertises CIMD support; it does not offer Dynamic Client Registration. If the error persists, share the exact error and Grok Bot version with the Maury team.

Maury is installed but its tools aren’t available

Installation and authentication are separate. In Connect apps → Your plugins, check the connection and finish Authenticate, or use Reopen on its Connect card. Then send a new message. You can also type @ to attach Maury to the task.

The browser takes a while after Allow access

Leave the tab open until it says authorization is complete, then return to Grok Bot. Browser automation can block the OAuth redirect; if an agent is controlling the browser, disconnect browser control and finish authorization normally. Avoid clicking Allow access repeatedly. If the card is still waiting after the browser completes, check the connection in Connect apps before starting again.

The Bot can read memories but can’t save one

Ask your Bot to reconnect using the URL-only setup and approve recording on the new consent screen. Refreshing a read-only token does not add write access.

The Bot can save memories but can’t correct one

Reconnect using the URL-only setup, approve editing on the new consent screen, and refresh the connection’s tools. Existing read/write grants cannot edit. If an update reports a stale revision, ask the Bot to fetch the memory again and review the correction.

OAuth reports an invalid client or callback

Use https://app.maury.ai/mcp for production or https://staging-app.maury.ai/mcp for staging, without a static client ID. Maury must be able to verify Grok Bot’s public HTTPS metadata, and the callback must exactly match a declared URL. If a fresh connection still fails, share the error with the Maury team.

Stay in control

Review or revoke the connection in Maury Connected apps. You can also disconnect Maury from Grok Bot’s Connect apps settings.

record_memory saves text only. update_memory changes text while preserving its ID, brain, original audio, and attached files. The MCP connection does not expose attachments, imported messages, or deletion. See Authentication & access for the complete permission model.

Building with the xAI API?

The API uses a separate setup: your application obtains a Maury OAuth token and supplies it with each remote MCP request. Grok Bot’s app connection does not provide your application with that token.

Show the Python API example

Install openai with python -m pip install openai. Set your own XAI_API_KEY, an MCP-capable XAI_MODEL, and MAURY_MCP_ACCESS_TOKEN with memories:read in your server environment.

Your xAI API application
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["XAI_API_KEY"],
    base_url="https://api.x.ai/v1",
)

response = client.responses.create(
    model=os.environ["XAI_MODEL"],
    input="Search Maury for my recent project notes.",
    tools=[{
        "type": "mcp",
        "server_label": "maury",
        "server_url": "https://app.maury.ai/mcp",
        "authorization": os.environ["MAURY_MCP_ACCESS_TOKEN"],
        "allowed_tools": ["search", "fetch"],
    }],
)

print(response.output_text)

To permit recording, authorize memories:write too and include record_memory in allowed_tools. Generate one UUID submission_id per memory and reuse it with identical content on retries.

For corrections, authorize memories:read and memories:edit, allow fetch and update_memory, and follow the fetch → update workflow.

Your application handles OAuth and token renewal. Keep the xAI key and Maury tokens in a server-side secret store. Running the example uses your xAI account and may incur API usage charges.

Official Grok Bot connection guide Official xAI API remote MCP reference