ChatGPT Integration
ChatGPT supports Model Context Protocol (MCP). You can point ChatGPT at the SearchMCP remote endpoint and include your API key via headers. Availability and features may vary by plan and feature (see OpenAI’s docs).
- A SearchMCP API key
- A ChatGPT plan with MCP support (feature availability may differ)
- SearchMCP endpoints:
https://api.searchmcp.io/mcp
(modern),/sse
(legacy)
See OpenAI’s MCP docs for availability and setup details: platform.openai.com/docs/mcp.
- Open ChatGPT settings and locate the section for managing MCP/third-party tool connections.
- Create a new remote MCP server connection.
- Set the URL to
https://api.searchmcp.io/mcp
(StreamableHTTP). - Add a header:
x-api-key: smcp_<YOUR_API_KEY>
- Save, then test by asking ChatGPT to perform a web search (it should invoke the SearchMCP tool).
If your ChatGPT workspace exposes an explicit “Connectors”/“Tools” UI, choose “Remote MCP”, paste the URL, and add the header above. For org-specific environments, consult your admin or OpenAI docs.
Before wiring ChatGPT, sanity-check the server with the MCP client shim:
npx mcp-remote https://api.searchmcp.io/mcp --header "x-api-key: smcp_<YOUR_API_KEY>"
This confirms your API key and endpoint are reachable over StreamableHTTP.
Teams embedding ChatGPT via code can consume MCP using OpenAI’s Agents SDK. You can register a remote MCP server and expose its tools to your agent:
// Pseudocode: register a remote MCP server for your agent
// See: https://platform.openai.com/docs/mcp
import { createAgent } from '@openai/agents';
import { mcp } from '@openai/agents/mcp';
const searchMcp = mcp.remote({
url: 'https://api.searchmcp.io/mcp',
headers: { 'x-api-key': 'smcp_<YOUR_API_KEY>' }
});
const agent = createAgent({
name: 'search-agent',
tools: [searchMcp], // MCP tools are now available to the agent
});
// ...invoke your agent as usual
Exact APIs may differ by language/runtime. Refer to: OpenAI MCP docs.
- 401 Unauthorized — Check the
X-API-Key
header and key validity. - Initialize errors — Ensure ChatGPT creates a session on the first call; the server responds with
Mcp-Session-Id
which the client must echo. - Legacy vs modern — Prefer
/mcp
(StreamableHTTP). SSE (/sse
+/message
) is for legacy clients only.
- Try the Claude Desktop guide
- Review the MCP Overview
- Use the REST Search endpoint directly if needed