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 (see OpenAI’s docs).
Prerequisites
- A SearchMCP API key
- A ChatGPT plan with MCP support (availability may differ)
- SearchMCP endpoints:
https://api.searchmcp.io/mcp
(modern),/sse
(legacy)
See OpenAI MCP docs for availability and setup details.
Add the SearchMCP server to ChatGPT
- Open ChatGPT settings and locate the MCP/third-party tool connections section.
- 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 a “Connectors”/“Tools” UI, choose “Remote MCP”, paste the URL, and add the header above. For org-specific environments, consult your admin or OpenAI docs.
Optional: verify the endpoint locally
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.
Alternative: OpenAI Agents SDK
Teams embedding ChatGPT via code can consume MCP using OpenAI’s Agents SDK:
// 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. See OpenAI MCP docs .
Troubleshooting
- 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.
Next steps
- Try the Claude Desktop guide
- Review the MCP Overview
- Use the REST Search endpoint directly if needed
Last updated on