Skip to main content
Back to the Exa MCP server

MCP Gateway · Codex

Exa icon

Connect Exa to Codex

Codex works through long coding tasks where it needs current documentation, not only what it learned in training. With Exa behind the Speakeasy gateway, Codex can pull code examples and read reference pages mid-task. Agent hooks let Speakeasy allow or deny each tool call before Codex runs it, and an [otel] block in ~/.codex/config.toml sends telemetry to Speakeasy.

Category
AI & search
Tools
8
Authentication
None
Codex
CLI and ChatGPT desktop app

Behind the MCP Gateway

Run Exa MCP behind the MCP Gateway

One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every Exa call inspected and logged.

Deploy on MCP Gateway

Set up

Add Exa to Codex in 4 steps

  1. 01

    Add Exa from the catalog

    An admin finds Exa in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.

    Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.

  2. 02

    Choose who can use Exa

    Give teams the mcp:connect scope on the Exa server through team access or a role. The organization gateway works out each person's servers from their live access, so granting access adds Exa to their gateway on the next call, and removing it takes it away.

  3. 03

    Connect Codex

    Add the gateway as an MCP server, then log in.

    Run the first command with your organization gateway URL.

    Run the second command to sign in.

    codex mcp add 'speakeasy' \
      --url 'https://<organization host>/mcp/gateway/<organization slug>'
    codex mcp login 'speakeasy'
  4. 04

    Sign in and use Exa from Codex

    The first time Codex connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.

    From then on, Exa's tools appear in Codex, limited to what the person's access allows, and every call lands in the gateway's tool logs.

To roll it out to a team, a ChatGPT workspace admin imports the plugin marketplace under Admin > Plugins and sets an installation policy per role. Imported plugins reach nobody until a policy is set.

Use cases

What Codex users do with Exa

Ground a migration in current docs

When Codex moves code to a new major version of a framework, it reads the official migration guide as clean Markdown and follows it rather than guessing.

crawling_exa

Find working examples for an SDK

Ask Codex to wire up a third-party SDK and it searches for snippets showing that exact call, such as a POST with a JSON body, before writing the integration.

get_code_context_exa

Check whether a bug is already known

If a dependency misbehaves, Codex searches the web for open reports and workarounds and summarizes them in the task before patching around the problem.

web_search_exa

Tools

8 tools

Each Exa tool can be allowed or denied per team and role at the MCP Gateway before Codex sees it.

web_search_exa

Search the web for any topic and get clean, ready-to-use content.

company_research_exa

[Deprecated: Use web_search_advanced_exa instead] Research any company to get business information, news, and insights.

crawling_exa

Read a webpage's full content as clean markdown. Use after web_search_exa when highlights are insufficient or to read any URL.

people_search_exa

[Deprecated: Use web_search_advanced_exa instead] Find people and their professional profiles.

linkedin_search_exa

⚠️ DEPRECATED: This tool is deprecated. Please use 'people_search_exa' instead. This tool will be removed in a future version. For now, it searches for people on LinkedIn using Exa AI - finds professional profiles and people.

deep_researcher_start

[Deprecated] Start an AI research agent that searches, reads, and writes a detailed report. Takes 15 seconds to 2 minutes.

See all 8 tools

Control

What Speakeasy can see and stop in Codex

The gateway covers every client the same way. The rest depends on what Codex exposes to Speakeasy.

Tool logs

Gateway

Every Exa call is logged with the person and the client that made it.

Access by role

Gateway

People reach only the Exa tools their team or role allows.

Request and response blocking

Gateway

A risk policy scoped to Exa can reject a tool request before it reaches the server, or withhold a result from Codex. MCP-scoped policies are enabled per organization.

Prompt and tool-call blocking

Codex

Agent hooks send each prompt and tool call to Speakeasy, which allows or denies it before Codex runs it.

User attribution

Codex

An [otel] block in ~/.codex/config.toml sends telemetry to Speakeasy. Export is off by default.

Budgets

Codex

Spend limits can block Codex traffic once a budget is reached.

Device agent and MDM

Codex

The device agent keeps Codex's configuration in sync on managed laptops.

  • Codex cloud tasks and GitHub code review run off the device. Neither the plugin nor OpenTelemetry covers them; OpenAI's Compliance Logs record them after the fact.
  • The workspace rollout needs a ChatGPT Business, Enterprise or Edu admin.

Questions

Frequently asked questions

Are Exa searches from Codex cloud tasks covered?
Codex cloud tasks run off the device, so neither the plugin nor OpenTelemetry covers them. OpenAI's Compliance Logs record them after the fact.
Can web content from Exa carry prompt injection into Codex?
Prompt injection detection runs on every Exa tool call at the gateway, along with PII redaction. Agent hooks can also deny a tool call before Codex runs it.
How do Codex users get Exa?
An admin adds Exa from the Speakeasy MCP Catalog and grants access by team or role. Add the gateway as an MCP server, then log in. Each person then sees only the Exa tools their access allows.
Are Exa calls from Codex logged?
Yes. Exa calls go through the MCP Gateway, which logs each tool call and attributes it to the person and the client that made it.

Connect more

Exa in other clients

AI everywhere.

Control here.