Skip to main content
Back to the Exa MCP server

MCP Gateway · OpenCode

Exa icon

Connect Exa to OpenCode

Exa gives OpenCode a way to look things up without leaving the shell: web search, full-page reading and programming answers. It sits in the mcp block of your config as a remote server. Speakeasy's OpenCode plugin checks every prompt and tool call before it runs, and reports token and cost totals for each turn.

Category
AI & search
Tools
8
Authentication
None
OpenCode
Terminal

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 OpenCode 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. OpenCode connects to the Exa server's own URL, and the server's authorization decides who can connect and which tools they can call.

  3. 03

    Connect OpenCode

    Add the server to OpenCode's own mcp config block as a remote server.

    Copy the server's URL from its hosted install page in Speakeasy.

    Add it to the mcp block of your OpenCode config with type set to remote.

    Restart OpenCode and sign in when prompted.

    {
      "mcp": {
        "<server slug>": {
          "type": "remote",
          "url": "<URL from the hosted install page>"
        }
      }
    }
  4. 04

    Sign in and use Exa from OpenCode

    The first time OpenCode 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 OpenCode, limited to what the person's access allows, and every call lands in the gateway's tool logs.

OpenCode doesn't receive MCP servers from plugins. The observability package is installed separately, from a ZIP or with speakeasy-hooks install --provider=opencode, and the device agent can maintain it.

Use cases

What OpenCode users do with Exa

Answer a quick programming question

Ask OpenCode how to do something in a language you rarely touch, like a shell one-liner or a regex flag, and it returns code and docs from Exa.

get_code_context_exa

Read a vendor status page

When a build fails because a hosted service is down, have OpenCode find and read the vendor's status or incident page and tell you whether to wait or work around it.

web_search_exacrawling_exa

Collect references for a design note

Writing a README or an architecture decision record? OpenCode searches for the articles and docs behind the decision and reads them, so the note cites real pages.

web_search_exacrawling_exa

Tools

8 tools

Each Exa tool can be allowed or denied per team and role at the MCP Gateway before OpenCode 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 OpenCode

The gateway covers every client the same way. The rest depends on what OpenCode 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 OpenCode. MCP-scoped policies are enabled per organization.

Prompt and tool-call blocking

OpenCode

The OpenCode plugin sends each prompt and tool call to Speakeasy, which allows or denies it before it runs.

Usage telemetry

OpenCode

Token and cost totals flow through the plugin, reported per turn.

Device agent

OpenCode

The device agent installs and maintains the observability package.

  • OpenCode has no OpenTelemetry exporter, so session data comes through the plugin.
  • Tool output is blocked at the gateway rather than in OpenCode's hooks.

Questions

Frequently asked questions

Where is Exa tool output blocked for OpenCode?
Tool output is blocked at the gateway rather than in OpenCode's hooks. Prompt injection detection and PII redaction run on every Exa tool call there.
Do I need an Exa API key in my OpenCode config?
No. You sign in when OpenCode prompts you after restarting, and agents never hold an Exa credential. Access ends when you leave your company's directory.
How do OpenCode users get Exa?
An admin adds Exa from the Speakeasy MCP Catalog and grants access by team or role. Add the server to OpenCode's own mcp config block as a remote server. Each person then sees only the Exa tools their access allows.
Are Exa calls from OpenCode 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.