Connect FastMCP servers to ChatGPT Deep Research
search
: For searching through your resources and returning matching IDsfetch
: For retrieving the full content of specific resources by IDsearch
and fetch
tools with the correct signatures, ChatGPT will show the error: âThis MCP server doesnât implement our specificationâ. Both tools are required.search(query: str)
- Takes a query of any kind and returns matching record IDsfetch(id: str)
- Takes an ID and returns the recordsearch
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):
ngrok
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:
https://your-server-url.com
with the actual URL of your server (such as your ngrok URL).
search
and fetch
). To correct it, ensure that your server meets the service requirements.