--- title: "Grok" canonical: https://socra.com/docs/cortex/integrations/grok --- Agents: start with [Socra HQ for Agents](https://socra.com/solutions/agents.md), the verified steps for getting an identity on a team, with commands, cost and limits. Socra: Fill the gaps in your team with proactive AI teammates, each with its own computer, identity and role. # Connect Grok Choose the path for the Grok product you use: [Grok Build](#connect-grok-build) has a Cortex plugin; [Grok web](#connect-grok-web) uses a custom MCP connector. ## Connect Grok Build [Open guided Grok Build setup](https://cortex.socra.com/setup?method=plugin&agent=grok-build&step=install-cli) for one action at a time. If you use the Grok Build coding agent, install the [Socra CLI](/docs/cortex/reference/cli), then run: ```bash socra install cortex socra account login socra cortex setup ``` Setup detects Grok Build and installs its native Cortex plugin. The plugin provides the `socra-cortex` skill and hosted MCP configuration. It has no SessionStart hook. Follow setup's next steps for authorization: start `grok`, run `/mcps`, select Cortex, and press `i` to sign in if needed. Choose the Account you use in Cortex. Run `grok mcp doctor cortex` to check the connection. Next, enable all Cortex tools. Run `/mcps` and confirm that Cortex is enabled; press **Space** on its row if you need to turn it on. In `~/.grok/config.toml`, add `"MCPTool(cortex__*)"` to the existing `allow` array under `[permission]`, preserving its entries and the rest of your configuration. Create the section or array only if it is missing. This Cortex-only rule covers current and newly added tools. Matching Ask rules, deny rules and organization restrictions still apply. These controls follow Grok Build’s [MCP server guide](https://docs.x.ai/build/features/mcp-servers) and [permission settings reference](https://docs.x.ai/build/settings/reference#permission). If you prefer confirmations, keep or add a Cortex-scoped Ask rule instead. Start a new Grok Build session and ask it to make a real Cortex call to list the Modules it can access. An empty list is valid. Separately, ask whether the session received Cortex guidance through the `socra-cortex` skill. Tool access alone does not prove that guidance loaded. To update the integration, run: ```bash socra cortex update ``` ## Connect Grok web In Grok web, use a custom MCP connector under **Plugins → Connectors**. Save the instructions below separately; the web connector does not install the Grok Build plugin or a SessionStart hook. [Open guided Grok setup](https://cortex.socra.com/setup?method=mcp&agent=grok&step=project) for one action at a time. Keep Grok and the Cloud Console open in separate tabs. ## 1. Prepare your Cloud Project Open [Cloud Projects](https://platform.socra.com/projects). Choose a Project you can manage, or create one. In that Project, open **Enabled services → Enable service → Cortex**. Open **OAuth overview → Set up OAuth**, use **Cortex for Grok** as the application name, and save the consent information. All the settings below must belong to this same Project. If a newly created Project is not immediately available, wait a moment and retry. For a Grok Business or Enterprise team, an administrator must provision the connector before members connect it. ## 2. Register the Grok client Open [OAuth clients](https://platform.socra.com/oauth/clients) in your Project and register a client: - **Client name:** Cortex for Grok - **Application type:** Single-page app - **Redirect URLs:** the exact URL below, including its final slash - **JavaScript origins:** leave empty ```text https://grok.com/connectors-oauth-exchange-code/ ``` Select **Create client** and copy its client ID. This connection uses PKCE and does not require a client secret. Use your own client ID; this guide never asks you to paste credentials into Cortex onboarding. ## 3. Add the custom connector In [Grok](https://grok.com/connectors), open **Plugins → Connectors → New Connector → Custom**. Enter **Socra Cortex** as the name and use this **Server URL**: ```text https://cortex.socra.cloud/mcp ``` Select **Add Connector**. Grok discovers Cortex and displays **OAuth Credentials Required**. ## 4. Authorize your Account Before authorizing, review the access you are granting. Cortex tools can read and modify data that your selected Account permits. The read-only verification does not restrict the connection’s overall authority. Review later tool calls and approve only the actions you intend. In Grok's OAuth form: | Field | Value | | ---------------------- | --------------------------------------------------------------- | | Client ID | Your new Socra client ID | | Client Secret | Leave empty | | Authorization Endpoint | Keep the discovered `https://account.socra.com/oauth/authorize` | | Token Endpoint | Keep the discovered `https://oauth.socra.cloud/oauth/token` | | Scopes | Leave empty | | Token Auth Method | **none (PKCE only, recommended)** | Select **Save & Connect**. In the popup, sign in to Socra, choose the Account you use in Cortex, and approve access. Allow the popup if your browser blocks it. Return to Grok and confirm that your connector appears under **Connected**, using the name you saved. If it is already connected to the intended Account, continue without reconnecting. If authorization fails, check the exact redirect URL, client ID, application type, and that Cortex is enabled in the same Project. Signing into the Cortex website alone does not connect Grok. ## 5. Enable all Cortex tools Open **Plugins → Connectors** and select your connector by its saved name. Enable all Cortex tools so Grok can retrieve and maintain knowledge and coordinate work. Confirm that the connector shows **All tools enabled**. Your Account permissions still apply. Selecting an enabled tool turns it off, so leave enabled tools selected. Tool enablement is separate from approval. Grok's web connector currently has no verified **Always allow** control equivalent to ChatGPT or Claude. If Grok requests approval for an action, review it there. Do not use Grok Build, Grok Bot, or xAI API permission instructions for this web connection. ## 6. Save persistent Cortex instructions These suggested instructions teach your agent to Flash the right knowledge before acting, without reminders. They also teach it to create or update Modules when you share useful knowledge or preferences. You can edit or skip them. For example, [ask for recommendations before changes are saved](/docs/cortex/installation#choose-your-review-preference), or let the agent maintain authorized knowledge as you work. You do not need to write that knowledge yourself. Open your profile menu → **Settings → Customize → Custom**. Add the following alongside your existing instructions and select **Save**. Closing Settings before saving discards the edit. Reopen Customize to check the saved text. [Open just the Cortex instructions as Markdown](https://socra.com/docs/cortex/instructions.md). This link serves the current instructions without the installation guide. ```text Cortex helps people and teams stop repeating themselves to their AI. It keeps their preferences, requirements, decisions, and reasons in a single source of truth that agents can retrieve across conversations and tools. Modules hold that knowledge, Dependencies connect prerequisite Modules, Flash loads a Module and its Dependencies, and Issues distill work that needs coordination into human-readable tasks. Before executing a task, Flash its narrowest relevant Module(s). Flash known targets directly; otherwise prefer Search. Use Map only when Search leaves subjects or relationships unclear. Reuse a successful Flash while the required knowledge remains available in context. Retrieve missing knowledge again when needed. When conversation or work reveals preferences, requirements, decisions, or other specific knowledge, update the relevant Modules or create missing ones. Preserve the knowledge and its reasons and keep Dependencies consistent. Briefly name the affected Modules and explain what changed and why. ``` These are the complete, unmodified [canonical Cortex instructions](https://github.com/socra/agent-plugins/blob/main/shared/cortex/session-start.md). They explain how Cortex connects knowledge and work, how understanding can carry across conversations, and how Module owners govern shared knowledge. They leave the agent room to use its judgment and do not enforce an approval boundary. Preserve any instructions you already use. ## 7. Verify in a new chat Start a new conversation and send: ```text Use Cortex to list the Modules I can access. Make a real Cortex tool call; an empty list is valid. Separately, report whether this new conversation received persistent Cortex guidance and what it requires. Do not change anything. ``` Check that Grok calls Cortex and returns a list. An empty list is valid for a new Account. A response without a tool call or an access error does not confirm the connection. If Grok asks for an account prerequisite such as age confirmation, complete it and retry the prompt. Do not create a Module just to test the connection. Check the guidance report separately. If you saved instructions but the new conversation did not receive them, reopen **Settings → Customize → Custom**, check the saved text, and start another conversation. If you skipped instructions, the connection can still work; report the guidance as skipped. ## Stop or remove this connection Open **Plugins → Connectors**, select the exact named Cortex connection under **Connected**, and choose **Disconnect**. Check that connection’s state afterward. Preserve other connectors, including any existing Channels connection. **Reauthenticate** is a separate action; it does not disconnect the connector. Disconnecting the host connection does not require deleting its OAuth client. For separate cleanup of a client registration dedicated to this connection, ask its Project owner to select the same Project in Platform, open **OAuth → Clients**, select that exact client and choose **Delete**, then review the confirmation that its secrets are also removed. Preserve clients shared by other working connections. Removing a host entry or deleting a registration is not proof that every previously issued token has been revoked; ask the Account authorization owner for server-side revocation when that is required. ## Sources and verification The connector entry points follow [xAI's connector documentation](https://docs.x.ai/grok/connectors), with team restrictions in [connector management](https://docs.x.ai/grok/connector-management). The OAuth field values, connected status, tool toggles, saved Custom instructions, and a real read-only Cortex `context_map` call were checked in the signed-in Grok web interface on September 5, 2026. Provider interfaces can change; use the labels shown in your account and report differences through [troubleshooting](/docs/cortex/troubleshooting).