Connect Exa to ChatGPT: Search Real-Time News, Companies, and People
Learn how to connect Exa to ChatGPT using a managed MCP server. Execute real-time news, company, and deep semantic web searches directly from your AI agent.
If you want your AI agents to conduct deep internet research, standard search tools often fall short. They return SEO-optimized noise rather than high-fidelity, machine-readable data. Exa solves this by providing an API engineered explicitly for LLMs, offering neural search, clean content extraction, and specialized indexes for companies, people, and real-time news. To bridge the gap and connect Exa to ChatGPT, you need a Model Context Protocol (MCP) server. If your team uses different AI models, check out our guide on connecting Exa to Claude or explore our broader architectural overview on connecting Exa to AI Agents.
Giving an LLM direct access to an advanced search API requires a translation layer. The LLM understands natural language tool calls; the API expects structured JSON payloads, specific array formatting, and strict authentication headers. You can either spend weeks writing, hosting, and maintaining a custom MCP server to handle this translation, or you can use a managed infrastructure layer to generate it instantly.
This guide breaks down exactly how to use Truto to dynamically generate a secure, authenticated MCP server for Exa, connect it natively to ChatGPT, and execute complex research workflows using natural language.
The Engineering Reality of the Exa API
Anthropic's open MCP standard provides a predictable way for models to discover tools via JSON-RPC 2.0. However, implementing it against specific vendor APIs exposes the underlying friction of systems integration. If you build a custom MCP server for Exa, your engineering team assumes ownership of the entire API lifecycle.
Exa is incredibly powerful, but its API surface presents unique challenges for autonomous agents. Here are the specific integration hurdles that break standard CRUD assumptions:
Neural vs. Keyword Search Ambiguity
Exa's core /search endpoint supports two paradigms: neural (semantic meaning) and keyword (exact string matching). LLMs frequently fail to distinguish when to use which. If an agent passes a conversational query like "Find me companies doing vector databases" into a keyword search, it will fail to return relevant results. A custom MCP server needs precise schema descriptions to force the LLM to format neural queries as declarative statements (e.g., "Here is a company that builds vector databases:"). Without robust schema injection derived from the documentation, the agent will hallucinate invalid query formats.
The Content Extraction Array Problem
The Exa /contents endpoint is designed to take an array of document IDs or URLs and return a highly nested JSON structure containing raw text, highlights, and summaries. LLMs notoriously struggle with constructing deeply nested arrays of string literals perfectly. Furthermore, if the LLM requests content for 50 URLs simultaneously, the resulting payload will blow up the model's context window. Your MCP server must inject pagination logic and explicitly instruct the model on how to handle the limit and next_cursor fields.
Asynchronous Agent Runs and Polling
Exa's newer reasoning and agent features (such as create_a_exa_agent_run) operate asynchronously. The initial request returns an id and a status of queued or running. ChatGPT cannot simply await the HTTP response. It must be instructed to hold the id and repeatedly call the get_single_exa_agent_run_by_id endpoint until the status reaches completed. If your MCP server does not clearly define these terminal states in the tool descriptions, the LLM will assume the initial 202 Accepted response is the final answer and fabricate the missing research data.
Generating the Exa MCP Server
Truto abstracts away the complexity of the Exa API by dynamically generating an MCP server from the integration's internal resource definitions and documentation records. Tools are derived automatically - if a resource method has documentation, it becomes an AI-ready tool complete with query and body JSON schemas.
Each MCP server is scoped to a specific integrated account and secured via a cryptographically hashed token backed by edge KV storage. You can create this server in two ways.
Method 1: Via the Truto UI
For administrators and non-technical operators, the UI provides the fastest path to server generation:
- Log into your Truto dashboard and navigate to the integrated account page for your Exa connection.
- Click the MCP Servers tab.
- Click the Create MCP Server button.
- Define the server's configuration. You can specify a human-readable name, restrict allowed methods (e.g., only
readoperations to prevent the agent from spending API credits on paid features), and optionally set an expiration date (expires_at). - Click Save and copy the generated MCP server URL (e.g.,
https://api.truto.one/mcp/a1b2c3d4...).
Method 2: Via the API
For developers building programmatic integration flows, you can generate MCP servers dynamically. The Truto API validates that the Exa integration is AI-ready, generates a secure hex string token, hashes it via HMAC for storage, and returns a ready-to-use URL.
Make a POST request to the /integrated-account/:id/mcp endpoint:
curl -X POST https://api.truto.one/integrated-account/<your_integrated_account_id>/mcp \
-H "Authorization: Bearer <your_truto_api_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Exa Research Agent",
"config": {
"methods": ["read", "custom"],
"tags": ["search", "content"]
}
}'If the request is successful, the API returns the token metadata and the endpoint URL:
{
"id": "mcp_token_987654321",
"name": "Exa Research Agent",
"config": {
"methods": ["read", "custom"],
"tags": ["search", "content"]
},
"expires_at": null,
"url": "https://api.truto.one/mcp/a1b2c3d4e5f6g7h8i9j0"
}This URL is entirely self-contained. It encodes the integrated account routing and tool schemas, requiring no additional authentication unless explicitly configured.
Connecting the MCP Server to ChatGPT
Once you have the Truto MCP server URL, you must register it with your ChatGPT environment. The connection uses JSON-RPC 2.0 to exchange an initialize handshake, request available operations via tools/list, and execute endpoints via tools/call.
Method A: Via the ChatGPT UI
If you are using ChatGPT Enterprise, Plus, or Team accounts with developer features enabled:
- Open ChatGPT and navigate to Settings.
- Select Apps, then click Advanced settings.
- Enable the Developer mode toggle to expose MCP support.
- Under the MCP servers or Custom connectors section, click to add a new server.
- Name the connector (e.g., "Exa Search by Truto").
- Paste the Truto MCP server URL into the endpoint field and click Save.
ChatGPT will immediately ping the endpoint, execute the initialization handshake, and parse the dynamic JSON schemas generated by Truto's documentation engine.
Method B: Via Manual Configuration (Local / Headless)
If you are running a local ChatGPT Desktop client, a custom agent framework, or testing via an MCP inspector, you can connect using a configuration file and a Server-Sent Events (SSE) proxy command.
Create a configuration JSON file (e.g., exa-mcp-config.json):
{
"mcpServers": {
"exa_search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/a1b2c3d4e5f6g7h8i9j0"
]
}
}
}When your client initializes, the @modelcontextprotocol/server-sse package acts as a transport bridge, converting local stdio requests into HTTP POST requests routed through Truto's JSON-RPC router.
Exa Hero Tools for ChatGPT
Truto automatically maps Exa's API endpoints to descriptive, snake_case tool names based on the integration's resource schema. Here are the highest-leverage tools available for your AI agent.
Search Real-Time News (exa_news_search)
This tool searches Exa's real-time news index, scanning major publications, trade press, and niche outlets. It bypasses SEO spam and utilizes native date filtering.
"Find the most recent news articles published in the last 24 hours regarding the acquisition of Vercel or Netlify. Use the exa_news_search tool and summarize the top three articles based on their relevance score."
Query Company Data (exa_companies_search)
Access Exa's index of over 50 million companies. This tool allows the agent to search using natural language across industry, funding stage, headcount, and technology stacks, returning structured entities with financials and web traffic data.
"Use exa_companies_search to find B2B SaaS companies in the United States that have between 50 and 200 employees, recently raised Series B funding, and use React in their frontend stack. Output a table with their names, headquarters, and founded year."
Neural Web Search (create_a_exa_search)
This is the core neural web search endpoint. It searches the broader web index and extracts content from matching pages. It is critical for general research and context-gathering.
"Execute a neural search using create_a_exa_search to find technical whitepapers detailing the architecture of vector databases for RAG pipelines. Retrieve the first 5 results and include their published dates."
Extract Clean Content (create_a_exa_content)
Extracts clean, LLM-ready text, highlights, and summaries from one or more known URLs. This tool strips away HTML boilerplate, navbars, and ads, providing pure markdown-style content to preserve the context window.
"Take these three specific URLs detailing the API rate limits of Salesforce, HubSpot, and Zendesk. Run them through create_a_exa_content to extract the raw text, then write a comparative analysis of their rate-limiting strategies."
Generate Citations and Answers (create_a_exa_answer)
Submits a question directly to Exa's answer endpoint, which performs a search and uses its own specialized LLM to generate a factual answer or detailed summary complete with inline citations.
"Ask the create_a_exa_answer tool to explain the difference between OAuth 2.0 Authorization Code Flow and Client Credentials Flow. Ensure the response includes authoritative citations from security documentation."
Search Code Context (create_a_exa_context)
Searches Exa specifically for relevant code snippets and architectural examples from open-source repositories, GitHub, documentation sites, and Stack Overflow. Ideal for DevOps and engineering agents.
"Use create_a_exa_context to find Python code snippets demonstrating how to implement exponential backoff when calling a rate-limited REST API. Look for examples from popular open-source libraries."
Automate Monitoring Workflows (create_a_exa_monitor)
Creates a new Exa monitor that runs recurring searches on a schedule. It delivers matching, deduplicated results directly to a configured webhook endpoint.
"Set up a recurring monitor using create_a_exa_monitor to search for mentions of 'zero data retention unified API' across hacker news and engineering blogs. Configure it to trigger daily and send the payload to our slack webhook."
For a complete list of all available endpoints, required parameters, and JSON schemas, view the Exa integration page.
Workflows in Action
Connecting Exa to ChatGPT enables sophisticated, multi-step agentic workflows. Instead of isolated API calls, the LLM can chain tool executions together, passing the output of one Exa tool as the input to the next.
1. Market Intelligence & Competitor Tracking
Persona: Product Marketer
A product marketer needs to identify emerging competitors in a specific vertical, read their recent press releases, and synthesize their messaging strategy.
"Find up-and-coming companies in the 'AI integration platform' space with fewer than 50 employees. Then, search for news articles about these specific companies from the last 30 days. Finally, extract the full text of those articles and summarize their core value propositions."
Execution Steps:
- The agent calls
exa_companies_searchwith a query targeting the specified industry and headcount parameters. - The agent parses the returned company names and iterates through them, calling
exa_news_searchfor each company to find recent press coverage. - The agent collects the returned URLs and batches them into
create_a_exa_contentto retrieve the clean markdown text. - The agent analyzes the raw text in its context window and outputs the final strategic summary.
sequenceDiagram
participant ChatGPT as ChatGPT Agent
participant MCP as Truto MCP Server
participant Exa as Exa API
ChatGPT->>MCP: Call exa_companies_search<br>(query: "AI integration platform")
MCP->>Exa: POST /companies/search
Exa-->>MCP: Returns list of entities
MCP-->>ChatGPT: JSON result array
ChatGPT->>MCP: Call exa_news_search<br>(query: "[Company Name]")
MCP->>Exa: POST /search (type: news)
Exa-->>MCP: Returns recent news URLs
MCP-->>ChatGPT: JSON URL list
ChatGPT->>MCP: Call create_a_exa_content<br>(urls: [url1, url2])
MCP->>Exa: POST /contents
Exa-->>MCP: Returns clean text
MCP-->>ChatGPT: Extracted markdown2. Automated Deep Code Research
Persona: DevOps / Backend Engineer
An engineer needs to research how a specific open-source package handles connection pooling, requiring both code examples and high-level explanations.
"I need to understand how the pgx library in Go handles connection pooling. Search for code examples showing optimal configuration. Then, use the answer tool to summarize the best practices for setting MaxConns and MinConns with citations."
Execution Steps:
- The agent calls
create_a_exa_contextwith a query targeting Golangpgxconnection pooling configurations, specifically looking at GitHub and documentation sites. - The agent reviews the returned code snippets.
- The agent calls
create_a_exa_answerto request a definitive summary with citations regarding the specificMaxConnsparameters. - The user receives a comprehensive technical brief containing real-world code and documented best practices.
3. Asynchronous Web Intelligence Gathering
Persona: Financial Analyst
An analyst needs to trigger an asynchronous reasoning task to gather exhaustive data on a specific market trend, waiting for the results to compile.
"Start an Exa agent run to research the impact of solid-state batteries on the EV market in Q3 2026. Create the run, poll it until it finishes, and give me the final report."
Execution Steps:
- The agent calls
create_a_exa_agent_runwith the natural language research query. - Exa returns an
idand astatusofrunning. - The agent is instructed by the Truto schema to poll; it waits a few seconds and calls
get_single_exa_agent_run_by_id. - If the status is still
running, the agent waits and polls again. - Once the status hits
completed, the agent retrieves the terminal output and presents the findings to the user.
Security and Access Control
Exposing an advanced search engine like Exa to an autonomous agent requires strict governance. Truto's MCP architecture enforces security at the infrastructure layer, preventing the LLM from executing unauthorized actions.
- Method Filtering: When creating the server, you can pass a configuration object like
methods: ["read"]. This hardcodes the token to rejectcreate,update, anddeleteoperations, ensuring the LLM cannot accidentally delete monitors or provision new API keys. - Tag Filtering: Integrations use
tool_tagsto group endpoints. You can restrict an MCP server to only expose tools tagged with["search"], completely hiding administrative tools from the agent's context window. - Require API Token Auth: By setting
require_api_token_auth: true, the generated MCP URL requires a valid Truto API session. This adds a second layer of authentication, preventing unauthorized access even if the URL is leaked in logs. - Automatic Expiration: You can provision short-lived servers by setting an
expires_atISO datetime. Truto's edge KV storage will automatically expire the token, and a Durable Object alarm will sweep the database record, ensuring temporary contractor or session-specific access is automatically revoked.
Moving Past Boilerplate
The fundamental challenge of connecting AI to third-party APIs isn't the HTTP request - it is the normalization of the data model. Exa's APIs are incredibly powerful, but their nested schemas, distinct search paradigms, and asynchronous polling requirements present a massive integration headache for engineering teams trying to hand-code MCP servers.
By utilizing Truto's dynamic, documentation-driven tool generation, you abstract the entire integration lifecycle. Truto handles the OAuth flows, injects the necessary pagination instructions into the JSON schema, and enforces the security boundaries. This allows your engineering team to focus entirely on prompting, agent architecture, and reasoning logic, rather than maintaining fragile API mapping code.
FAQ
- Does Truto automatically handle Exa API rate limits?
- No. Truto normalizes upstream rate limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec, but does not retry or apply backoff. When Exa returns HTTP 429, Truto passes the error to the ChatGPT client, which is responsible for retry logic.
- Can I restrict the Exa MCP server to only perform read operations?
- Yes. By passing a configuration object during MCP server creation with methods: ["read"], Truto filters out all write operations, ensuring your AI agent can only execute get and list endpoints.
- How does ChatGPT extract full page content via Exa?
- The MCP server exposes Exa's Contents API as a tool (e.g., create_a_exa_content). ChatGPT passes an array of URLs to this tool, and the integration returns the clean text, highlights, and summaries extracted by Exa.
- Do I need to write custom JSON schemas for Exa endpoints?
- No. Truto dynamically generates the MCP tools and JSON schemas based on the integration's internal resource definitions and documentation records. No manual schema mapping is required.