MCP integration with ChatGPT is currently limited to Deep Research functionality and is not available for general chat. This feature is available for ChatGPT Pro, Team, Enterprise, and Edu users.
OpenAIâs official MCP documentation and examples are built with FastMCP v2! Check out their simple Deep Research-style MCP server example for a quick reference similar to the one in this document, or their more complete Deep Research example from the OpenAI Cookbook, which includes vector search and more.
Deep Research
ChatGPTâs Deep Research feature requires MCP servers to be internet-accessible HTTP endpoints with exactly two specific tools:search
: For searching through your resources and returning matching IDsfetch
: For retrieving the full content of specific resources by ID
If your server doesnât implement both
search
and fetch
tools with the correct signatures, ChatGPT will show the error: âThis MCP server doesnât implement our specificationâ. Both tools are required.Tool Descriptions Matter
Since ChatGPT needs to understand how to use your tools effectively, write detailed tool descriptions. The description teaches ChatGPT how to form queries, what parameters to use, and what to expect from your data. Poor descriptions lead to poor search results.Create a Server
A Deep Research-compatible server must implement these two required tools:search(query: str)
- Takes a query of any kind and returns matching record IDsfetch(id: str)
- Takes an ID and returns the record
search
tool should take a query (of any kind!) and return IDs. The fetch
tool should take an ID and return the record.
Hereâs a reference server implementation you can adapt (see also OpenAIâs sample server for comparison):
server.py
Deploy the Server
Your server must be deployed to a public URL in order for ChatGPT to access it. For development, you can use tools likengrok
to temporarily expose a locally-running server to the internet. Weâll do that for this example (you may need to install ngrok
and create a free account), but you can use any other method to deploy your server.
Assuming you saved the above code as server.py
, you can run the following two commands in two separate terminals to deploy your server and expose it to the internet:
This exposes your unauthenticated server to the internet. Only run this command in a safe environment if you understand the risks.
Connect to ChatGPT
Replacehttps://your-server-url.com
with the actual URL of your server (such as your ngrok URL).
- Open ChatGPT and go to Settings â Connectors
- Click Add custom connector
- Enter your server details:
- Name: Library Catalog
- URL: Your server URL, including the path.
- Note: Ensure your URL includes the correct path for the transport youâre using. The defaults are /sse/ for SSE (e.g., https://abc123.ngrok.io/sse/) and /mcp/ for HTTP (e.g., https://abc123.ngrok.io/mcp/).
- Description: A library catalog for searching and retrieving books
Test the Connection
- Start a new chat in ChatGPT
- Click Tools â Run deep research
- Select your Library Catalog connector as a source
- Ask questions like:
- âSearch for Python programming booksâ
- âFind books about AI and machine learningâ
- âShow me books by the Python Software Foundationâ
Troubleshooting
âThis MCP server doesnât implement our specificationâ
If you get this error, it most likely means that your server doesnât implement the required tools (search
and fetch
). To correct it, ensure that your server meets the service requirements.