URL: https://gofastmcp.com/integrations/chatgpt
Title: ChatGPT 🤝 FastMCP - FastMCP

Documentation Index
Fetch the complete documentation index at:
/llms.txt
Use this file to discover all available pages before exploring further.
Skip to main content
Meet
Prefect Horizon
, the enterprise MCP gateway built by the team behind FastMCP
FastMCP
home page
v3
Prefect Horizon
PrefectHQ/fastmcp
PrefectHQ/fastmcp
Search...
Navigation
AI Assistants
ChatGPT 🤝 FastMCP
Search the docs...
Ctrl
K
Documentation
Get Started
Welcome!
Installation
Quickstart
Servers
Overview
Core Components
Working with Tools
MCP Providers
Interactivity
Extensibility
Auth
Deployment
Apps
Overview
Quickstart
NEW
FastMCPApp
NEW
Interactive Tools
NEW
Generative UI
NEW
Custom HTML
Reference
Clients
Overview
Client-Only Package
Transports
fastmcp-remote
Operations
UPDATED
Authentication
UPDATED
Integrations
Auth
Web Frameworks
AI Assistants
ChatGPT
Claude Code
Claude Desktop
Cursor
Gemini CLI
Goose
AI SDKs
MCP.json
More
Settings
CLI
Upgrading
Development
What's New
FAQ
On this page
Build a Server
Deploy Your Server
Chat Mode
Add to ChatGPT
1. Enable Developer Mode
2. Create Connector
3. Use in Chat
Skip Confirmations
Deep Research Mode
Tool Implementation
Using Deep Research
AI Assistants
ChatGPT 🤝 FastMCP
Copy page
Connect FastMCP servers to ChatGPT in Chat and Deep Research modes
Copy page
ChatGPT
supports MCP servers through remote HTTP connections in two modes:
Chat mode
for interactive conversations and
Deep Research mode
for comprehensive information retrieval.
Developer Mode Required for Chat Mode
: To use MCP servers in regular ChatGPT conversations, you must first enable Developer Mode in your ChatGPT settings. This feature is available for ChatGPT Pro, Team, Enterprise, and Edu users.
OpenAI’s official MCP documentation and examples are built with
FastMCP v2
! Learn more from their
MCP documentation
and
Developer Mode guide
.
​
Build a Server
First, let’s create a simple FastMCP server:
server.py
from
fastmcp
import
FastMCP
import
random
mcp
=
FastMCP
(
"
Demo Server
"
)
@
mcp
.
tool
def
roll_dice
(
sides
:
int
=
6
)
->
int
:
"""
Roll a dice with the specified number of sides.
"""
return
random
.
randint
(
1
,
sides
)
if
__name__
==
"
__main__
"
:
mcp
.
run
(
transport
=
"
http
"
,
port
=
8000
)
​
Deploy Your Server
Your server must be accessible from the internet. For development, use
ngrok
:
Terminal 1
Terminal 2
python
server.py
Note your public URL (e.g.,
https://abc123.ngrok.io
) for the next steps.
​
Chat Mode
Chat mode lets you use MCP tools directly in ChatGPT conversations. See
OpenAI’s Developer Mode guide
for the latest requirements.
​
Add to ChatGPT
​
1. Enable Developer Mode
Open ChatGPT and go to
Settings
→
Connectors
Under
Advanced
, toggle
Developer Mode
to enabled
​
2. Create Connector
In
Settings
→
Connectors
, click
Create
Enter:
Name
: Your server name
Server URL
:
https://your-server.ngrok.io/mcp/
Check
I trust this provider
Add authentication if needed
Click
Create
Without Developer Mode
: If you don’t have search/fetch tools, ChatGPT will reject the server. With Developer Mode enabled, you don’t need search/fetch tools for Chat mode.
​
3. Use in Chat
Start a new chat
Click the
+
button →
More
→
Developer Mode
Enable your MCP server connector
(required - the connector must be explicitly added to each chat)
Now you can use your tools:
Example usage:
“Roll a 20-sided dice”
“Roll dice” (uses default 6 sides)
The connector must be explicitly enabled in each chat session through Developer Mode. Once added, it remains active for the entire conversation.
​
Skip Confirmations
Use
annotations=ToolAnnotations(readOnlyHint=True)
to skip confirmation prompts for read-only tools:
from
mcp
.
types
import
ToolAnnotations
@
mcp
.
tool
(
annotations
=
ToolAnnotations
(
readOnlyHint
=
True
))
def
get_status
()
->
str
:
"""
Check system status.
"""
return
"
All systems operational
"
@
mcp
.
tool
()
# No annotation - ChatGPT may ask for confirmation
def
delete_item
(
id
:
str
)
->
str
:
"""
Delete an item.
"""
return
f
"Deleted
{
id
}
"
​
Deep Research Mode
Deep Research mode provides systematic information retrieval with citations. See
OpenAI’s MCP documentation
for the latest Deep Research specifications.
Search and Fetch Required
: Without Developer Mode, ChatGPT will reject any server that doesn’t have both
search
and
fetch
tools. Even in Developer Mode, Deep Research only uses these two tools.
​
Tool Implementation
Deep Research tools must follow this pattern:
@
mcp
.
tool
()
def
search
(
query
:
str
)
->
dict
:
"""
Search for records matching the query.
Must return {"ids": [list of string IDs]}
"""
# Your search logic
matching_ids
=
[
"
id1
"
,
"
id2
"
,
"
id3
"
]
return
{
"
ids
"
:
matching_ids
}
@
mcp
.
tool
()
def
fetch
(
id
:
str
)
->
dict
:
"""
Fetch a complete record by ID.
Return the full record data for ChatGPT to analyze.
"""
# Your fetch logic
return
{
"
id
"
:
id
,
"
title
"
:
"
Record Title
"
,
"
content
"
:
"
Full record content...
"
,
"
metadata
"
:
{
"
author
"
:
"
Jane Doe
"
,
"
date
"
:
"
2024
"
}
}
​
Using Deep Research
Ensure your server is added to ChatGPT’s connectors (same as Chat mode)
Start a new chat
Click
+
→
Deep Research
Select your MCP server as a source
Ask research questions
ChatGPT will use your
search
and
fetch
tools to find and cite relevant information.
OpenAPI 🤝 FastMCP
Previous
Claude Code 🤝 FastMCP
Next
Ctrl
+I
discord
github
website
x
Powered by
This documentation is built and hosted on Mintlify, a developer documentation platform
Assistant
Responses are generated using AI and may contain mistakes.
\n\n
\n
\n \n
\n
