ChatGPT MCP Server
An MCP (Model Context Protocol) server providing a tool to interact with the ChatGPT macOS desktop application.
Overview
This server exposes a single tool, chatgpt
, designed to allow MCP clients (e.g., Cline, Claude Desktop, Cursor) to send prompts to and retrieve conversation lists from the native ChatGPT application on macOS.
Problem Solved
AI models interacting via MCP often need to leverage the capabilities or context within specific desktop applications like ChatGPT. Directly controlling the application allows the AI to continue existing conversations, ask new questions within the user's established ChatGPT environment, or query the conversation history without manual copy-pasting or context switching by the user.
Solution: The chatgpt
Tool
This server provides the chatgpt
tool with the following operations:
Use Cases
- Continue Existing Chats: "Using ChatGPT, continue the conversation titled 'Project Planning Q3' and ask 'What were the key deadlines we discussed?'"
- Quick Queries: "Ask ChatGPT: 'What is the capital of France?' Wait 10 seconds for the response."
- Contextual Interaction: "Get my ChatGPT conversations list. Then, ask ChatGPT to summarize the conversation titled 'Latest Market Research'."
- Fire-and-Forget Prompts: "Ask ChatGPT: 'Generate 5 ideas for blog posts about AI ethics.' Set time_to_wait to 0."
Installation & Setup
Requirements:
- macOS operating system.
- The official ChatGPT desktop application installed.
- Node.js (which includes
npx
) installed.
Step 1: Configure Your MCP Client
Add the following JSON block within the "mcpServers": {}
object in your client's configuration file. Choose the file corresponding to your client and operating system:
Configuration Block:
"chatgpt-mac": {
"command": "npx",
"args": ["chatgpt-mcp"],
"env": {},
"disabled": false,
"autoApprove": []
}
(Note: If the package name chatgpt-mcp
is unavailable on npm, you might need to use a scoped name like @your-npm-username/chatgpt-mcp
in the future. The configuration would then change to "args": ["@your-npm-username/chatgpt-mcp"]
)
Client Configuration File Locations:
- Claude Desktop:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
(Path may vary slightly)
- VS Code Extension (Cline / "Claude Code"):
- macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
- Windows:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
- Linux:
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
- Cursor:
- Global:
~/.cursor/mcp.json
- Project-Specific: Create a file at
.cursor/mcp.json
within your project folder.
- Windsurf:
~/.codeium/windsurf/mcp_config.json
- Other Clients:
- Consult the specific client's documentation for the location of its MCP configuration file. The JSON structure shown in the "Configuration Block" above should generally work.
Step 2: Restart Client
After adding the configuration block and saving the file, fully restart your MCP client application for the changes to take effect. The first time the client starts the server, npx
will automatically download the chatgpt-mcp
package from npm (once it's published) if it's not already cached.
Usage Example
Once installed and enabled, you can instruct your MCP client:
"Ask ChatGPT 'Explain quantum entanglement simply' and wait 15 seconds for the response."
The client's AI model should recognize the intent and call the chatgpt
tool with operation: "ask"
, the prompt
, and time_to_wait: 15
.
Or to get conversations:
"Get my ChatGPT conversation list."
Developed By
This tool was adapted and modified by 199-bio based on the original work by Syed Azhar.
Further development inspired by initiatives at 199 Longevity, a group focused on extending the frontiers of human health and longevity. Learn more about our work in biotechnology at 199.bio.
Project contributor: Boris Djordjevic
License
This project is licensed under the MIT License - see the LICENSE file for details.