--- title: "Coding agents" canonical: https://socra.com/docs/cortex/integrations/coding-agents --- 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 a coding agent Cortex plugins let your coding agent preserve and reuse knowledge as you work. You can start with an empty Account: the agent builds and maintains useful knowledge from decisions, corrections and material it is authorized to read. You do not need to write Modules yourself. Each plugin provides Cortex tools and the guidance that teaches the agent when to retrieve, capture and update knowledge. Cortex supports [Codex](#codex), [Claude Code](#claude-code), [Cursor](#cursor), and [GitHub Copilot CLI](#github-copilot-cli). Each plugin contains [hosted MCP configuration](/docs/cortex/reference/mcp). Codex receives guidance through the `socra-cortex` skill; its Cortex package has no SessionStart hook. Claude Code, Cursor, and GitHub Copilot CLI receive guidance through a SessionStart hook. For Grok Build, see [Connect Grok](/docs/cortex/integrations/grok#connect-grok-build). 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. The hosted MCP surface includes operations that can create, update, and delete Cortex resources. Review the [security model](/docs/cortex/administration/security) before changing your agent host's approval policy. > **Required for Claude Code, Cursor, and GitHub Copilot CLI:** Approve or trust the Cortex SessionStart hook when the host asks. If the hook does not run, Cortex tools can remain available without the guidance it supplies. [Open guided setup](https://cortex.socra.com/setup) and choose **Ask my agent to help**. Your agent can follow the maintained setup guide; you complete sign-in and any consent your host requires. The steps below are also available if you prefer to install it yourself. For the store installation, follow [Connect ChatGPT](/docs/cortex/integrations/chatgpt). ## Install automatically Use the [Socra CLI](/docs/cortex/reference/cli) to detect and configure every supported coding agent installed on your computer. ### Install the Socra CLI #### macOS and Linux Run these commands: ```bash curl -fsSL https://cli.socra.cloud/install.sh | sh ``` #### Windows Run these commands in PowerShell: ```powershell irm https://cli.socra.cloud/install.ps1 | iex ``` Open a new terminal after the installer completes. Install Cortex, sign in to your Account, and configure every detected coding agent: ```bash socra install cortex socra account login socra cortex setup ``` The command detects supported coding agents, installs or updates each Cortex plugin, and starts supported authentication flows. The current Codex package needs no hook approval. Follow the command's next steps to finish any authorization that the other hosts perform inside their own interfaces. > **Authentication required:** Each coding agent stores its own Cortex authorization. `socra cortex setup` may start a browser login or report that authorization needs to be completed in the host. If Codex authentication is incomplete, run: ```bash codex mcp login cortex ``` For Claude Code, start `claude`, run `/mcp`, select the Cortex server, and follow its browser sign-in. If setup reports an unsupported Claude login command, complete authentication this way. For Cursor, open **Customize → MCPs** (older versions: **Settings → Tools & MCP**), select Cortex, and connect. For GitHub Copilot CLI, start `copilot`, run `/mcp`, select Cortex, and sign in. Complete Account selection in the browser that opens. If setup already connected the intended Account, continue without signing in again. When a configured coding agent asks whether to allow the Cortex SessionStart hook, approve it. You can run `socra cortex setup` again. It updates outdated installations and does not create duplicate installations. ## Install manually Use the instructions for your coding agent when you do not want the Socra CLI to manage plugin installation. ### Codex Add the Socra marketplace and install Cortex: ```bash codex plugin marketplace add socra/agent-plugins --ref main codex plugin add cortex@socra ``` Authenticate the MCP connection: ```bash codex mcp login cortex ``` Select the Account you use in Cortex in the browser that opens. If Cortex is already connected to that Account, continue without logging in again. Start a new Codex session. The Cortex plugin supplies the `socra-cortex` skill; this package has no SessionStart hook to approve. #### Pause or remove Cortex in Codex To pause the plugin’s Cortex server, set `enabled = false` in the existing `[plugins."cortex@socra".mcp_servers.cortex]` section of `~/.codex/config.toml`. Preserve the section’s other settings and your other servers. Start a new session and use `/mcp` to check that Cortex is disabled. This pauses tool access; it does not establish server-side authorization revocation. To remove the stored OAuth credentials for the Cortex HTTP server, run `codex mcp logout cortex`. To remove the plugin from your local Codex configuration and cache, run `codex plugin remove cortex@socra`. These are separate actions. Do not use `codex logout`, which signs Codex itself out. Follow [OpenAI’s MCP policy documentation](https://learn.chatgpt.com/docs/extend/mcp?surface=cli#plugin-provided-mcp-servers) and [CLI command reference](https://learn.chatgpt.com/docs/developer-commands#codex-mcp); these commands act on local configuration and credentials, and do not establish server-side authorization revocation. ### Claude Code Add the Socra marketplace and install Cortex for your user profile: ```bash claude plugin marketplace add socra/agent-plugins --scope user claude plugin install cortex@socra --scope user ``` Authenticate the MCP connection: Start `claude`, run `/mcp`, select the Cortex server, and follow the browser sign-in. Select the same Account that you use in Cortex. Already connected to the intended Account? Continue without authorizing again. Approve the bundled Cortex SessionStart hook if Claude Code asks, then start a new Claude Code session. #### Pause Cortex in Claude Code To pause the Cortex server, toggle it off in `/mcp`. This preserves its configuration and applies to the current project. To disable the user-installed plugin and its SessionStart guidance hook, run `claude plugin disable cortex@socra --scope user`, then start a new session. Keep unrelated plugins enabled. These local controls do not establish server-side authorization revocation. ### Cursor Clone the [public plugin repository](https://github.com/socra/agent-plugins) and link the Cursor provider directory: ```bash git clone https://github.com/socra/agent-plugins.git mkdir -p ~/.cursor/plugins/local ln -s "$(pwd)/agent-plugins/providers/cursor/cortex" ~/.cursor/plugins/local/cortex ``` Restart Cursor or run **Developer: Reload Window**. Confirm that Cortex appears under **Customize**. Approve the bundled Cortex SessionStart hook if Cursor asks. Open **Customize → MCPs** (older versions: **Settings → Tools & MCP**), select Cortex, and sign in if prompted. Choose the Account you use in Cortex. If it is already connected to that Account, continue without reconnecting. Continue with the all-tools settings below, then make the first read-only connection check. #### Pause Cortex in Cursor To pause Cortex tools, turn off its server under **Customize → MCPs**. Preserve unrelated servers and your current tool choices. This local toggle does not establish server-side authorization revocation. ### GitHub Copilot CLI Add the Socra marketplace and install Cortex: ```bash copilot plugin marketplace add socra/agent-plugins copilot plugin install cortex@socra ``` Start `copilot`, approve the bundled Cortex SessionStart hook if GitHub Copilot CLI asks, then run `/mcp`. Select Cortex and sign in if prompted, choosing the same Account you use in Cortex. If it is already connected to that Account, continue without authorizing again. Start a new session after authorization completes. #### Pause Cortex in GitHub Copilot CLI Use `copilot mcp list` to identify the Cortex server and its plugin source. To pause that server, use `copilot mcp disable` with the listed server name, then start a new session. To disable the installed Cortex plugin and its SessionStart guidance hook, use `copilot plugin disable` with the plugin name shown by `copilot plugin list`. Preserve unrelated servers and plugins. These local controls do not establish server-side authorization revocation. ### Other coding agents Grok Build has a [Cortex plugin](/docs/cortex/integrations/grok#connect-grok-build). For another coding agent that supports remote HTTP MCP, configure the [hosted Cortex MCP server](/docs/cortex/guides/mcp). An MCP-only connection provides Cortex tools but does not install plugin guidance. ## Allow the plugin instructions The plugin supplies the [suggested instructions](/docs/cortex/installation#suggested-instructions). They teach your agent to Flash the right knowledge before acting and create or update Modules when you share useful knowledge or preferences. You do not need to add them to an `AGENTS.md` file. Verify guidance separately from tool access. In **Codex**, start a new session with the Cortex plugin enabled and check that the `socra-cortex` skill is available. Claude Code, Cursor, and GitHub Copilot CLI may ask to trust the Cortex SessionStart hook during installation or startup; approve that hook and restart the session. See the [canonical Cortex instructions](https://github.com/socra/agent-plugins/blob/main/shared/cortex/session-start.md). ## Enable all Cortex tools We recommend enabling all Cortex tools and using the host's Cortex-scoped always-allow setting. This lets your agent retrieve and maintain knowledge and coordinate work without missing tools or repeated confirmation clicks. Prefer a server-wide rule so newly added Cortex tools are included. ### Allow all tools in Codex Run `/mcp` and check that Cortex is connected. In `~/.codex/config.toml`, add or update the existing Cortex plugin server section: ```toml [plugins."cortex@socra".mcp_servers.cortex] enabled = true default_tools_approval_mode = "approve" ``` Remove `enabled_tools` and `disabled_tools` from this Cortex server section to make all current and newly added tools available. Remove Cortex-specific per-tool approval overrides so the server default applies. Preserve other servers and unrelated settings. ### Allow all tools in Claude Code Run `/mcp`, select Cortex, and check that its server and all its tools are enabled. Add `mcp__plugin_cortex_cortex__*` as an **Allow** rule under `/permissions` in your user settings. This covers every tool from the plugin's Cortex server, including newly added tools. Matching Ask rules, deny rules and organization policy still apply. ### Allow all tools in Cursor Open **Customize → MCPs** and confirm the connection. Turn on every Cortex tool in the tools list above chat. Add `cortex:*` to the MCP allowlist under **Settings → Agents → Approvals & Execution**, preserving existing entries. This server-wide rule includes newly added Cortex tools. If Cursor makes this list read-only because `permissions.json` controls it, add `cortex:*` to the existing `mcpAllowlist` in that file instead, preserving its entries. Organization-managed restrictions still apply. ### Allow all tools in GitHub Copilot CLI Run `/mcp` and check that Cortex is enabled and connected. If the server was disabled, use `copilot mcp list` to identify it, then `copilot mcp enable` with that server name. Start each session with: ```bash copilot --allow-tool='cortex' ``` This permits every tool from the Cortex server for that session, including newly added tools. Existing deny rules and organization policy still apply. These settings apply only to Cortex. They permit supported read, write and delete actions within your Account permissions. The agent can save useful knowledge, name the affected Modules, and explain what changed and why. The plugin instructions guide this behavior; they do not enforce it. If you prefer tool confirmations, use your host's **Ask** or **Prompt** setting for Cortex instead. You can also [tell the agent to recommend Module changes and wait for your approval](/docs/cortex/installation#choose-your-review-preference). That instruction is separate from host tool confirmations. Either way, the agent prepares the knowledge and maintains its structure; you do not need to author it. Current provider references: [Codex MCP](https://learn.chatgpt.com/docs/extend/mcp?surface=cli), [Claude Code permissions](https://code.claude.com/docs/en/permissions#mcp), [Cursor permissions](https://prod.cursor.com/docs/reference/permissions#mcp-allowlist-format), and [Copilot CLI](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference). ## Verify the installation Start a new session and ask: ```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 both results: the coding agent makes a real Cortex call and returns the Module list, and the new session reports receiving Cortex guidance and explains what it requires. A new Account can return an empty list. If guidance is missing in Codex, check that the Cortex plugin and its `socra-cortex` skill are available. In Claude Code, Cursor, or GitHub Copilot CLI, check that the SessionStart hook is trusted and enabled. Start another session after correcting the configuration. Tool access alone does not confirm that the instructions loaded. ## Next step [Continue your normal work with Cortex](/docs/cortex/get-started/first-workflow). The agent can start preserving useful knowledge as it appears; there is no graph to fill in first. ## Sources and verification The Claude Code controls above follow its official [MCP reference](https://code.claude.com/docs/en/mcp), [permissions guide](https://code.claude.com/docs/en/permissions) and [plugin commands](https://code.claude.com/docs/en/plugins/cli-reference). No host authorization, server toggle or plugin-disable action was executed in this verification; their effects on a live Cortex connection remain unverified. Cursor controls follow its official [MCP guide](https://prod.cursor.com/help/customization/mcp) and [permissions reference](https://prod.cursor.com/docs/reference/permissions#mcp-allowlist-format). Copilot controls follow GitHub’s [CLI command reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference) and [plugin reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-plugin-reference). The older plugin `--mcp` flag has been removed; server controls now use the dedicated MCP commands. No host authorization, permission changes, server toggles or plugin-disable actions were executed for this verification.